Question: Entrez esearch term format
1
gravatar for smiller
2.4 years ago by
smiller70
United States
smiller70 wrote:

I'm using biopython to perform an Entrez esearch of the NCBI taxonomy database. The term is the exact string as it appears in the database.

Entrez.read(Entrez.esearch(db='Taxonomy', term="Cupriavidus sp. HPC(L)"))

returns

{'QueryTranslation': 'Cupriavidus sp. HPC[All Names] AND (L[All Names])', 'IdList': [], 'Count': '0', 'RetStart': '0', 'ErrorList': {'FieldNotFound': [], 'PhraseNotFound': ['Cupriavidus', 'sp.', 'HPC', 'L']}, 'RetMax': '0', 'TranslationSet': [], 'WarningList': {'PhraseIgnored': [], 'QuotedPhraseNotFound': [], 'OutputMessage': ['No items found.']}}

This should return information on TaxID 1217418.

Thanks in advance.

ADD COMMENTlink modified 2.4 years ago • written 2.4 years ago by smiller70

I can replicate this empty results using NCBI commandline utils, it'd be interesting to find out how to tackle this.

esearch -db taxonomy -query "Cupriavidus sp HPC(L)"
ADD REPLYlink written 2.4 years ago by Sej Modha4.5k
2
gravatar for smiller
2.4 years ago by
smiller70
United States
smiller70 wrote:

SIMPLE AND OBVIOUS SOLUTION:

Enclose the search term in double quotes to make it literal.

Entrez.read(Entrez.esearch(db='Taxonomy', term="\"Cupriavidus sp. HPC(L)\""))

correctly returns

{'RetStart': '0', 'TranslationStack': [{'Count': '1', 'Field': 'All Names', 'Term': '"Cupriavidus sp. HPC(L)"[All Names]', 'Explode': 'N'}, 'GROUP'], 'IdList': ['1217418'], 'TranslationSet': [], 'Count': '1', 'RetMax': '1', 'QueryTranslation': '"Cupriavidus sp. HPC(L)"[All Names]'}

ADD COMMENTlink written 2.4 years ago by smiller70
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1872 users visited in the last hour