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

Class DBIdsClient

source code

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

The constructor takes an optional ThinClient to use for connecting to NCBI.

Instance Methods [hide private]
 
__init__(self, eutils=None) source code
 
from_dbids(self, dbids, dbtype=None)
Return a RecordSet given the DBIds
source code
 
search(self, term, db='pubmed', field=None, retstart=0, retmax=20, daterange=None, dbtype=None)
do an Entrez search
source code
Method Details [hide private]

from_dbids(self, dbids, dbtype=None)

source code 

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)

source code 
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'