Back to index

python-biopython  1.60
Functions | Variables
query_pubmed Namespace Reference

Functions

def print_usage

Variables

list query = args[0]
 show_help = False
 count_only = False
tuple handle = Entrez.esearch(db="pubmed", term=query)
tuple search_results = Entrez.read(handle)
list ids = search_results["IdList"]
tuple count = len(ids)
list webenv = search_results["WebEnv"]
list query_key = search_results["QueryKey"]
int batch_size = 3
tuple end = min(count, start+batch_size)
tuple fetch_handle
tuple data = fetch_handle.read()

Function Documentation

Definition at line 13 of file query_pubmed.py.

00013 
00014 def print_usage():
00015     print """query_pubmed.py [-h] [-c] [-d delay] query
00016 
00017 This script sends a query to PubMed (via the NCBI Entrez webservice*)
00018 and prints the MEDLINE formatted results to the screen.
00019 
00020 Arguments:
00021     -h           Print out this help message.
00022     -c           Count the hits, and don't print them out.
00023 
00024 * http://www.ncbi.nlm.nih.gov/Entrez/
00025 """


Variable Documentation

Definition at line 66 of file query_pubmed.py.

tuple query_pubmed.count = len(ids)

Definition at line 58 of file query_pubmed.py.

Definition at line 38 of file query_pubmed.py.

tuple query_pubmed.data = fetch_handle.read()

Definition at line 74 of file query_pubmed.py.

Definition at line 68 of file query_pubmed.py.

Initial value:
00001 Entrez.efetch(db="pubmed", rettype="medline",
00002                                      retmode="text",
00003                                      retstart=start, retmax=batch_size,
00004                                      webenv=webenv, query_key=query_key)

Definition at line 70 of file query_pubmed.py.

tuple query_pubmed.handle = Entrez.esearch(db="pubmed", term=query)

Definition at line 53 of file query_pubmed.py.

list query_pubmed.ids = search_results["IdList"]

Definition at line 57 of file query_pubmed.py.

list query_pubmed.query = args[0]

Definition at line 35 of file query_pubmed.py.

Definition at line 65 of file query_pubmed.py.

tuple query_pubmed.search_results = Entrez.read(handle)

Definition at line 56 of file query_pubmed.py.

Definition at line 37 of file query_pubmed.py.

Definition at line 64 of file query_pubmed.py.