[Bioperl-l] Working with GenBank file
Shyam Saladi
saladi1 at illinois.edu
Tue May 29 19:26:13 UTC 2012
Hi,
As a followup, if I do the following: print join(" ",
$cds_features[0]->get_all_tags()) . "\n";
I get the following output:
GO_process codon_start db_xref function gene gene_synonym locus_tag product
protein_id transl_table translation
which I think would suggest that doing $_->get_tag_values('translation')
should be valid.
Thanks,
Shyam
On Tue, May 29, 2012 at 11:11 AM, Shyam Saladi <saladi1 at illinois.edu> wrote:
> Hi,
>
> I want to extract certain genes from a genomic genbank file. I put
> together the following, but get the error:
>
> ------------- EXCEPTION: Bio::Root::Exception -------------
> MSG: asking for tag value that does not exist translation
> STACK: Error::throw
> STACK: Bio::Root::Root::throw
> /usr/local/share/perl/5.10.1/Bio/Root/Root.pm:472
> STACK: Bio::SeqFeature::Generic::get_tag_values
> /usr/local/share/perl/5.10.1/Bio/SeqFeature/Generic.pm:522
> STACK: readfromgbk.pl:91
> -----------------------------------------------------------
>
> @cds_features = grep { $_->primary_tag eq 'CDS' } Bio::SeqIO->new(-file =>
> $inFile)->next_seq->get_SeqFeatures;
> my %gene_sequences = map {$_->get_tag_values('gene'),
> $_->get_tag_values('translation')} @cds_features;
>
> I think the error has to do with ->get_SeqFeatures, but don't understand
> what exactly.
>
> Could someone please advise?
>
> Thanks very much,
> Shyam
>
More information about the Bioperl-l
mailing list