pubchemInchikey2sdf {ChemmineR} | R Documentation |
Use PubChem API to get CIDs by InChIKeys
pubchemInchikey2sdf(inchikeys)
inchikeys |
Character vector, InChIKey strings. |
a list of 2 items. the first item "sdf_set" is a 'SDFset' object. It contains all queried and successful SDF infomation. The second item "sdf_index" is a named numeric vector. It records whether all input InChIKeys have successful returns in the 'SDFset' object. If so, a non-zero value is returned as the index of where it exists in the 'SDFset' object, if not, 0 is returned.
Le Zhang
PubChem PUG REST: https://pubchem.ncbi.nlm.nih.gov/pug_rest/PUG_REST_Tutorial.html
## Not run: ## fetch 2 compounds from PubChem inchikeys <- c( "ZFUYDSOHVJVQNB-FZERPYLPSA-N", "KONGRWVLXLWGDV-BYGOPZEFSA-N", "AANKDJLVHZQCFG-WLIQWNBFSA-N", "SNFRINMTRPQQLE-JQWAAABSSA-N" ) pubchemInchikey2sdf(inchikeys) ## End(Not run)