Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a R code set to use PubMed ID or DOI to get data files for that article, please?

I am trying to get the data file names from NCBI or PubMed that are related or attached to hundreds of unique DOIs or PMIDs, in R language. For example. I have PMID: 19122651 and, I want to get the names of the three GSEs connected to it, which are: GSE12781,GSE12782, and GSE12783. I have searched various sources and packages to no avail.
Appreciate your assistance.

like image 567
Shawn Avatar asked Oct 29 '25 01:10

Shawn


2 Answers

You can do this using the rentrez package.

The required function is entrez_link.

Example:

library(rentrez)

results <- entrez_link(dbfrom = 'pubmed', id = 19122651, db = 'gds')

results$links$pubmed_gds
[1] "200012783" "200012782" "200012781"

The 3 results are the IDs for the associated GEO Dataset records. You can convert them to GSE accessions using entrez_summary.

Here's a somewhat ugly sapply that may serve as the basis for a function:

sapply(results$links$pubmed_gds, function (id) entrez_summary("gds", id)$accession, 
       USE.NAMES = FALSE)

[1] "GSE12783" "GSE12782" "GSE12781"
like image 99
neilfws Avatar answered Oct 30 '25 17:10

neilfws


You can query NCBI via rentrez package as described here. Function entrez_link() should be able to find cross-references

like image 37
Oka Avatar answered Oct 30 '25 17:10

Oka



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!