[Bioperl-l] Extract genomic data from GenBank

Will Bryant w.bryant at ucl.ac.uk
Mon Jun 1 04:06:58 EDT 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


#!/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 => 

#print $set_output_file;
eval ($set_output_file);

$seqout -> write_seq($straincomp);


------------- 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 
STACK: c:\phd\modelling\perl_scripts\retrieve_genome_data.pl:12

Many thanks,

Will Bryant.

More information about the Bioperl-l mailing list