Bio::Db::Genbank With Coordinates Reports A Strange Error
1
0
Entering edit mode
12.8 years ago
Puriney ▴ 150

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/Root.pm:368
STACK: Bio::DB::WebDBSeqI::get_Seq_by_acc     /usr/local/share/perl/5.10.1/Bio/DB/WebDBSeqI.pm:195
STACK: test_gene_bank_with_sublocation.pl:26*

As NM_000344 does exists (http://www.ncbi.nlm.nih.gov/nuccore/NM_000344.3), 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 • 3.1k views
ADD COMMENT
2
Entering edit mode
12.8 years ago
Neilfws 49k

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

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

ADD COMMENT

Login before adding your answer.

Traffic: 1660 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6