Python interface to the Chemical Translation Service (CTS), which is a Chemical Translation Service that performs batch conversions of the most common compound identifiers, including CAS, CHEBI, compound formulas, Human Metabolome Database HMDB, InChI, InChIKey, IUPAC name, KEGG, LipidMaps, PubChem CID+SID, SMILES and chemical synonym names.
pip install requests
pip install tqdm
pip install bs4
pip install CTSgetPy
or
pip install git+https://github.com/hcji/CTSgetPy@master
from CTSgetPy import CTSgetPy
CTSgetPy.CTS_options()
# single target, single identifier
CTSgetPy.CTSget('KEGG', 'PubChem SID', 'C00001', top_only=True)
CTSgetPy.CTSget('KEGG', 'PubChem SID', 'C00001', top_only=False)
# multi targets, single identifier
CTSgetPy.CTSget('KEGG', ['PubChem CID', 'PubChem SID'], 'C00001')
# multi target, multi identifiers
CTSgetPy.CTSget('KEGG', ['PubChem CID', 'PubChem SID'], ['C00001', 'C00002'])