[BioPython] GenBank.search_for

Jeffrey Chang jchang@smi.stanford.edu
Mon, 20 May 2002 23:54:02 -0700


On Mon, May 20, 2002 at 02:44:53PM -0600, Josh Wilcox wrote:
>   Hello there wonderful biop. community.
>   I've been using the search_for function from the GenBank module.  I've noticed
> that by selecting the "limits" option during a manual Entrez search I can set
> dates such that the query only looks at a subset of the GenBank data.  I know
> very little (read nothing) about CGI and I was wandering if biopython had any
> functionality that could be used with search_for to also set the various options
> at the "limited to" address:
> 
>   (http://www.ncbi.nlm.nih.gov/entrez/query.fcgi?CMD=Limits&DB=nucleotide)

Right now, no.  I implemented the interface documented at:
http://www.ncbi.nlm.nih.gov/entrez/query/static/linking.html
which doesn't include limiting by things such as dates.

Implementing it requires parsing out the page of the Entrez search to
figure out which parameters to pass.  However, that hasn't been done
yet.


>   Also, while I have your attention, (and this question might be
> more properly addressed to NCBI) are there any biop. utilities that
> would allow me to grab, or at least locate Fasta records at NCBI by
> their gi numbers?

Try something like (untested):
>>> From Bio import GenBank
>>> GENBANK = GenBank.NCBIDictionary()
>>> GENBANK.format = "FASTA"
>>> print GENBANK[***INSERT GI NUMBER***]

Jeff