Question: get the Therapeutic Uses and Pharmacology and Biochemistry for some CIDs from pubchem in R or python.
0
gravatar for Zhilong Jia
5.9 years ago by
Zhilong Jia1.6k
London
Zhilong Jia1.6k wrote:

How to get the Therapeutic Uses and Pharmacology and Biochemistry inforamtion for  a list of CIDs from pubchem in R or python. 

expamles: The CID is 3372, and the url is as following 

https://pubchem.ncbi.nlm.nih.gov/compound/3372#section=Drug-and-Medication-Information

How to get the Therapeutic Uses and Pharmacology and Biochemistry section ? Since the web includes javascript, function htmlParse in package XML of R does not work.

Similar question is C: Parsing Pubchem Compound RecordsC: Parsing Pubchem Compound Records, but I want to get the information from the website directly. Thank you.

cheminformatics R pubchem • 1.7k views
ADD COMMENTlink modified 5.9 years ago by zero32320 • written 5.9 years ago by Zhilong Jia1.6k
1
gravatar for zero323
5.9 years ago by
zero32320
Poland
zero32320 wrote:
Is there any reason why you cannot use PubChem PUG ( https://pubchem.ncbi.nlm.nih.gov/pug_rest/PUG_REST_Tutorial.html )? Something like this: https://github.com/zero323/r-snippets/blob/master/R/pubchem_drug_and_medication_information.R should work, although Therapeutic Uses and Pharmacology section seems to be rather loosely structured.
ADD COMMENTlink modified 5.9 years ago • written 5.9 years ago by zero32320

Actually, the API should be pug_view (from you code and from the download link in pubchem). Like https://pubchem.ncbi.nlm.nih.gov/rest/pug_view/data/compound/2244/JSON . Indeed,  Uses and Pharmacology section seems to be rather loosely structured. Thank you. 

ADD REPLYlink modified 5.9 years ago • written 5.9 years ago by Zhilong Jia1.6k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1840 users visited in the last hour