[Bioperl-l] using Bio::DB::GenBank get translation
Vince Forgetta
vince.forgetta at staff.mcgill.ca
Fri Dec 12 10:13:01 EST 2003
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.
More information about the Bioperl-l
mailing list