我正在使用 BioPython 通过 eutils API 查询 Pubmed 数据库。 esearch
端点有一个排序选项,但 API 文档没有列出这个值的所有选项。
http://www.ncbi.nlm.nih.gov/books/NBK25499/#_chapter4_ESearch_
示例调用:
Entrez.esearch(db="pubmed", term=search_term, rettype=rettype, retmax=retmax,
sort=sort_method)
我知道的值(value)观适用于
sort_method
:但是,我不确定如何指定默认排序顺序,即“最近”;实际上,这似乎是按 Pubmed ID 值排序的。 'recent', 'most recent', 'pmid', 'id', 和 'default' 都给出了 OutputMessage "Unknown sort schema...."。
其他人知道如何明确指定默认顺序吗?
最佳答案
不是 100% 确定我是否正确回答了您的问题。如果您未指定排序顺序,则将使用默认排序顺序。
handle = Entrez.esearch(db="pubmed", term='TRPV1')
records = Entrez.read(handle)
print('\n'.join(records['IdList']))
将按照与 PubMed 网页上相同的顺序为您提供 ID。
关于python - Pubmed eutils esearch 的排序选项?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33838552/