get the Therapeutic Uses and Pharmacology and Biochemistry for some CIDs from pubchem in R or python.
1
0
Entering edit mode
9.4 years ago
Zhilong Jia ★ 2.2k

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

examples: 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 Parsing Pubchem Compound Records, but I want to get the information from the website directly. Thank you.

cheminformatics pubchem R • 2.5k views
ADD COMMENT
1
Entering edit mode
9.4 years ago
zero323 ▴ 30
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 COMMENT
0
Entering edit mode

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 REPLY

Login before adding your answer.

Traffic: 1607 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6