Biostar Beta. Not for public use.
get the Therapeutic Uses and Pharmacology and Biochemistry for some CIDs from pubchem in R or python.
0
Entering edit mode
13 months ago
Zhilong Jia ♦ 1.4k
London

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

ADD COMMENTlink
1
Entering edit mode
5.5 years ago
zero323 • 20
Poland
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
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 REPLYlink

Login before adding your answer.

Similar Posts
Loading Similar Posts
Powered by the version 2.1