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

Module DBIdsClient

source code

Search and retrieve information given a set of database identifiers.

EUtils has two major modes. One uses history while the other uses database identifiers. This is a high-level interface for working with identifiers. You should use this module to get information about a set of known database identifiers.

See HistoryClient if you want to work with a large number of identifiers or potentially large search results.

>>> from Bio import EUtils
>>> from Bio.EUtils import DBIdsClient
>>> client = DBIdsClient.DBIdsClient()
>>> result = client.search("dalke", retmax = 100)
>>> len(result)
30
>>> print result[0].efetch(retmode = "text", rettype = "abstract").read()

1: Pac Symp Biocomput 1997;:85-96

Using Tcl for molecular visualization and analysis.

Dalke A, Schulten K.

Beckman Institute, Urbana, IL 61801, USA.

Reading and manipulating molecular structure data is a standard task in every molecular visualization and analysis program, but is rarely available in a form readily accessible to the user. Instead, the development of new methods for analysis, display, and interaction is often achieved by writing a new program, rather than building on pre-existing software. We present the Tcl-based script language used in our molecular modeling program, VMD, and show how it can access information about the molecular structure, perform analysis, and graphically display and animate the results. The commands are available to the user and make VMD a useful environment for studying biomolecules.

PMID: 9390282 [PubMed - indexed for MEDLINE]

>>>

Find sequences similar to GI:4579714 which were published in 2002.

>>> protein = DBIdsClient.from_dbids(EUtils.DBIds("protein", "4579714"))
>>> neighbors = protein.neighbor_links("protein",
...        daterange = EUtils.DateRange("2002/01/01", "2002/12/31", "pdat"))
>>> dbids = neighbors.linksetdbs["protein_protein"].dbids
>>> len(dbids)
28
>>> print dbids
DBIds(u'protein', [u'4579714', u'25298947', u'24158913', u'24158914', u'24158915', u'17942993', u'17942994', u'17942995', u'20150921', u'20150922', u'20151159', u'25298949', u'19716034', u'20663737', u'20663738', u'20663741', u'24987328', u'25533128', u'25298946', u'25298948', u'23008597', u'20219020', u'21218340', u'21218344', u'19075395', u'21218338', u'21218342', u'21311795'])
>>> 
>>> print client.from_dbids(dbids[:5]).efetch(retmode="text",
...                                           rettype="summary").read()

1: BAA75200 Bacteriorhodopsin [Halobacterium sp.] gi|4579714|dbj|BAA75200.1|[4579714]

2: H84300 bacteriorhodopsin [imported] - Halobacterium sp. NRC-1 gi|25298947|pir||H84300[25298947]

3: 1M0KA Chain A, Bacteriorhodopsin K Intermediate At 1.43 A Resolution gi|24158913|pdb|1M0K|A[24158913]

4: 1M0LA Chain A, BacteriorhodopsinLIPID COMPLEX AT 1.47 A RESOLUTION gi|24158914|pdb|1M0L|A[24158914]

5: 1M0MA Chain A, Bacteriorhodopsin M1 Intermediate At 1.43 A Resolution gi|24158915|pdb|1M0M|A[24158915]

>>>

Classes [hide private]
  DBIdsLookup
Look up information about a DBIds
  DBIdsRecord
A single record on the server
  SequenceDBIdsFetchMixin
Support 'efetch' for sequence records
  SequenceDBIdsRecord
a single sequence record, referenced by database identifier
  PublicationDBIdsFetchMixin
Support 'efetch' for publication records
  PublicationDBIdsRecord
a single publication record, referenced by database identifier
  BaseDBIdsRecordSet
Base class for dealing with a set of records, reference by identifier
  SequenceDBIdsRecordSet
a set of sequence records, referenced by database identifier
  PublicationDBIdsRecordSet
a set of publication records, referenced by database identifier
  DBIdsClient
Create a RecordSet either from a search or a set of dbids
Functions [hide private]
 
_get_recordset_constructor(db, dbtype)
get the right DataSet constructor for a database
source code
 
from_dbids(dbids, dbtype=None, eutils=None)
create a RecordSet interface for the set of database identifiers
source code
Variables [hide private]
  __package__ = 'Bio.EUtils'
Function Details [hide private]

from_dbids(dbids, dbtype=None, eutils=None)

source code 
create a RecordSet interface for the set of database identifiers

Parameters are:
  dbids -- a DBIds
  dbtype -- the dbtype to use (EUtils.Config.{SEQUENCE,PUBLIATION}_TYPE)
       in case dbids.db isn't in the list of know NCBI databases.
       Defaults to None.
  eutils -- the ThinClient to use, defaults to creating a new
       ThinClient.ThinClient()