[Bioperl-l] extracting genbank content

Dave Messina David.Messina at sbc.su.se
Mon May 17 13:56:35 UTC 2010


Hi Ross,


> Do I just use another $obj->next_seq() so it will point to another record?

Yes.

The common approach is to use a while loop:

my $obj=Bio::SeqIO->new(-file=>$gbfile,-format=>"genbank");

while(my $seqobj = $obj->next_seq) {
	# do stuff with $seqobj
}


For more details, see the SeqIO HOWTO:
http://www.bioperl.org/wiki/HOWTO:SeqIO


Dave




More information about the Bioperl-l mailing list