Mirror
Go to file
djoumbou dbd5b0f7f8 - Added contact person to README.md 2016-03-09 19:34:31 -07:00
.yardoc - Added YARD documentation 2016-03-09 19:26:59 -07:00
doc - Added YARD documentation 2016-03-09 19:26:59 -07:00
lib - Added YARD documentation 2016-03-09 19:26:59 -07:00
Gemfile - Added YARD documentation 2016-03-09 19:26:59 -07:00
Gemfile.lock - Added YARD documentation 2016-03-09 19:26:59 -07:00
README.md - Added contact person to README.md 2016-03-09 19:34:31 -07:00
contributors.txt - Added YARD documentation 2016-03-09 19:26:59 -07:00

README.md

ClassyFire 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?

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/{entityInchikey}

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.

ClassyFireAPI.get_entity_classification("BDAGIHXWWSANSR-UHFFFAOYSA-N","json")

Where:

The entity's InChIKey is "BDAGIHXWWSANSR-UHFFFAOYSA-N",

The output format is "json" (JSON).

##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 or the InChI format.

###POST### A query can be submitted using the POST method as demonstrated in the following example.

ClassyFireAPI.submit_query("curl_test","MOL1\tCCCOCC\nMOL2\tCOCC=CCCC","STRUCTURE") where the parameters are:

The query label: curl_test,

The entity identifiers: MOL1,MOL2

The entity's structure represented in the SMILES format: CCCOCC and COCC=CCCC.

The query is of type 'STRUCTURE'

###GET###

/queries/{queryId}

The classification results can be retrieved via a GET method in the JSON or XML format.

ClassyFireAPI.get_query(443431,"json")

where:

The query id is 443431, The output format is "json" (JSON)

Directory Structure

  • lib

Who do I talk to?