[Bioperl-l] Scripting help to identify adaptors count in reads
Giorgio C
casaburi at ceinge.unina.it
Fri Nov 11 12:21:29 UTC 2011
Thanks everybody for answering me so soon !!! Probably another way may be:
perl -ne '$count{s/N+//g}++ if /^[^>]/;END{for $i (keys %count){print
"$count{$i} have $i ADAPTOR\n";}}' myFile.fasta > result.txt
and/or with 'nawk':
nawk -F'[N]+' '/^[^>]/{a[NF-1]++}END{for(i in a) print a[i] " have " i "
ADAPTOR"}' myFile.fasta > result.txt
They give the same result. If you will have this problem try these, work
good !!!
Still Thanks to all,
Giorgio
--
View this message in context: http://old.nabble.com/Scripting-help-to-identify-adaptors-count-in-reads-tp32818254p32825274.html
Sent from the Perl - Bioperl-L mailing list archive at Nabble.com.
More information about the Bioperl-l
mailing list