[Bioperl-l] Extract genomic data from GenBank

Will Bryant w.bryant at ucl.ac.uk
Mon Jun 1 08:06:58 UTC 2009


I'm trying to retrieve the complete GenBank format sequence file for a 
specified bacterium using get_Seq_by_gi, but I keep getting 'gi does not 
exist' errors, even when trying the example gi '405830'.  The script was 
running fine September last year, but when I came back to it this week 
it wasn't working.  Am I missing something obvious?

In case it's important, I'm using ActivePerl 5.10.0, bioperl 1.5.2_100

Code:

#!/usr/bin/perl -w

use strict;
use Bio::Perl;
use Bio::DB::GenBank;

my $gb = new Bio::DB::GenBank(-db => 'genome', -format => 'genbank');

my $straincomp = $gb->get_Seq_by_gi('405830');

my $seqout = 0;

#my $set_output_file = '$seqout = Bio::SeqIO->new( -format => 
\'genbank\', -file => 
\'>c:\\phd\\modelling\\working\\gi'.$ARGV[0].'_data.gb\');';

#print $set_output_file;
eval ($set_output_file);

$seqout -> write_seq($straincomp);


Error:

------------- EXCEPTION: Bio::Root::Exception -------------
MSG: gi does not exist
STACK: Error::throw
STACK: Bio::Root::Root::throw c:/perl/site/lib/Bio/Root/Root.pm:359
STACK: Bio::DB::WebDBSeqI::get_Seq_by_gi 
c:/perl/site/lib/Bio/DB/WebDBSeqI.pm:209
STACK: c:\phd\modelling\perl_scripts\retrieve_genome_data.pl:12
-----------------------------------------------------------

Many thanks,

Will Bryant.



More information about the Bioperl-l mailing list