I've been unable to find documentation on how to control explosion of terms when conducting a Biopython search of Medline/PubMed.
For example, if I search for surgery, oral [MH] on PubMed, it finds 69,926 matching publications. (PubMed is said to automatically explode terms.)
https://pubmed.ncbi.nlm.nih.gov/?term=surgery%2C+oral+%5BMH%5D&sort=date&show_snippets=off
But the code below returns a count of only 8561 publications. Even more puzzling, the translation stack in the output appears to claim that the term was exploded.
import Bio.Entrez as Entrez
import pprint
search_handle = Entrez.esearch(
db = "pubmed",
term = "surgery, oral [MH]",
rettype = 'uilist',
retmax = 1,
)
search_results = Entrez.read(search_handle)
search_handle.close()
pprint.pprint( search_results.items() )
Here is the output:
[(u'Count', '8561'),
(u'RetMax', '1'),
(u'IdList', ['33499855']),
(u'TranslationStack',
[{u'Count': '8561', u'Field': 'MeSH Terms', u'Term': '"surgery, oral"[MeSH Terms]', u'Explode': 'Y'}, 'GROUP']),
(u'TranslationSet',
[{u'To': '"surgery, oral"[MeSH Terms]', u'From': 'surgery, oral[MH]'}]),
(u'RetStart', '0'),
(u'QueryTranslation', '"surgery, oral"[MeSH Terms]')]
How do I force Biopython to ask Medline to explode the term? This is Biopython 1.75. I am limited to Python 2.7.
Thank you.
from Controlling term explosion with Biopython
No comments:
Post a Comment