[Bioperl-l] Bio::DB::Query::GenBank

Lincoln Stein lstein at cshl.org
Mon May 12 12:00:59 EDT 2003


It does work, but NCBI has tightened up its interface so that
you now to have specificy the nucleotide database explicitly.  I have changed the 
example in the module to read:

 # get a stream via a query string
    my $query = Bio::DB::Query::GenBank->new(-query   =>'Oryza sativa[Organism] AND EST',
                                             -reldate => '30',
					     -db      => 'nucleotide');
    my $seqio = $gb->get_Stream_by_query($query);

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

Right now, trying to fetch all the ESTs (without a reldate argument) is giving me a 
timeout on the NCBI server.

Lincoln

On Tuesday 06 May 2003 03:46 pm, Josh Lauricha wrote:
> Using the following code (From the Bio::DB::Query::GenBank doc):
> #!/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";
> }
>
> I get the following error:
> Warning(s) from GenBank:
>                 <FieldNotFound>Organism</FieldNotFound>
>
> However, if I goto www.ncbi.nih.gov and type in:
> 'Oryza sativa[Organism] AND EST'
> I get something around 18k hits in both the nucleotide and protien
> databases.
>
> I need to find more information about some sequences, I hope to find
> their gi numbers. However, none of the data I have is specific to the
> genes, so my thought was to search for the org name the seq are from,
> then to compare the seq from genbank to the ones I have.
>
> I have:
> 1) An accession number that seems to be the GenBank LOCUS id, which
>    is not a valid search field.
> 2) A nick name similar to SWProt's, but not identical.
> 3) For most, a SWProt accession
> 4) A description.
> 5) The sequence.
>
> Any ideas on why the query didn't work or a better way to get the GIs
> than just searching by hand?
>
> Thanks,
> Josh Lauricha
>
>
>
>
>
>
> _______________________________________________
> Bioperl-l mailing list
> Bioperl-l at bioperl.org
> http://pw600a.bioperl.org/mailman/listinfo/bioperl-l

-- 
Lincoln Stein
lstein at cshl.org
Cold Spring Harbor Laboratory
1 Bungtown Road
Cold Spring Harbor, NY 11724
(516) 367-8380 (voice)
(516) 367-8389 (fax)



More information about the Bioperl-l mailing list