aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorAlexander_Kabui2024-03-18 21:28:40 +0300
committerAlexander_Kabui2024-03-18 21:28:40 +0300
commitf9ed41d842b64eee2ad3a6821ecd15084320bff4 (patch)
tree11227e3612d2cb407e254f44598b65159e1c072c /scripts
parent52402419ccc8bd10d6d432a00149c8dcf5463352 (diff)
downloadgenenetwork3-f9ed41d842b64eee2ad3a6821ecd15084320bff4.tar.gz
pep8 formatting
Diffstat (limited to 'scripts')
-rw-r--r--scripts/pub_med.py5
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"):