Team:UESTC-Software/API.html
From 2014.igem.org
(Difference between revisions)
Tangying0608 (Talk | contribs) (Created page with "{{CSS/Main}} <html> <head> <title>UESTC-Software</title> <meta http-equiv=Content-Type content="text/html;charset=utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=Edge,c...") |
Tangying0608 (Talk | contribs) |
||
Line 207: | Line 207: | ||
</pre> | </pre> | ||
<h3>4.4Output example when ok:</h3> | <h3>4.4Output example when ok:</h3> | ||
- | <pre style="font-size: xx-small;">{ | + | <pre style="font-size: xx-small;"> { |
”status”: 0, | ”status”: 0, | ||
”message”: { | ”message”: { | ||
Line 286: | Line 286: | ||
<div class="navbar"> | <div class="navbar"> | ||
<ul class="leftUl UL"> | <ul class="leftUl UL"> | ||
- | <li id="nav_home"></li> | + | <li id="nav_home"><a href="Home.html" style="width: inherit;height: 100%;position: fixed;"></a></li> |
<li id="nav_project" class="menu"> | <li id="nav_project" class="menu"> | ||
- | <ul style="bottom: | + | <ul style="bottom:257px;"> |
<li><a href="Overview.html">Overview</a></li> | <li><a href="Overview.html">Overview</a></li> | ||
<li><a href="Modeling.html">Modeling</a></li> | <li><a href="Modeling.html">Modeling</a></li> | ||
<li><a href="Demo.html">Demo</a></li> | <li><a href="Demo.html">Demo</a></li> | ||
<li><a href="Validation.html">Validation</a></li> | <li><a href="Validation.html">Validation</a></li> | ||
- | |||
<li><a href="Download.html">Download</a></li> | <li><a href="Download.html">Download</a></li> | ||
- | <li><a href=" | + | <li><a href="safety.html">Safety</a></li> |
</ul> | </ul> | ||
</li> | </li> | ||
- | <li id="nav_team"><a href=" | + | <li id="nav_team"><a href="team.html" style="width: inherit;height: 100%;position: fixed;"></a></li> |
</ul> | </ul> | ||
<ul class="rightUl UL"> | <ul class="rightUl UL"> | ||
<li id="nav_notebk" class="menu"> | <li id="nav_notebk" class="menu"> | ||
<ul style="bottom:90px;"> | <ul style="bottom:90px;"> | ||
- | <li><a href=" | + | <li><a href="journal.html">Journal</a></li> |
- | <li><a href="HumanPractice.html">Human | + | <li><a href="HumanPractice.html">Human Practice</a></li> |
</ul> | </ul> | ||
</li> | </li> | ||
<li id="nav_reqrmt" class="menu"> | <li id="nav_reqrmt" class="menu"> | ||
- | <ul style="bottom: | + | <ul style="bottom:93px;"> |
- | <li><a href=" | + | <li><a href="Requirement.html">Requirements</a></li> |
- | <li><a href=" | + | <li><a href="Medal.html">Medal Fulfillment</a></li> |
- | + | ||
</ul> | </ul> | ||
</li> | </li> | ||
<li id="nav_doc" class="menu"> | <li id="nav_doc" class="menu"> | ||
<ul style="bottom:170px;"> | <ul style="bottom:170px;"> | ||
- | <li><a href=" | + | <li><a href="API.html">API Documentation</a></li> |
- | <li><a href=" | + | <li><a href="Testing.html">Testing Documentation</a></li> |
<li><a href="Installation.html">Installation</a></li> | <li><a href="Installation.html">Installation</a></li> | ||
<li><a href="UserGuide.html">User Guide</a></li> | <li><a href="UserGuide.html">User Guide</a></li> | ||
Line 326: | Line 324: | ||
<img src="https://static.igem.org/mediawiki/2014/c/c5/2014-UESTC-Software-Top.png" id="top" onclick="javascript:$('#body').animate({scrollTop:0},700)"> | <img src="https://static.igem.org/mediawiki/2014/c/c5/2014-UESTC-Software-Top.png" id="top" onclick="javascript:$('#body').animate({scrollTop:0},700)"> | ||
<div id="logoRay" style="width:86px;height:86px;border-radius:1000px;position:fixed;bottom:-20px;z-index: 999999;"></div> | <div id="logoRay" style="width:86px;height:86px;border-radius:1000px;position:fixed;bottom:-20px;z-index: 999999;"></div> | ||
- | <img src="https://static.igem.org/mediawiki/2014/e/e5/2014_UESTC_Software_logo.gif" id="logo" style="border-radius: 90px;width:100px;height:100px;position:fixed;bottom:-20px;z-index: 999999;"/> | + | <a href="https://2014.igem.org/Team:UESTC-Software"><img src="https://static.igem.org/mediawiki/2014/e/e5/2014_UESTC_Software_logo.gif" id="logo" style="border-radius: 90px;width:100px;height:100px;position:fixed;bottom:-20px;z-index: 999999;"/></a> |
+ | <a class="iGEM" href="https://igem.org/Main_Page" style="position: fixed;top: 0;right: 0;"><img src="https://static.igem.org/mediawiki/2014/8/8d/2014-UESTC-Software-Igem.png"></a> | ||
</div> | </div> | ||
<script type="text/javascript"> | <script type="text/javascript"> |
Revision as of 04:45, 15 October 2014
API Documentation
Service API Documentation
1Main functions
1.1Submit a Crisper-X
requestURL: getMain.php
1.2Get result
Get the result given the request id.
URL | getResult.php |
POST | id |
Return | Result in json style,with status=0, 1, 2 means ok, error and not finished respectively. |
Example | POST: id=355Return: {“status”:2,“message”:“not finished yet”} |
1.3Get requests History
Get requests history. Unregistered users will get the global history.
URL | getHistory.php |
POST | token |
Return | Top ten records, ordered by time, in Json array style |
Example | POST: token=005536bf21179e54370c75b6fb136f2aReturn: [{“request id”:“351”,“status”:“0”},{“request id”:“355”,“status”:“2”}] |
See also | Login [ section 2.1 ] |
2User Management
2.1Login
Login(Sign in) using Username and Password. A token will be returned forfuture authentication.
URL | login/ |
POST | name(username), pswd(password) |
Return | 32 byte token when login succeed, or ’-’ otherwise. |
Example | POST: name=guest&pswd=1234Return: 005536bf21179e54370c75b6fb136f2a |
2.2Log out
Delete user log information and Log out.
URL | login/logout.php |
POST | token |
Return | Nothing. |
See also | Login [ section 2.1 ] |
2.3Sign Up
Create a new account with username, password and email.
URL | login/signup.php |
POST | name(username, unique),pswd(password, encrypt using md5),email(unique). |
Return | ”Sign In Succeed” or error information. |
2.4Update user’s Information
Update your password and/or email address.
URL | login/signup.php |
POST | name(username),pswd(old password),newpswd(new password *),newemail(new email *),* Not necessary |
Return | ’+’: ok, ’-’: failed. |
3File/Specie Upload
3.1Check upload
Check if this token can upload files
URL | upload/check.php |
POST | status=0(Yes)/1(No) and message if status=1 in JSON. |
Return | ’+’: ok, ’-’: failed. |
Example | {”status”:1, ”message”:”Authentication failed”} |
3.2Upload file
Upload your file.
URL | upload/ |
POST | token, filename(no longer than 255),note(no longer than 1000), file |
Return | A(Upload succeed) or N(Something goes wrong) |
3.3Import
Import data from file(s).
URL | upload/import.php |
POST | token, command(in json, see section3.7) |
Return | New specie Name(start with number), or ’N’ for ’Something goes wrong’ |
3.4Viewmyfiles
View all my files.
URL | upload/viewmyfiles.php |
POST | token |
Return | All my files in JSON Array Style |
Example | [{”fileName”:”NC 001133-chromosome1”,”note”:”Saccharomycetes’s chromosome”}] |
3.5Viewmyspecies
View all my species.
URL | upload/viewmyspecies.php |
POST | token |
Return | All my species in JSON Array Style |
Example | [ {”specie”:”Saccharomyces-cerevisiae”, ”PAMs”:[{”PAM”:”NGG”},{”PAM”:”NRG”}], ”chromosomes”:[{”chromosome”:”NC 001147-chromosome1”}, {”chromosome”:”NC 001147-chromosome16”} ] |
3.6Deletemyfiles
Delete your file.
URL | upload/deletemyfiles.php |
POST | token, filename |
Return | A(Delete succeed) or N(Something goes wrong) |
3.7json.command.txt
How to write commands in Import(section 3.3) method.
The structure of a command:
{ specie varchar(96) Name of the new Specie. files array All correlative chromosome files(.fna). [ fileName varchar(255) File name ] PAM varchar(20) PAM }
Example:
{”specie”:”testSpecie”,”files”:[{”fileName”:”NC 012971”}],”PAM”:”NGG”}
4josn.txt
4.1Input
type 1 1=Knockout specie E.coil Specie gene thrA Gene Name location Chr2:336..2798 Location pam NGG PAM Sequence [1] r1 0.65 r1, r2=1-r1 length 20 nt length region ”0000” Region filter. 1 for in and 0 for out. EXON,INTRON,UTR,INTERGENIC rfc ”000000” 1 for use and 0 for not. RFC: 10, 12, 12a, 21, 23, 25
4.2Input Example
{ “specie” : “Saccharomyces-cerevisiae”, “location” : “NC 001144-chromosome12:1..500”, “pam” : “NGG”, “rfc” : “100101” }
4.3Output
status 0 Request Status. (0: ok, 1: failed, 2: still running) message no args Return message specie E.coil Specie gene thrA Gene name location Chr2:336..2798 Location region array[] Selected sequence information { endpoint 1807 Region end point description intergenic Region information } result array[] Top 50 Only { grna TC. . . CGG(20) sgRNA sequence position Chr2:15413205 Location strand + Which DNA chain (+/-) region exon Region of this sgRNA total score 86 Sguide Sspe 93 Sspe Seff 7 Seff count 2 Nmm offtarget array[] Top 20 Only { osequence CT. . . TGGG(20) possible-offtarget sgRNA sequence oscore 3.5 Smm omms 4 Nmm oposition Chr3:4158 Location of po-sgRNA ostrand + Which DNA chain (+/-) oregion Intergenic Region of this sgRNA } }
4.4Output example when ok:
{ ”status”: 0, ”message”: { ”specie”: ”E.coli”, ”kind”: ”E.coli K12-MG1655”, ”gene”: ””, ”location”: ”1:336..2798” }, ”result”: [{”key”: ”#1”, ”grna”: ”GAAGTTCGGCGGTACATCAGTGG”, ”position”: ”1:368”, ”total score”: 100, ”count”: 0, ”offtarget”: [] }, { ”key”: ”#2”, ”grna”: ”TAATGAAAAAGGCGAACTGGTGG”, ”position”: ”1:935”, ”total score”: 100, ”count”: 0, ”offtarget”: [] }, { ”key”: ”#3”, ”grna”: ”TGGAAAGCAATGCCAGGCAGGGG”, ”position”: ”1:427”, ”total score”: 100, ”count”: 0, ”offtarget”: [] }, { ”key”: ”#4”, ”grna”: ”CAAAATCACCAACCACCTGGTGG”, ”position”: ”1:479”, ”total score”: 100, ”count”: 0, ”offtarget”: [] },{ ”key”: ”#44”, ”grna”: ”ATTTTTGCCGAACTTTTGACGGG”, ”position”: ”1:564”, ”total score”: 91, ”count”: 2, ”offtarget”: [{ ”osequence”: ”ATTTTCGCCAAACATTTGGCAGG”, ”oscore”: 0.954750, ”omms”: 4, ”ostrand”: ”-”, ”oposition”: ”1:1924344”, ”oregion”: ”exco” }, { ”osequence”: ”ATTGTTGCGCAACTTTTGGCTGG”, ”oscore”: 0.480417, ”omms”: 4, ”ostrand”: ”-”, ”oposition”: ”1:3827949”, ”oregion”: ”exco” }] }] }
4.5 Output example when failed:
{ “status”: 1, “message”: “illegal args” }
4.6 Appendix. Equations
R=A,G; M=A,C; W=A,T; S=C,G; K=G,T; Y=C,T; H=A,C,T; V=A,C,G; B=C,G,T; D=A,G,T; N=A, G, C, T
Documentation & Download
Service API Documentation