Merge branch 'master' of bitbucket.org:wishartlab/classyfire_api
This commit is contained in:
commit
e9d2cb6f13
|
@ -0,0 +1,81 @@
|
||||||
|
[**ClassyFire**](http://classyfire.wishartlab.com) is a resource that allows you to automatically classify any chemical compound based on its structure. This is the repository for the ClassyFire API allows you to send requests to and pull information from the ClassyFire web server.
|
||||||
|
|
||||||
|
# **What is this repository for?** #
|
||||||
|
|
||||||
|
* Quick summary
|
||||||
|
* Version
|
||||||
|
* [Learn Markdown](https://bitbucket.org/tutorials/markdowndemo)
|
||||||
|
|
||||||
|
# **How do I get set up?** #
|
||||||
|
|
||||||
|
* Summary of set up
|
||||||
|
* Configuration
|
||||||
|
* Dependencies
|
||||||
|
* Database configuration
|
||||||
|
* How to run tests
|
||||||
|
* Deployment instructions
|
||||||
|
|
||||||
|
# **Contribution guidelines** #
|
||||||
|
|
||||||
|
* Writing tests
|
||||||
|
* Code review
|
||||||
|
* Other guidelines
|
||||||
|
|
||||||
|
# **Endpoints** #
|
||||||
|
|
||||||
|
> ##1. Entity##
|
||||||
|
>
|
||||||
|
> >Chemical compounds are represented by the Entity model, through which one can access the compound's structure-based classification.
|
||||||
|
> >
|
||||||
|
> >###GET###
|
||||||
|
> >
|
||||||
|
> >**/entities/{entity_inchikey}**
|
||||||
|
> >
|
||||||
|
> >A chemical compound's classification can be retrieved in the JSON or XML format. The compound's information is accessed via the InChIkey as show in the following examples. In this example, the entity has the InChIKey=LABTWGUMFABVFG-ONEGZZNKSA-N.
|
||||||
|
> > >
|
||||||
|
> > >curl -H "Accept: application/json" -H "Content-Type: application/json" -X GET http://classyfire.wishartlab.com/entities/BDAGIHXWWSANSR-UHFFFAOYSA-N.json
|
||||||
|
> > >
|
||||||
|
> > >curl -H "Accept: application/xml" -H "Content-Type: application/xml" -X GET http://classyfire.wishartlab.com/entities/BDAGIHXWWSANSR-UHFFFAOYSA-N.xml
|
||||||
|
|
||||||
|
|
||||||
|
> ##2. Query##
|
||||||
|
>
|
||||||
|
> >The Query model represents the chemical structure to be classified. Its attributes are the query label and the query input.
|
||||||
|
> > >The query label is an identifier
|
||||||
|
> > >
|
||||||
|
> > > The query input contains the compound's identifier (optional) and its structural representation, separated by a comma. The chemical structure is represented either in the [Daylight SMILES](http://www.daylight.com/dayhtml/doc/theory/theory.smiles.html) or the [InChI](http://www.iupac.org/home/publications/e-resources/inchi.html) format.
|
||||||
|
> >
|
||||||
|
> >###POST###
|
||||||
|
> >A query can be submitted using the POST method as demonstrated in the following example.
|
||||||
|
> > >curl -is http://localhost:3000/queries.json -X POST -d '{"label":"curl_test","query_input":"MOL1,CCCOCC\nMOL2,COCC=CCCC"}' -H "Content-Type: application/json"
|
||||||
|
> >
|
||||||
|
> >where the parameters are:
|
||||||
|
> >
|
||||||
|
> > >The query label: curl_test,
|
||||||
|
> > >
|
||||||
|
> > >The entity identifiers: ID1,ID2
|
||||||
|
> >
|
||||||
|
> > >The entity's structure represented in the SMILES format: CCCOCC and COCC=CCCC.
|
||||||
|
> >
|
||||||
|
> >###GET###
|
||||||
|
> >
|
||||||
|
> >**/queries/{query_id}**
|
||||||
|
> >
|
||||||
|
> >The classification results can be retrieved via a GET method in the JSON or XML format.
|
||||||
|
> > >
|
||||||
|
> > >curl -H "Accept: application/json" -H "Content-Type: application/json" -X GET http://classyfire.wishartlab.com/queries/88.json
|
||||||
|
> >
|
||||||
|
> > >curl -H "Accept: application/json" -H "Content-Type: application/json" -X GET http://classyfire.wishartlab.com/queries/88.xml
|
||||||
|
> >
|
||||||
|
> >where the query id is 88.
|
||||||
|
|
||||||
|
|
||||||
|
# **Directory Structure** #
|
||||||
|
|
||||||
|
* lib
|
||||||
|
|
||||||
|
|
||||||
|
# **Who do I talk to?** #
|
||||||
|
|
||||||
|
* Repo owner or admin
|
||||||
|
* Other community or team contact
|
Loading…
Reference in New Issue