Search Results

Search: Posts Made By: hravisankar
967
Posted By Chubler_XL
If order is not important: $ awk ' $0 !~...
If order is not important:

$ awk ' $0 !~ "^sample" { val[$1]=$2<0?-$2:$2; } END { for(i in val) print i":"val[i]-20"-"val[i]+120 }' inputfile
Chr28:25960066-25960206
Chr19:52245903-52246043...
967
Posted By rdcwayx
By the original order awk '/^Chr/&&!a[$1]++...
By the original order
awk '/^Chr/&&!a[$1]++ {sub(/[+-]/,"");print $1":"$2-20"-"$2+120}' infile
92,906
Posted By Neo
User Guide: Posting in the Emergency Forum
Emergency UNIX and Linux Support !! Help Me! Forum (Request Urgent Help) (https://www.unix.com/emergency-unix-linux-support-help-me/)

README FIRST: How to Request Emergency or Urgent Help:


...
1,077
Posted By Scrutinizer
Here's an equivalent awk, just in case: awk...
Here's an equivalent awk, just in case:
awk -F'[<>]*' '$2=="free-energy"{print $3}$2=="position"{printf "%s%s",$3,(++i%2)?" - ":RS}' infile
1,077
Posted By frans
#!/bin/bash while IFS='<>' read Null Tag Val...
#!/bin/bash
while IFS='<>' read Null Tag Val Null
do
case $Tag in
free-energy)
echo $Val
Pos=0 ;;
position)
((Pos++))
((Pos%2)) && echo -n...
4,081
Posted By DGPickett
You can make a sort of cheap xml parser of sed: ...
You can make a sort of cheap xml parser of sed:

sed -n '
s/.*<free-energy>\([^<]*\)<.*/\1/p
t
/<base-id>/{
:loop
N
/<\/base-id-3p>/!b loop
...
2,396
Posted By agama
If you have ghostscript installed: ...
If you have ghostscript installed:


fonts=-I/usr/local/share/ghostscript/fonts
gs $fonts -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=file.pdf file.ps


reads file.ps and writes file.pdf;...
1,785
Posted By danmero
Before asking for a solution you should bring...
Before asking for a solution you should bring up-front all variables as: file(s) size, system specs, your own knowledge, etc...
1,785
Posted By danmero
awk 'BEGIN{FS=RS;RS=">"}NR==FNR{a[$1]=$0}/Chr/ &&...
awk 'BEGIN{FS=RS;RS=">"}NR==FNR{a[$1]=$0}/Chr/ && a[$1]{printf}' file1 file2
2,231
Posted By danmero
I'll opt for awk 'BEGIN{FS=RS;RS=ORS=">"}...
I'll opt for
awk 'BEGIN{FS=RS;RS=ORS=">"} !/miR/' file
2,231
Posted By Chubler_XL
Avoids missing ">" on 2nd line and extra ">" at...
Avoids missing ">" on 2nd line and extra ">" at end:
$ awk '{ if(NR>1&&$0!~"^miR"&&p!~"^miR")print p; p=$0}' infile

>sample1:1:1:1057:7503#0 0 0
>sample1:1:1:1057:12664#0 0 0...
2,319
Posted By rdcwayx
Little issue, but simple code. awk...
Little issue, but simple code.

awk 'BEGIN{RS=ORS=">";FS="\n"} NF==2' infile

sample1:1:1:1057:7503#0 0 0
>sample1:1:1:1057:12664#0 0 0
>sample1:1:1:1059:6357#0 0 0
>sample1:1:1:1059:10418#0 0...
2,319
Posted By danmero
I'll opt for awk 'BEGIN{FS=RS;RS=ORS=">"}...
I'll opt for
awk 'BEGIN{FS=RS;RS=ORS=">"} !/miR/' file
2,319
Posted By Chubler_XL
Avoids missing ">" on 2nd line and extra ">" at...
Avoids missing ">" on 2nd line and extra ">" at end:
$ awk '{ if(NR>1&&$0!~"^miR"&&p!~"^miR")print p; p=$0}' infile

>sample1:1:1:1057:7503#0 0 0
>sample1:1:1:1057:12664#0 0 0...
2,319
Posted By ygemici
try like this samtools faidx Bos_taurusUMD3.fa...
try like this
samtools faidx Bos_taurusUMD3.fa "$line"
2,319
Posted By durden_tyler
That's because your problem statement is quite...
That's because your problem statement is quite vague. A "read" operation does not "have" a format, which is why "read" cannot "be" in any format.

Your input data in a file or from a pipe "has" or...
Showing results 1 to 16 of 16

 
All times are GMT -4. The time now is 02:50 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy