Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Iterating single line within a For Loop

by pvaldes (Chaplain)
on Jun 23, 2015 at 14:33 UTC ( [id://1131642] : note . print w/replies, xml ) Need Help??


in reply to Iterating single line within a For Loop

Untested

use Bio::SeqIO; $infile = Bio::SeqIO->new(-file => $ARGV[0] , '-format' => 'Fastq'); $outfile = Bio::SeqIO->new(-file => ">myfilename" , '-format' => 'genb +ank'); while ( my $seq = $infile->next_seq() ) { ...do something... # finally you could print to $outfile in genbank format (for example... or in embl, nexml, bsml, fasta, seqxml...) $outfile->write_seq($seq); }