Question: Bio::Db::Genbank With Coordinates Reports A Strange Error
gravatar for Puriney
7.0 years ago by
Puriney150 wrote:

This is the 'official' guide when we just need part sequences with annotations if we know the coordinates. And it seems it can work, but it turns out not to be.

   # don't want the entire sequence or more options
    my $gb = Bio::DB::GenBank->new(-format     => 'Fasta',
                                   -seq_start  => 100,
                                   -seq_stop   => 200,
                                   -strand     => 1,
                                   -complexity => 4);
    my $seqi = $gb->get_Stream_by_query($query);

My test codes are almost copied from the tutorial with a small change.

use strict;
use warnings;
use Bio::DB::GenBank;
my $gb = Bio::DB::GenBank->new (-format => 'genbank', 
                                -seq_start => 1, 
                                 -seq_stop => 2000, 
                                -strand =>1,);
my $seq_obj = $gb->get_Seq_by_acc('NM_000344');
print $seq_obj; #just for test

The error reports:

*MSG: acc NM_000344 does not exist
STACK: Error::throw
STACK: Bio::Root::Root::throw /usr/local/share/perl/5.10.1/Bio/Root/
STACK: Bio::DB::WebDBSeqI::get_Seq_by_acc     /usr/local/share/perl/5.10.1/Bio/DB/

As NM_000344 does exists (, thus I don't know how could this happen. Not only this gene accession number, but also others, even the genome assembly accession number. I've tried GI (get_Seq_by_gi), gene ID (get_Seq_by_id), none of them works. Is this a bug? Or probably did I miss something important?

I've tried both BioPerl (1.6.9) on Ubuntu11.10 with Perl 5.12.4, and BioPerl (1.6.1) on Ubuntu10.04 LTS with Perl 5.10.1. Neither of them works. Look forward to your reply. Thank you.

bioperl genbank • 1.7k views
ADD COMMENTlink modified 4.3 years ago by Biostar ♦♦ 20 • written 7.0 years ago by Puriney150
gravatar for Neilfws
7.0 years ago by
Sydney, Australia
Neilfws48k wrote:

There's a simple solution: NM_000344 is a RefSeq accession, not a GenBank accession.

So you need to use Bio::DB::RefSeq.

ADD COMMENTlink written 7.0 years ago by Neilfws48k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 769 users visited in the last hour