biothings / mychem.info

MyChem.info: A BioThings API for chemical/drug annotations
http://mychem.info
Apache License 2.0
16 stars 14 forks source link

mychem.info/v1/drug/ returns 10 records no matter how many inchi keys are supplied #16

Closed putmantime closed 5 years ago

putmantime commented 6 years ago

Hi Biothings team. I am trying to retrieve records in large batches using multiple inchi keys. THe swagger doc says that you can submit up to 1000 keys in a post request at a time. It seems that no matter how many I supply, the results include 10 records.

example post I am making with 17 unique inchi keys that all resolve individually

fields = 'drugbank.targets,drugbank.drugbank_id,unii.unii,drugcentral.drug_use,drugcentral.bioactivity',

ids = 'FQXGHZNSUOHCLO-IZLXSQMJSA-N,MKWYFZFMAMBPQK-UHFFFAOYSA-J,SXYZQZLHAIHKKY-GSTUPEFVSA-N,WMKGGPCROCCUDY-HEEUSZRZSA-N,XXKJBDTZZBQBCP-MRVPVSSYSA-N,WQVJHHACXVLGBL-UHFFFAOYSA-N,FLOSMHQXBMRNHR-UHFFFAOYSA-N,FLOSMHQXBMRNHR-QPJJXVBHSA-N,ZMJBYMUCKBYSCP-UHFFFAOYSA-N,IMONTRJLAWHYGT-REGVOWLASA-N,MSRILKIQRXUYCT-UHFFFAOYSA-M,ZJEFYLVGGFISGT-UHFFFAOYSA-L,ZJEFYLVGGFISGT-VRZXRVJBSA-L,UFUVLHLTWXBHGZ-KUWMELJBSA-N,UFUVLHLTWXBHGZ-MGZQPHGTSA-N,GGWBHVILAJZWKJ-KJEVSKRMSA-N,GGWBHVILAJZWKJ-CHHCPSLASA-N' 

        url = 'http://mychem.info/v1/drug'
        data = {
            'ids': ids,
            'fields': fields
        }

Cheers

newgene commented 5 years ago

This should be solved by now. There was a temporary size-of-0 limit was applied, but it was lifted quite a while ago.