Quantcast
Channel: UNIX and Linux Forums
Viewing all articles
Browse latest Browse all 16232

Command Line Perl for parsing fasta file

$
0
0
I would like to take a fasta file formated like
Code:

>0001
agttcgaggtcagaatt
>0002
agttcgag
>0003
ggtaacctga

and use command line perl to move the all sample gt 8 in length to a new file. the result would be
Code:

>0001
agttcgaggtcagaatt
>0003
ggtaacctga

Code:

cat ${sample}.fasta | perl -lane 'while(<>){if /^>/}'
????? How can I achieve this?

Viewing all articles
Browse latest Browse all 16232

Trending Articles