classyfire_api/doc/file.README.html

245 lines
6.7 KiB
HTML
Raw Permalink Normal View History

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>
File: README
&mdash; Documentation by YARD 0.8.7.6
</title>
<link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
<link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
<script type="text/javascript" charset="utf-8">
hasFrames = window.top.frames.main ? true : false;
relpath = '';
framesUrl = "frames.html#!file.README.html";
</script>
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
</head>
<body>
<div id="header">
<div id="menu">
<a href="_index.html">Index</a> &raquo;
<span class="title">File: README</span>
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
</div>
<div id="search">
<a class="full_list_link" id="class_list_link"
href="class_list.html">
Class List
</a>
<a class="full_list_link" id="method_list_link"
href="method_list.html">
Method List
</a>
<a class="full_list_link" id="file_list_link"
href="file_list.html">
File List
</a>
</div>
<div class="clear"></div>
</div>
<iframe id="search_frame"></iframe>
<div id="content"><div id='filecontents'>
<p><a href="http://classyfire.wishartlab.com">ClassyFire</a> 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.</p>
<h1 id="label-What+is+this+repository+for-3F"><strong>What is this repository for?</strong></h1>
<ul><li>
<p>Quick summary</p>
</li><li>
<p>Version</p>
</li><li>
<p><a href="https://bitbucket.org/tutorials/markdowndemo">Learn Markdown</a></p>
</li></ul>
<h1 id="label-How+do+I+get+set+up-3F"><strong>How do I get set up?</strong></h1>
<ul><li>
<p>Summary of set up</p>
</li><li>
<p>Configuration</p>
</li><li>
<p>Dependencies</p>
</li><li>
<p>Database configuration</p>
</li><li>
<p>How to run tests</p>
</li><li>
<p>Deployment instructions</p>
</li></ul>
<h1 id="label-Contribution+guidelines"><strong>Contribution guidelines</strong></h1>
<ul><li>
<p>Writing tests</p>
</li><li>
<p>Code review</p>
</li><li>
<p>Other guidelines</p>
</li></ul>
<h1 id="label-Endpoints"><strong>Endpoints</strong></h1>
<blockquote>
<h2 id="label-1.+Entity">1. Entity</h2>
<blockquote>
<p>Chemical compounds are represented by the Entity model, through which one
can access the compound&#39;s structure-based classification.</p>
<h3 id="label-GET">GET</h3>
<p><strong>/entities/entityInchikey</strong></p>
<p>A chemical compound&#39;s classification can be retrieved in the JSON or
XML format. The compound&#39;s information is accessed via the InChIkey as
show in the following examples. In this example, the entity has the
InChIKey=LABTWGUMFABVFG-ONEGZZNKSA-N.</p>
<blockquote>
<p>ClassyFireAPI.get_entity_classification(“BDAGIHXWWSANSR-UHFFFAOYSA-N”,“json”)</p>
</blockquote>
<p>Where:</p>
<blockquote>
<p>The entity&#39;s InChIKey is “BDAGIHXWWSANSR-UHFFFAOYSA-N”,</p>
<p>The output format is “json” (JSON).</p>
</blockquote>
</blockquote>
<h2 id="label-2.+Sequence">2. Sequence</h2>
<blockquote>
<p>Sequences are represented by the Sequence model, through which one can
access the compound&#39;s structure-based classification.</p>
<h3 id="label-GET">GET</h3>
<p><strong>/sequence/fingerprint</strong></p>
<p>A (FASTA) sequence&#39;s classification can be retrieved in the JSON. In
this example, the sequence has the fingerprint =
“8bf70c23ac100cd2c3955081d8613325”</p>
<blockquote>
<p>ClassyFireAPI.get_sequence_classification(“8bf70c23ac100cd2c3955081d8613325”,“json”)</p>
</blockquote>
<p>Where:</p>
<blockquote>
<p>The sequence&#39;s fingerprint is “8bf70c23ac100cd2c3955081d8613325”,</p>
2016-03-10 02:55:54 +00:00
<blockquote>
<p>The fingerprint is generate by Digest::MD5 from the peptide sequence
“APDVQDCPECTLQENPFFSQPGAPILQCMGCCFSRAYPTPLRSKKTMLVQKNVTSESTCCVAKSYNRVTVMGGFKVENHTACHCSTCYYHKS”</p>
</blockquote>
<p>The output format is “json” (JSON).</p>
</blockquote>
</blockquote>
<h2 id="label-3.+Query">3. Query</h2>
<blockquote>
<p>The Query model represents the chemical structure to be classified. Its
attributes are the query label and the query input.</p>
<blockquote>
<p>The query label is an identifier</p>
<p>The query input contains the compound&#39;s identifier (optional) and its
structural representation, separated by a tab. The chemical structure is
represented either in the <a
href="http://www.daylight.com/dayhtml/doc/theory/theory.smiles.html">Daylight
SMILES</a> format, the <a
href="http://www.iupac.org/home/publications/e-resources/inchi.html">InChI</a>
format. Moreover, the compound can be represented with its <a
2016-03-10 02:55:54 +00:00
href="http://www.chem.qmul.ac.uk/iupac/">IUPAC name</a>. The input can also
be of type <a href="https://en.wikipedia.org/wiki/FASTA_format">FASTA</a>,
which contains peptide or nucleotide sequences.</p>
</blockquote>
<h3 id="label-POST">POST</h3>
<p>A query can be submitted using the POST method as demonstrated in the
following example.</p>
<blockquote>
<p>ClassyFireAPI.submit_query(“curl_test”,“MOL1tCCCOCCnMOL2tCOCC=CCCC”,“STRUCTURE”)
where the parameters are:</p>
<p>The query label: curl_test,</p>
<p>The entity identifiers: MOL1,MOL2</p>
<p>The entity&#39;s structure represented in the SMILES format: CCCOCC and
COCC=CCCC.</p>
<p>The query is of type &#39;STRUCTURE&#39;</p>
</blockquote>
<h3 id="label-GET">GET</h3>
<p><strong>/queries/queryId</strong></p>
<p>The classification results can be retrieved via a GET method in the JSON or
XML format.</p>
<blockquote>
<p>ClassyFireAPI.get_query(443431,“json”)</p>
</blockquote>
<p>where:</p>
<blockquote>
<p>The query id is 443431, The output format is “json” (JSON)</p>
</blockquote>
</blockquote>
</blockquote>
<h1 id="label-Directory+Structure"><strong>Directory Structure</strong></h1>
<ul><li>
<p>lib</p>
</li></ul>
<h1 id="label-Who+do+I+talk+to-3F"><strong>Who do I talk to?</strong></h1>
<ul><li>
<p>Yannick Djoumbou Feunang: djoumbou@ualberta.ca</p>
</li><li>
<p>Other community or team contact</p>
</li></ul>
</div></div>
<div id="footer">
Generated on Tue Jun 28 15:46:59 2016 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.8.7.6 (ruby-2.4.0).
</div>
</body>
</html>