Handle mapping to properties with a bad CID
jjjermiah opened this issue · comments
Jermiah Joseph commented
AnnotationGx::getPubchemCompound(ids= 'PUGREST.BadRequest', from = 'cid', to = 'property', properties = c('Title', 'MolecularFormula', 'InChIKey', 'CanonicalSMILES'))
property/Title,MolecularFormula,InChIKey,CanonicalSMILES
<char>
1: PUGREST.BadRequest
whereas a good CID returns:
AnnotationGx::getPubchemCompound(ids= '100016', from = 'cid', to = 'property', properties = c('Title', 'MolecularFormula', 'InChIKey', 'CanonicalSMILES'))
CID MolecularFormula CanonicalSMILES
<int> <char> <char>
1: 100016 C9H12N2O5 C1=CN(C(=O)N=C1)C2C(C(C(O2)CO)O)O
InChIKey Title
<char> <char>
1: RPQZTTQVRYEKCR-WCTZXXKLSA-N Zebularine