[Bioperl-l] Accessing /gene and /note fields in a GenBank file
Adam Witney
awitney@sghms.ac.uk
Thu, 16 May 2002 15:31:25 +0100
Hi, just been trying to write a GenBank parser for a GenBank file containing
a whole genome
How do I get access to the /gene and /note fields of each gene? I have this
so far
my $gbk_obj = Bio::SeqIO->new('-file' => "gbk_file",
'-format' => 'GenBank');
while (my $seq = $gbk_obj->next_seq())
{
my @features = $seq->all_SeqFeatures;
foreach my $feat (@features)
{
print $feat->primary_tag."\n";
print $feat->start.' - '.$feat->end."\t".$feat->strand."\n";
my $seq_obj = $feat->seq;
print $seq_obj->seq."\n";
}
Thanks
adam