Reputation: 18638
Is there a way , using Biopython , to find out the update status of the database?
I am trying to do something like this;
I have a list of 100000 medical terms
On the 1st of July I retrieved the ID lists for all 100000 terms.
Today (3rd of July) I would like to know if new articles have been added for any of the 100000 terms.
One way of doing it would be to repeat the entire process (fetch for all 100000 terms) like below;
'termlist' = ['Malaria', 'Flu' ,...........]
for term in termlist:
handle = Entrez.esearch(db = "pubmed", term = 'Malaria')
record = Entrez.read(handle)
record['Count']
Is there a way to find out only the terms which have been updated in pubmed today?
And if my terms are part of that updated list, I would only have to search for the updated terms and not for all 100000 terms.
Upvotes: 1
Views: 170
Reputation: 7443
Here you have all parameters related to the esearch:
http://www.ncbi.nlm.nih.gov/books/NBK25499/#chapter4.ESearch
You are interested in: reldate, datetype, mindate and maxdate. If you pass those parameters to the esearch command, Biopython simply plugs them in the NCBI querying.
# Retrieve the entries of the last 3 days
handle = Entrez.esearch(db = "pubmed", term = 'Malaria',
datetype = "edat", reldate = 3)
# Retrieve the entries between two dates:
handle = Entrez.esearch(db = "pubmed", term = 'Malaria',
mindate = "2014/07/03", maxdate = "2014/07/01")
Also, you can speed up the querying process by joining terms using the syntax:
term = "Malaria+OR+Cancer+OR+Anopheles"
Upvotes: 1