[Bioperl-l] Parseing tRNA sequences out of genbank file

Jason Stajich jason.stajich at duke.edu
Tue Feb 1 11:23:13 EST 2005


Very weird - one would probably need to see the genbank file to figure 
out what is going on.

A quick fix would be to force the sequence to dna first:
$seq->alphabet('dna');

It would be interesting to figure out why the alphabet is being guessed 
as not DNA though.

-jason


--
Jason Stajich
jason.stajich at duke.edu
http://www.duke.edu/~jes12/

On Feb 1, 2005, at 7:38 AM, Adam Witney wrote:

>
> Hi,
>
> I am parsing a genbank file and it contains an entry like so...
>
>      tRNA            complement(1326335..1326419)
>                      /product="transfer RNA-Leu"
>                      /gene="tRNA-Leu"
>                      /anticodon="(pos:1326383..1326385,aa:Leu)"
>                      /note="tRNA Leu anticodon CAA, Cove score 51.10"
>
>
> However this code
>
> ...
>       if($feat->primary_tag eq 'tRNA')
>          {
>           my $seq_obj = $feat->seq;
>           my $gene_length = length($seq_obj->seq);
>
> ...
>
> I get this error
>
> ------------- EXCEPTION  -------------
> MSG: Sequence is a protein. Cannot revcom
> STACK Bio::PrimarySeqI::revcom
> /usr/local/lib/perl5/site_perl/5.8.4/Bio/PrimarySeqI.pm:378
> STACK Bio::SeqFeature::Generic::seq
> /usr/local/lib/perl5/site_perl/5.8.4/Bio/SeqFeature/Generic.pm:613
> STACK toplevel ../../1.0b1/sql/scripts/gene_upload.pl:379
>
> --------------------------------------
>
> I am trying to get the DNA sequence corresponding to the tRNA, why 
> does it
> think it is a protein sequence? It works fine for tRNA's which aren't 
> on the
> reverse strand
>
> Thanks for any help
>
> Adam
>
>
> -- 
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-l
>



More information about the Bioperl-l mailing list