in reply to parsing question
Code is untested and largely lifted from the Bioperl tutorial.use Bio::SeqIO; $in = Bio::SeqIO->new(-file => "inputfilename",-format => 'Fasta'); while ( my $seq = $in->next_seq() ) { $seqstr = $seq->seq(); # actual sequence as a string print $seqobj->display_id(); # human readable id of the sequence print length($seqstr); # length of sequence }
|
|---|