[Bioperl-l] using Bio::DB::GenBank get translation

Vince Forgetta vince.forgetta at staff.mcgill.ca
Fri Dec 12 10:43:51 EST 2003


Jason Stajich wrote:

>Code for local and remotely obtained sequences should be identical - that
>is the whole point of the engineering these Sequence/Feature/Annotation
>objects.
>
>
>Does the accession actually have a translation tag when you pull
>it up in Entrez?
>  
>

Yes. I tried NM_021044. Thanks.

Vince

>-jason
>On Fri, 12 Dec 2003, Vince Forgetta wrote:
>
>  
>
>>Hi all,
>>
>>i have seen on some previous posts that you can retrieve the CDS start
>>and stop from a GenBank DNA sequence accessionif the file is stored
>>locally and read in using Bio::SeqIO. How would I retrieve the
>>translation start and stop of a GenBank accession downloaded using
>>Bio::DB::GenBank. For example, the code below does not seem to find a
>>tag "translation":
>>
>>use Bio::DB::GenBank;
>>my $gb = new Bio::DB::GenBank;
>>my $seq;
>> my $accession;
>> $seq = $gb->get_Seq_by_acc($accession);
>> while (not(defined($seq)));
>>foreach my $feat ($seq->all_SeqFeatures()){
>>        my $CDS = "";
>>        if ($feat->has_tag('translation')){
>>        $CDS = $feat->start."..".$feat->end;
>>        return "$CDS\n";
>>    }else{
>>        return "Not found\n";
>>    }
>>
>>
>>Thank you for your time.
>>
>>_______________________________________________
>>Bioperl-l mailing list
>>Bioperl-l at portal.open-bio.org
>>http://portal.open-bio.org/mailman/listinfo/bioperl-l
>>
>>    
>>
>
>--
>Jason Stajich
>Duke University
>jason at cgt.mc.duke.edu
>
>  
>


-- 
+-----------------------------------------------------------+
|  Vincenzo Forgetta                                        |
|  Computational Biology                                    |
|  McGill University and Genome Quebec Innovation Centre    |
|  740 Dr. Penfield Avenue                                  |
|  Room 7211                                                |
|  Montreal, Quebec Canada, H3A 1A4                         |
|  Tel: 514-398-3311 00476                                  |
|  Email: vince.forgetta at staff.mcgill.ca                    |
+-----------------------------------------------------------+





More information about the Bioperl-l mailing list