705f84454d | ||
---|---|---|
.yardoc | ||
doc | ||
lib | ||
.gitignore | ||
Gemfile | ||
Gemfile.lock | ||
README.md | ||
contributors.txt |
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?
- Quick summary
- Version
- Learn Markdown
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. Sequence##
Sequences are represented by the Sequence model, through which one can access the compound's structure-based classification.
###GET###
/sequence/{fingerprint}
A (FASTA) sequence's classification can be retrieved in the JSON. In this example, the sequence has the fingerprint = "8bf70c23ac100cd2c3955081d8613325"
ClassyFireAPI.get_sequence_classification("8bf70c23ac100cd2c3955081d8613325","json")
Where:
The sequence's fingerprint is "8bf70c23ac100cd2c3955081d8613325",
The fingerprint is generate by Digest::MD5 from the peptide sequence "APDVQDCPECTLQENPFFSQPGAPILQCMGCCFSRAYPTPLRSKKTMLVQKNVTSESTCCVAKSYNRVTVMGGFKVENHTACHCSTCYYHKS"
The output format is "json" (JSON).
##3. 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 tab. The chemical structure is represented either in the Daylight SMILES format, the InChI format. Moreover, the compound can be represented with its IUPAC name. The input can also be of type FASTA, which contains peptide or nucleotide sequences.
###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?
- Yannick Djoumbou Feunang: djoumbou@ualberta.ca
- Other community or team contact