[Bioperl-l] Bio::DB::GenBank->get_Stream_by_query

Josh Lauricha laurichj at bioinfo.ucr.edu
Thu May 1 15:10:00 EDT 2003


I am trying to fetch seqs from GenBank using the get_Stream_by_query(),
however the following code gives me an error:

#!/usr/bin/perl -w
use Bio::DB::GenBank;
use Bio::SeqIO;
use strict;

my $gb     = new Bio::DB::GenBank;
my $seqin  = new Bio::SeqIO(-format => 'efa');
my $seqout = new Bio::SeqIO(-format => 'efa');

my $seqio = $gb->get_Stream_by_query('Oryza sativa[Organism] AND EST');

while( my $seq =  $seqio->next_seq ) {
	          print "seq length is ", $seq->length,"\n";
}


The error is:

Warning(s) from GenBank: 
                <FieldNotFound>Organism</FieldNotFound>


Any thoughts? Tying the query into www.ncbi.nlm.nih.gov gives the
correct results.

Just in case there is another, better way to do this I am trying to find
the GI for a seqence. However, I am limited to basically the TIGR
accession number, a displayname similar to the swissprot name (aka:
something like AtFUT1, where FUT1_ARATH is the swprot name.

My plan was to do a query supplying all the info I have. This returns
numerous results, then I'd compare the sequences and look for a match.

Is there a better way to do this? There are quite a few seqs so I'd
rather not do it by hand.


Thanks,
Josh Lauricha


More information about the Bioperl-l mailing list