reactome / ReactomeGraph4R

R package for interfacing with a Reactome Graph Database
Other
6 stars 2 forks source link

Search for PubMed paper #4

Closed chilampoon closed 4 years ago

chilampoon commented 4 years ago

I found a package called easyPubMed for downloading Entrez records, but it needs to input a PubMed search term like Bladder[TIAB] AND Northwestern[AD] AND Chicago[AD] AND "2018"[PDAT] to get PubMed ids, which is not very useful for information in the 'literatureReference' attribute.

I later found another function pubmed() quite convenient (in the annotate library) and gave it a try:

BiocManager::install("annotate")
library(annotate)
pubmed(10710310, disp="browser")
pubmed(10710310, disp="data")

disp: Either "Data" or "Browser" (default is data). Data returns a XMLDoc, while Browser will display information in the user's browser.

I am not sure what your expectation is so I just open an issue here, and I think this can be mentioned in the vignette and no need to wrap into a function in the package...

cookersjs commented 4 years ago

So, I still need to look into this to find the specific classes that need to be looked into, but basically how this could go is:

1) The user can provide a PubMed identifier to the query 2) You will need to either:

I think the second option is the quickest, but the main problem is connecting that 'LiteratureReference' instance to the Event or PhysicalEntity instances in the databases. Ideally you would do something like:

  1. Find LiteratureReference instance where attribute 'pubMedIdentifier' is equal to user-submitted PMID. Take the LiteratureReferences DBID
  2. Query the Database/Content Service for instances where 'literatureReference' attribute contains the LiteratureReference DBID found in 1).
  3. Return all instances that contain the searched-for PubMed ID in their 'literatureReference' attribute.
    • Additional functionality could include submitting the returned instances into existing functions to output things like Reactions/Pathways the PMID is found in.
cookersjs commented 4 years ago

Actually, you can see what classes contain the literatureReference attribute at https://reactome.org/content/schema/LiteratureReference (Referrals of class 'literatureReference' instances). It seems only relevant class we care about is the 'Event' class.

chilampoon commented 4 years ago

I guess inputting the pubmed id into /search/query would get instances where 'literatureReference' slot contains this pubmed id?

cookersjs commented 4 years ago

I guess inputting the pubmed id into /search/query would get instances where 'literatureReference' slot contains this pubmed id?

Perhaps -- have you been able to check if that works?

chilampoon commented 4 years ago

Is this issue be solved in the ContentService package or moved to the graph db package?

cookersjs commented 4 years ago

That depends -- it seemed like you were able to do the search in a basic, time-consuming way. Do you think there is a version of this query that can be done quickly via CS, or will it be too difficult to do efficiently?