[OTDev] how to get compound URIs for the compounds I add to a dataset?

Nina Jeliazkova jeliazkova.nina at gmail.com
Fri Oct 29 17:23:28 CEST 2010


Hi,

Yet another option.

When adding molecules to dataset, assign a property to every molecule e.g.
MOLID=xxx  (CDK setProperty() should work fine)
The dataset will contain a feature with name "MOLID" (and some feature
URL).  The feature value will be the value, assigned by you, and should
allow to keep track of the molecules.

Best regards,
Nina



On 29 October 2010 15:46, Nina Jeliazkova <jeliazkova.nina at gmail.com> wrote:

> Egon,
>
> Forgot to tell there is another option.
>
> POST to /compound should work, it will return compound URL.
>
> Then you'll need to add the compounds URL to a new dataset:
>
> curl -X POST -H "Accept:text/uri-list" -d
> "compound_uris[]={host}/compound/666"  {host}/dataset
>
> or to an existing one:
>
> curl -X PUT -H "Accept:text/uri-list" -d
> "compound_uris[]={host}/compound/666"  {host}/dataset/999
>
> Hope this helps,
> Nina
>
>
> On 29 October 2010 15:01, Nina Jeliazkova <jeliazkova.nina at gmail.com>wrote:
>
>> Hi Egon,
>>
>> On 29 October 2010 14:49, Egon Willighagen <egon.willighagen at gmail.com>wrote:
>>
>>> Hi all,
>>>
>>> I was just wondering on how to do something... when I add a molecule
>>> to a data set, I would like to know the matching URI... is there a way
>>> to achieve this? A POST to /dataset returns me the data set URI...
>>>
>>
>> Yep, this is how we got it in the API.  Same for PUT.
>>
>>
>>>
>>> Is there an implicit assumption that molecules are numbered according
>>> to in what order they are added... but that would only work if added
>>> as SDF...
>>>
>>
>> No, there is no such assumption.
>>
>>>
>>> I almost feel myself needing to put one molecule in one data set, but
>>> there has to be a better way... right?
>>>
>>
>> Well, you can, but doesn't sound nice .
>>
>> If you only add a single molecule and get dataset URL from the POST
>>
>> curl -H "Accept:text/uri-list"  dataset_URL
>>
>> will return the list of compounds URLs.
>>
>> Is this sufficient?  In principle one can assign arbitrary identifier to
>> the molecule and it will be available as a feature.
>>
>> I am not sure what is the best way to return "matching" compound uris
>> after POST, just because POST allows adding multiple  compounds.
>>
>> Nina
>>
>>
>>> Egon
>>>
>>> --
>>> Dr E.L. Willighagen
>>> Postdoctoral Research Associate
>>> University of Cambridge
>>> Homepage: http://egonw.github.com/
>>> LinkedIn: http://se.linkedin.com/in/egonw
>>> Blog: http://chem-bla-ics.blogspot.com/
>>> PubList: http://www.citeulike.org/user/egonw/tag/papers
>>> _______________________________________________
>>> Development mailing list
>>> Development at opentox.org
>>> http://www.opentox.org/mailman/listinfo/development
>>>
>>
>>
>



More information about the Development mailing list