diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/pub_med.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/pub_med.py b/scripts/pub_med.py index 4b5a19b..82b1730 100644 --- a/scripts/pub_med.py +++ b/scripts/pub_med.py @@ -34,6 +34,7 @@ def fetch_pub_details(id_list, db_name, retmode="xml", email="alexanderkabua@gma return [] + def extract_pub_metadata(papers): """ Extract metadata from PubMed papers. @@ -70,12 +71,12 @@ def extract_pub_metadata(papers): return metadata -def fetch_pubmed_id(query, db_name, max_search_count, ret_mode="xml", email="alexanderkabua@gmail.com"): +def fetch_pubmed_id(query, db_name, max_search_count, retmode="xml", email="alexanderkabua@gmail.com"): """method to fetch the id for a given search in pubmed""" Entrez.email = email handle = Entrez.esearch(db=db_name, sort="relevance", - retmax=max_search_count, ret_mode=ret_mode, term=query) + retmax=max_search_count, retmode=retmode, term=query) results = Entrez.read(handle) handle.close() if results.get("IdList"): |