bhklab / AnnotationGx

An R package to query various bio/chem-informatics databases APIs to construct annotation files.

Home Page:https://bhklab.github.io/AnnotationGx/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Handle mapping to properties with a bad CID

jjjermiah opened this issue · comments

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