gpt4 book ai didi

ncbi - 如何从 pubmed data ncbi 下载所有抽象数据

转载 作者:行者123 更新时间:2023-12-03 08:12:15 25 4
gpt4 key购买 nike

我想下载所有发布的数据摘要。
有谁知道我如何轻松下载所有已发表的文章摘要?

我得到了数据的来源:
ftp://ftp.ncbi.nlm.nih.gov/pub/pmc/af/12/

反正有没有下载所有这些tar文件..

提前致谢。

最佳答案

有一个包叫 rentrez https://ropensci.org/packages/ .看一下这个。您可以通过特定关键字或 PMID 等检索摘要,希望对您有所帮助。

更新:您可以通过使用以下代码传递您的 IDS 列表来下载所有摘要。

    library(rentrez)
library(xml)

your.ids <- c("26386083","26273372","26066373","25837167","25466451","25013473")
# rentrez function to get the data from pubmed db
fetch.pubmed <- entrez_fetch(db = "pubmed", id = your.ids,
rettype = "xml", parsed = T)
# Extract the Abstracts for the respective IDS.
abstracts = xpathApply(fetch.pubmed, '//PubmedArticle//Article', function(x)
xmlValue(xmlChildren(x)$Abstract))
# Change the abstract names with the IDS.
names(abstracts) <- your.ids
abstracts
col.abstracts <- do.call(rbind.data.frame,abstracts)
dim(col.abstracts)
write.csv(col.abstracts, file = "test.csv")

关于ncbi - 如何从 pubmed data ncbi 下载所有抽象数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33519399/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com