类似的 pubmed 文章来自 pubmed api
similar pubmed articles via pubmed api
是否有可能在给定 pmid 的情况下获得类似的 pubmed 文章。例如此 link 显示右侧的类似文章。
您可以使用 NCBI API. The command you are looking for is neighbor_score
. Alternatively you can get the data directly via the URL.
使用 BioPython 来完成
from Bio import Entrez
Entrez.email = "Your.Name.Here@example.org"
handle = Entrez.elink(db="pubmed", id="26998445", cmd="neighbor_score", rettype="xml")
records = Entrez.read(handle)
scores = sorted(records[0]['LinkSetDb'][0]['Link'], key=lambda k: int(k['Score']))
#show the top 5 results
for i in range(1, 6):
handle = Entrez.efetch(db="pubmed", id=scores[-i]['Id'], rettype="xml")
record = Entrez.read(handle)
print(record)
是否有可能在给定 pmid 的情况下获得类似的 pubmed 文章。例如此 link 显示右侧的类似文章。
您可以使用 NCBI API. The command you are looking for is neighbor_score
. Alternatively you can get the data directly via the URL.
from Bio import Entrez
Entrez.email = "Your.Name.Here@example.org"
handle = Entrez.elink(db="pubmed", id="26998445", cmd="neighbor_score", rettype="xml")
records = Entrez.read(handle)
scores = sorted(records[0]['LinkSetDb'][0]['Link'], key=lambda k: int(k['Score']))
#show the top 5 results
for i in range(1, 6):
handle = Entrez.efetch(db="pubmed", id=scores[-i]['Id'], rettype="xml")
record = Entrez.read(handle)
print(record)