Trees | Index | Help |
---|
Package Bio :: Module PubMed |
|
This module provides code to work with PubMed from the NCBI. http://www.ncbi.nlm.nih.gov/PubMed/
Online documentation for linking to PubMed is available at: http://www.ncbi.nlm.nih.gov/PubMed/linking.html
Classes: Dictionary Access PubMed articles using a dictionary interface.
Functions: search_for Search PubMed. find_related Find related articles in PubMed. download_many Download many articles from PubMed in batch mode.Classes | |
---|---|
Dictionary |
Access PubMed using a read-only dictionary interface. |
Function Summary | |
---|---|
download_many(ids, callback_fn[, broken_fn][, delay][, faildelay][, batchsize]) | |
find_related(pmid) -> ids | |
search_for(search[, reldate][, mindate][, maxdate] [, batchsize][, delay][, callback_fn][, start_id][, max_ids]) -> ids |
Function Details |
---|
download_many(ids, callback_fn, broken_fn=None, delay=120.0, faildelay=5.0, batchsize=500, parser=None)download_many(ids, callback_fn[, broken_fn][, delay][, faildelay][, batchsize]) Download many records from PubMed. ids is a list of either the Medline Unique ID or the PubMed ID's of the articles. Each time a record is downloaded, callback_fn is called with the text of the record. broken_fn is an optional function that is called with the id of records that were not able to be downloaded. delay is the number of seconds to wait between requests. batchsize is the number of records to request each time. |
find_related(pmid)find_related(pmid) -> ids Search PubMed for a list of citations related to pmid. pmid can be a PubMed ID, a MEDLINE UID, or a list of those. |
search_for(search, reldate=None, mindate=None, maxdate=None, batchsize=100, delay=2, callback_fn=None, start_id=0, max_ids=None)search_for(search[, reldate][, mindate][, maxdate] [, batchsize][, delay][, callback_fn][, start_id][, max_ids]) -> ids Search PubMed and return a list of the PMID's that match the criteria. search is the search string used to search the database. reldate is the number of dates prior to the current date to restrict the search. mindate and maxdate are the dates to restrict the search, e.g. 2002/01/01. batchsize specifies the number of ids to return at one time. By default, it is set to 10000, the maximum. delay is the number of seconds to wait between queries (default 2). callback_fn is an optional callback function that will be called as passed a PMID as results are retrieved. start_id specifies the index of the first id to retrieve and max_ids specifies the maximum number of id's to retrieve. XXX The date parameters don't seem to be working with NCBI's script. Please let me know if you can get it to work. |
Trees | Index | Help |
---|
Generated by Epydoc 2.1 on Thu Aug 10 20:04:46 2006 | http://epydoc.sf.net |