Package Bio :: Package EUtils :: Module DBIdsClient :: Class DBIdsClient
[show private | hide private]
[frames | no frames]

Class DBIdsClient


Create a RecordSet either from a search or a set of dbids

The constructor takes an optional ThinClient to use for connecting to NCBI.
Method Summary
  __init__(self, eutils)
  from_dbids(self, dbids, dbtype)
Return a RecordSet given the DBIds
  search(self, term, db, field, retstart, retmax, daterange, dbtype)
do an Entrez search The parameters are: 'term' -- the query string in the Entrez query language; see http://www.ncbi.nlm.nih.gov/entrez/query/static/help/pmhelp.html 'db' -- the database to search 'field' -- the field to use for unqualified words Eg, "dalke[au] AND gene" with field==None becomes dalke[au] AND (genes[MeSH Terms] OR gene[Text Word] and "dalke[au] AND gene" with field=="au" becomes dalke[au] AND genes[Author] (Yes, I think the first "au" should be "Author" too) 'retstart' -- include identifiers in the output, starting with position 'retstart' (normally starts with 0) 'retmax' -- return at most 'retmax' identifiers in the output (if not specified, NCBI returns 20 identifiers) 'daterange' -- a date restriction; either WithinNDays or DateRange 'dbtype' -- (optional) the database type (Config.PUBLICATION_TYPE or SEQUENCE_TYPE).

Method Details

from_dbids(self, dbids, dbtype=None)

Return a RecordSet given the DBIds

This RecordSet can be used to fetch data from NCBI related to the given DBIds.

search(self, term, db='pubmed', field=None, retstart=0, retmax=20, daterange=None, dbtype=None)

do an Entrez search

The parameters are:
  'term' -- the query string in the Entrez query language; see
     http://www.ncbi.nlm.nih.gov/entrez/query/static/help/pmhelp.html
  'db' -- the database to search

  'field' -- the field to use for unqualified words
          Eg, "dalke[au] AND gene" with field==None becomes
            dalke[au] AND (genes[MeSH Terms] OR gene[Text Word]
          and "dalke[au] AND gene" with field=="au" becomes
            dalke[au] AND genes[Author]
         (Yes, I think the first "au" should be "Author" too)

  'retstart' -- include identifiers in the output, starting with
           position 'retstart' (normally starts with 0)
  'retmax' -- return at most 'retmax' identifiers in the output
           (if not specified, NCBI returns 20 identifiers)
  'daterange' -- a date restriction; either WithinNDays or DateRange
  
  'dbtype' -- (optional) the database type (Config.PUBLICATION_TYPE
          or SEQUENCE_TYPE).  Overrides the type based on the 'db'

Generated by Epydoc 2.1 on Thu Jun 30 22:05:34 2005 http://epydoc.sf.net