Team:HFUT CHINA/API.html
From 2014.igem.org
Line 41: | Line 41: | ||
<li><a href="https://2014.igem.org/Team:HFUT_CHINA/Examples.html">Results</a></li> | <li><a href="https://2014.igem.org/Team:HFUT_CHINA/Examples.html">Results</a></li> | ||
<li><a href="https://2014.igem.org/Team:HFUT_CHINA/Future_Work.html">Future Work</a></li> | <li><a href="https://2014.igem.org/Team:HFUT_CHINA/Future_Work.html">Future Work</a></li> | ||
- | <li><a href="https:// | + | <li><a href="https://github.com/igemsoftware/HFUT_CHINA_2014.git">Download</a></li> |
</ul> | </ul> | ||
Latest revision as of 00:56, 18 October 2014
Server API
author:Y. Xia, HFUT, CHINA
Overall
Our server is written in JAVA and JSP. The commands for using our server are listed below, so that users can rebuild it in the future or create users own software based on our server.
Keys and Values
key:requestType
values:regRequest/partRequest/checkRequest/record/recentlyUsed/deviceRequest/twinsRequest/ambiguous/recommendation
meaning of these values:
partRequest:request a part information with a whole part name.
regRequest:requeset a new user information from server.
checkRequest:check the part sequence whether the sequence is a good sequence or not.
record:write a record to database including your information and the part you used.
recentlyUsed: request a List of parts that you have used recently.
deviceRequest: request a List of Device which contains the subsequence that you used.
twinsRequest:request a List of twin parts.
ambiguous: do entity search. Whatever user input, we will return a best answer to user.
recommendation: recommend some parts based on the sequence that user has built.
example:
regRequest:
http://.../BioDesigner/core.jsp?requestType=regRequest&userInfo=hello
return:
{"root":[{"userInfo":"5d41402abc4b2a76b9719d911017c592"}]}
The value of userInfo is your own user information, or the thing we called id.We will record your behavior with your id.
partRequest
http://.../BioDesigner/core.jsp?requestType=partRequest&partName=BBa_B0032
return:
{"root":[{"id":149,"recentlyUsedPart":null,"partName":"BBa_B0032","sequence":"","device":null,"partID":149,"partUrl":"http://parts.igem.org/Part:BBa_B0032","type":"RBS"}]}
All the part information is packaged with JSON.
checkRequest
http://.../http://localhost:8080/BioDesigner/core.jsp?requestType=checkRequest&partNum=2&partName1=BBa_K656009&partName2=BBa_R0000
return:
{"root":[{"index":1},{"index":2}]}
The elements of root is all the part which are potentially wrong. From the url we could see that we have built a sequence with two parts and both of them are not right.By the way, if your sequence is not wrong, we will return minus 1.
record:
http://.../BioDesigner/core.jsp?requestType=record&partName=BBa_B0034&userInfo=194ce5d0b89c47ff6b30bfb491f9dc26
return:
null
database:
+----+--------+-------+------------+----------------------------------+
| ID | PARTID | COUNT | DATETIME | USERINFO |
+----+--------+-------+------------+----------------------------------+
| 10 | 1695 | 2 | 2014-10-16 | 194ce5d0b89c47ff6b30bfb491f9dc26 |
| 11 | 1695 | 1 | 2014-10-16 | ABCD |
| 13 | 1904 | 2 | 2014-10-16 | ABCD |
| 14 | 1904 | 1 | 2014-10-16 | 194ce5d0b89c47ff6b30bfb491f9dc26 |
+----+--------+-------+------------+----------------------------------+
The database will update or insert a record of your behavior information.
deviceRequest
http://.../BioDesigner/core.jsp?requestType=deviceRequest&userCir=BBa_B0010%20BBa_B0012
return:
{"root":
[{"partName":"BBa_K283000","partID":15666,"partUrl":"http://parts.igem.org/Part:BBa_K283000","type":"Device","part_seq":"BBa_I712074 BBa_B0034 BBa_K283000
BBa_B0010 BBa_B0012"},
{"partName":"BBa_K283002","partID":15667,"partUrl":"http://parts.igem.org/Part:BBa_K283002","type":"Device","part_seq":"BBa_K283008 BBa_B0010 BBa_B0012"},
{"partName":"BBa_K283014","partID":15683,"partUrl":"http://parts.igem.org/Part:BBa_K283014","type":"Device","part_seq":"BBa_R0010 BBa_B0034 BBa_K283008 BBa_B0010 BBa_B0012"},
{"partName":"BBa_K283019","partID":15689,"partUrl":"http://parts.igem.org/Part:BBa_K283019","type":"Device","part_seq":"BBa_R0040 BBa_B0034 BBa_K094100 BBa_B0010 BBa_B0012"},
{"partName":"BBa_K283030","partID":15805,"partUrl":"http://parts.igem.org/Part:BBa_K283030","type":"Composite","part_seq":"BBa_K283038 BBa_B0034 BBa_E1010 BBa_B0010 BBa_B0012"},
{"partName":"BBa_K233001","partID":14252,"partUrl":"http://parts.igem.org/Part:BBa_K233001","type":"Composite","part_seq":"BBa_J23118 BBa_B0030 BBa_K233306 BBa_I732005 BBa_E0040 BBa_B0010 BBa_B0012"},
{"partName":"BBa_K233006","partID":14280,"partUrl":"http://parts.igem.org/Part:BBa_K233006","type":"Regulatory","part_seq":"BBa_J23102 BBa_B0030 BBa_I716103 BBa_B0010 BBa_B0012"},
{"partName":"BBa_K233318","partID":16409,"partUrl":"http://parts.igem.org/Part:BBa_K233318","type":"Measurement","part_seq":"BBa_R0010 BBa_B0030 BBa_K233306 BBa_E0040 BBa_B0010 BBa_B0012"},
{"partName":"BBa_K233320","partID":16427,"partUrl":"http://parts.igem.org/Part:BBa_K233320","type":"Project","part_seq":"BBa_R1062 BBa_B0034 BBa_C0061 BBa_B0010 BBa_B0012 BBa_J23102 BBa_B0034 BBa_C0062 BBa_B0010 BBa_B0012 BBa_R1062 BBa_K233004 BBa_B0030 BBa_K124003 BBa_B0010 BBa_B0012"},
{"partName":"BBa_K233322","partID":16440,"partUrl":"http://parts.igem.org/Part:BBa_K233322","type":"Composite","part_seq":"BBa_R1062 BBa_K233004 BBa_B0030 BBa_E0040 BBa_B0010 BBa_B0012"}]}
We try to find some device with a subsequence of BBa_B0010 and BBa_B0012, and the server will provide you some deivces that you want.All the device information is packaged with JSON, which can be parsed with JAVASCRIPT easily.
twinsRequest
http://.../BioDesigner/core.jsp?requestType=twinsRequest&basePart=BBa_Y00009
return:
{"root":
[{"id":8703,"recentlyUsedPart":null,"partName":"BBa_J63001","sequence":"","device":null,"partID":7494,"partUrl":"http://parts.igem.org/Part:BBa_J63001","type":"Reporter"},
{"id":7963,"recentlyUsedPart":null,"partName":"BBa_K105008","sequence":"","device":null,"partID":12016,"partUrl":"http://parts.igem.org/Part:BBa_K105008","type":"Coding"},
{"id":3779,"recentlyUsedPart":null,"partName":"BBa_K165005","sequence":"","device":null,"partID":12636,"partUrl":"http://parts.igem.org/Part:BBa_K165005","type":"Coding"}]}
We request all the twin parts of BBa_Y00009, and the server return us correctly and quickly.
ambiguous & recommendation
url1:
http://.../BioDesigner/core.jsp?requestType=ambiguous&partNum=1&partName1=BBa_B0010&userInput=BBa_S&userInput=BBa_K
url1 return:
{"root":
[{"id":269,"recentlyUsedPart":null,"partName":"BBa_S04999","sequence":"","device":null,"partID":24696,"partUrl":"http://parts.igem.org/Part:BBa_S04999","type":"Intermediate"},
{"id":308,"recentlyUsedPart":null,"partName":"BBa_S03613","sequence":"","device":null,"partID":7566,"partUrl":"http://parts.igem.org/Part:BBa_S03613","type":"Intermediate"},
{"id":390,"recentlyUsedPart":null,"partName":"BBa_S04323","sequence":"","device":null,"partID":16560,"partUrl":"http://parts.igem.org/Part:BBa_S04323","type":"Intermediate"},
{"id":396,"recentlyUsedPart":null,"partName":"BBa_S03368","sequence":"","device":null,"partID":6204,"partUrl":"http://parts.igem.org/Part:BBa_S03368","type":"Intermediate"},
{"id":457,"recentlyUsedPart":null,"partName":"BBa_S04326","sequence":"","device":null,"partID":16566,"partUrl":"http://parts.igem.org/Part:BBa_S04326","type":"Intermediate"},
{"id":485,"recentlyUsedPart":null,"partName":"BBa_S03155","sequence":"","device":null,"partID":4712,"partUrl":"http://parts.igem.org/Part:BBa_S03155","type":"Intermediate"},
{"id":508,"recentlyUsedPart":null,"partName":"BBa_S04242","sequence":"","device":null,"partID":14488,"partUrl":"http://parts.igem.org/Part:BBa_S04242","type":"Intermediate"},
{"id":567,"recentlyUsedPart":null,"partName":"BBa_S03437","sequence":"","device":null,"partID":6516,"partUrl":"http://parts.igem.org/Part:BBa_S03437","type":"Intermediate"},
{"id":583,"recentlyUsedPart":null,"partName":"BBa_S04208","sequence":"","device":null,"partID":13875,"partUrl":"http://parts.igem.org/Part:BBa_S04208","type":"Inverter"},
{"id":625,"recentlyUsedPart":null,"partName":"BBa_S04302","sequence":"","device":null,"partID":15566,"partUrl":"http://parts.igem.org/Part:BBa_S04302","type":"Inverter"}]}
url2:
http://.../BioDesigner/core.jsp?requestType=ambiguous&partNum=0&userInput=RBS
url2 return:
{"root":
[{"id":1641,"recentlyUsedPart":null,"partName":"BBa_R0040","sequence":"","device":null,"partID":187,"partUrl":"http://parts.igem.org/Part:BBa_R0040","type":"Regulatory"},
{"id":1516,"recentlyUsedPart":null,"partName":"BBa_R0010","sequence":"","device":null,"partID":185,"partUrl":"http://parts.igem.org/Part:BBa_R0010","type":"Regulatory"},
{"id":1904,"recentlyUsedPart":null,"partName":"BBa_B0034","sequence":"","device":null,"partID":151,"partUrl":"http://parts.igem.org/Part:BBa_B0034","type":"RBS"},
{"id":1415,"recentlyUsedPart":null,"partName":"BBa_J23100","sequence":"","device":null,"partID":7142,"partUrl":"http://parts.igem.org/Part:BBa_J23100","type":"Regulatory"},
{"id":1150,"recentlyUsedPart":null,"partName":"BBa_R0011","sequence":"","device":null,"partID":186,"partUrl":"http://parts.igem.org/Part:BBa_R0011","type":"Regulatory"},
{"id":1726,"recentlyUsedPart":null,"partName":"BBa_I0500","sequence":"","device":null,"partID":2916,"partUrl":"http://parts.igem.org/Part:BBa_I0500","type":"Regulatory"},
{"id":505,"recentlyUsedPart":null,"partName":"BBa_J23110","sequence":"","device":null,"partID":7274,"partUrl":"http://parts.igem.org/Part:BBa_J23110","type":"Regulatory"},
{"id":195,"recentlyUsedPart":null,"partName":"BBa_J23119","sequence":"","device":null,"partID":7309,"partUrl":"http://parts.igem.org/Part:BBa_J23119","type":"Regulatory"},
{"id":149,"recentlyUsedPart":null,"partName":"BBa_B0032","sequence":"","device":null,"partID":149,"partUrl":"http://parts.igem.org/Part:BBa_B0032","type":"RBS"},
{"id":448,"recentlyUsedPart":null,"partName":"BBa_I712074","sequence":"","device":null,"partID":10177,"partUrl":"http://parts.igem.org/Part:BBa_I712074","type":"Regulatory"}]}
Sometimes it is difficult to know what do our users want. Maybe you want to search a part with a part of it name. Maybe you want to search a RBS type part in all the next parts.So we provide an entity search based on user input data. Whatever you want, we will show you.