[Bioperl-l] problem!

thechans at citiz.net thechans at citiz.net
Sat Sep 3 08:58:36 EDT 2005

My goal is to use Bio::Index::GenBank to index a flat-file gb file(multiple seqs) and then retrieve the sequence. The following is a pre test but receives unpredicable result.

use Bio::Seq;
use Bio::Index::GenBank;

my $inx1 = Bio::Index::GenBank->new('-filename' => 'multiple.gb.idx', -write_flag => 1 );

print $ids[1],"\n";
print $ids[0],"\n";

my $seq1 = $inx1->get_Seq_by_primary_id($ids[1]);
print "$ids[1]:",$seq1->seq,"\n";

The final screen shows the two right primary ids. But other is blank and MSG:Can't call method "seq" on an undefined value at D:\local\tempidx.pl

it is a very simple test. I find no err in the program and in fact if i change the same code with Bio::Index::Fasta with corresponding fasta file it is OK.

where is the problem and How to solve it?

More information about the Bioperl-l mailing list