{
"result": [
{"type": "input", "name": "Input XXX", "id": 1234},
{"type": "input", "name": "Input YYY", "id": 5687},
...]
}
{
"result": {"type": "input", "name": "Input XXX", "id": 1234}
}
{
"result": [
{"type": "promoter", "name": "Input XXX", "id": 1234},
{"type": "promoter", "name": "Input YYY", "id": 5687},
...]
}
{
"result": [
{"type": "receptor", "name": "Input XXX", "id": 1234},
{"type": "receptor", "name": "Input YYY", "id": 5687},
...]
}
{
//限制输入最多为两个
"inputs": [
{"id": 1, "promoter_ids": [1], "receptor_id": 1},
{"id": 2, "promoter_ids": [1], "receptor_id": 1}
],
//限制输出最多为三个
"outputs": [1, 2, 3],
"truth_table": [
{"inputs": [true, true], "outputs": [true, true, false]},
{"inputs": [true, false], "outputs": [false, true, false]},
{"inputs": [false, true], "outputs": [true, false, false]},
{"inputs": [false, false], "outputs": [false, true, true]}
]
}
响应格式:
{
"inputs": [
{
"eid": "c5820968a77f4c278093a048fe60e28a",
"type": "input", "id": 1, "name": "Input 1",
"promoters": [
{"type": "promoter", "eid": "02d32d2742a2494f98a641b3c535d0fe",
"name": "Promoter 1", "id": 1}
],
"receptor": {
"type": "receptor", "eid": "418d4ad9ebf04655a4815799af23a915",
"name": "Receptor 1", "id": 1
}
},
{
//input 2...
}
],
"schemes": [
{
"outputs": [
"51f0549840b54342bcaa4789e6a20239",
"b8d861b45b054c20a88a71f3b2be9e5c",
"5c0647b146174d36adfc278c365fa046"
],
"logic_gates": [
{
"id": 4, "name": "Not 1", "logic": "NOT",
"eid": "abab5341130042cca9ecadcba0156570",
"inputs": [
"51f0549840b54342bcaa4789e6a20239"
],
},
{
"id": 3, "name": "Or 1", "logic": "OR",
"eid": "58d44e82aa1c4ca0bf3983583fedc556",
"inputs": [
"c5820968a77f4c278093a048fe60e28a",
"51f0549840b54342bcaa4789e6a20239"
],
},
{
//其他逻辑门
}
]
},
{
//其他方案
}
]
}
每个元件用eid来唯一标识。
其他的还在设计,尽快写~
GET
/biobrick/<type><type>可取值input、output、receptor、promoter,获取某种元件的列表。返回格式:GET
/biobrick/<type>?id=XXX根据ID获取某个元件的信息。返回格式:
GET
/biobrick/suggest/promoters?input_id=XXX根据Input推荐Promoter。返回格式:
GET
/biobrick/suggest/receptors?input_id=XXX&promoter_id=YYY根据Input和Promoter推荐Receptor。返回格式:
POST
/circuit/schemes根据真值表设计通路。(目前的算法实现只能处理完整的真值表)
请求格式:
响应格式:
每个元件用
eid来唯一标识。其他的还在设计,尽快写~