pubchemInchikey2sdf: Query pubchem by InChIKeys sttrings and get SDF back

View source: R/pubchem_calls.R

pubchemInchikey2sdfR Documentation

Query pubchem by InChIKeys sttrings and get SDF back

Description

Use PubChem API to get CIDs by InChIKeys

Usage

pubchemInchikey2sdf(inchikeys)

Arguments

inchikeys

Character vector, InChIKey strings.

Value

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.

Author(s)

Le Zhang

References

PubChem PUG REST: https://pubchem.ncbi.nlm.nih.gov/pug_rest/PUG_REST_Tutorial.html

Examples

	## 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)

girke-lab/ChemmineR documentation built on July 28, 2023, 10:36 a.m.