[Bioperl-l] problem!

Brian Osborne brian_osborne at cognia.com
Tue Sep 6 10:10:17 EDT 2005


thechans,

Your code works fine for me, bioperl-live, it's possible there's something
odd about your Genbank file.

Brian O.


On 9/3/05 8:58 AM, "thechans at citiz.net" <thechans at citiz.net> wrote:

> Hi,
> 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.
> 
> #Begin
> use Bio::Seq;
> use Bio::Index::GenBank;
> 
> my $inx1 = Bio::Index::GenBank->new('-filename' => 'multiple.gb.idx',
> -write_flag => 1 );
> $inx1->make_index('multiple.gb');
> 
> @ids=$inx1->get_all_primary_ids;
> print $ids[1],"\n";
> print $ids[0],"\n";
> 
> my $seq1 = $inx1->get_Seq_by_primary_id($ids[1]);
> print "$ids[1]:",$seq1->seq,"\n";
> 
> #End 
> 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?
> 
> 
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at portal.open-bio.org
> http://portal.open-bio.org/mailman/listinfo/bioperl-l




More information about the Bioperl-l mailing list