API for Server Data Queries: Difference between revisions

From Eterna Wiki

(Created initial page)
 
No edit summary
Line 2: Line 2:
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>For the moment,&nbsp; this is focused on documenting the 9/26 changes that broke a bunch of existing scripts.</p>
<p>For the moment,&nbsp; this is focused on documenting the 9/26 changes that broke a bunch of existing scripts.</p>
<p>&nbsp;</p>
<p>The type=lab query returns less info than before, most notably the secondary structure.&nbsp; Here's a sample response now</p>
<p>{"data":{"lab":null,"comments":[{"cid":"29250","name":"ElNando888","uid":"49507","comment":"Voted.  Interesting project. Maybe in a subsequent experiment, it could be  expanded to the more generic GNRA form. Which prompts me that R (or Y or  M) constraints on individual bases do not exist (yet). I'll try to not  forget to ask for it in the upcoming dev chat.","created":"15 May  2013","picture":"sites\/default\/files\/pictures\/picture-49507.png"},{"cid":"29263","name":"wateronthemoon","uid":"57743","comment":"A  great fundamental question, noted in reviewing lab results. +1. (Now if  i can only figure out the rules to design something  too.)","created":"16 May  2013","picture":"sites\/default\/files\/pictures\/picture-57743.jpg"}],"supercomments":[{"cid":"29247","name":"Omei","uid":"57675","comment":"Seems  like it isn't possible to tell with the current UI, but the puzzle  submission has all the tetraloops locked into a GAAA  sequence.","created":"15 May  2013","picture":"sites\/default\/files\/pictures\/picture-57675.png"}],"num_slots":null,"num_synthesized":0,"follow":[{"nid":"2857463","uid":"57675","id":"2857430","updated_time":"1368649258","expired_time":null,"type":"node"}],"sum_picks":"40","num_solutions":null,"my_votes":0,"uid":"57675"},"memcache":true}</p>
<p>&nbsp;</p>
<p>To get the secondary structure, there's a new type=lab_puzzle that starts out with</p>
<p>&nbsp;</p>
<p>{"data":{"puzzle":{"nid":"2857430","title":"The GAAA  loop","secstruct":"((.(((((....))))).(((((....)).((((....)))).)))..))..(((....))).(((((((....))))))).","rna_type":"single","object":null,"cover_image":null,"num_slots":"40","synthesized_solutions":[{"title":"GAAA  Loop 2z","id":"2872419","created":"1369076516","body":"No  comment","sequence":"GGAAAGCAGAUGGGAAACCAUCAGGCCGGAAACGAGCAGGAAACUGCAGCCAAGCAAGCGGAAACGCAGAGUACCUUCGGGUACUCAAAAGAAACAACAACAACAAC","puznid":"2857430","name":"Zanna","uid":"87216","picture":"sites\/default\/files\/pictures\/picture-87216.jpg","synthesis-score":"93","synthesis-round":"1","submitted-round":"1","gu":"0","gc":"20","au":"6","meltpoint":"107.00","energy":"-51.1","SHAPE":"1,  0.708, 0.7335, 1.1768, 0.6047, 0.7158, 0.3601, 0.3418, 0.4304, 0.1566,  0.0495, 0.0165, 0.0989, 0.033, 0.1972, 0.7872, 0.3466, 0.4178, 0.0321,  0.0161, 0.0139, 0.039, 0.2145, 0.2653, 0.6008, 0.3247, 0.1176, 0.0845,  0.2583, 0.9568, 1.2771, 1.2119, 0.4502, 0.2249, 0.9119, 1.175, 0.1892,  0.1214, 0.1837, 0.2113, 0.5323, 1.2314, 0.7564, 0.5279, 0.1902, 0.1093,  0.0402, 0.0689, 0.2536, 0.5254, 0.1629, 0.2216, 0.6726, 1.0855, 0.5482,  0.6624, 0.9893, 1.084, 0.2315, 0.0854, 0.3391, 0.1929, 1.099, 0.8844,  0.3507, 0.1385, 0.0801, 0.3576, 0.586, 0.1796, 0.0631, 0.021, 0.0457,  0.1595, 0.0436, 0.2587, 0.5577, 0.2353, 0.3346, 0,  0","SHAPE-threshold":"0.388","SHAPE-max":"0.712","SHAPE-min":"0.065","synthesis-data":"[{\"start_index\":1,\"target_index\":0,\"reactive\":\"SHAPE\", ...</p>
<p>&nbsp;</p>
<p>&nbsp;</p>

Revision as of 17:13, 27 September 2013

The intent for this page is to document the RESTful interface to the Eterna data.

 

For the moment,  this is focused on documenting the 9/26 changes that broke a bunch of existing scripts.

 

The type=lab query returns less info than before, most notably the secondary structure.  Here's a sample response now

{"data":{"lab":null,"comments":[{"cid":"29250","name":"ElNando888","uid":"49507","comment":"Voted. Interesting project. Maybe in a subsequent experiment, it could be expanded to the more generic GNRA form. Which prompts me that R (or Y or M) constraints on individual bases do not exist (yet). I'll try to not forget to ask for it in the upcoming dev chat.","created":"15 May 2013","picture":"sites\/default\/files\/pictures\/picture-49507.png"},{"cid":"29263","name":"wateronthemoon","uid":"57743","comment":"A great fundamental question, noted in reviewing lab results. +1. (Now if i can only figure out the rules to design something too.)","created":"16 May 2013","picture":"sites\/default\/files\/pictures\/picture-57743.jpg"}],"supercomments":[{"cid":"29247","name":"Omei","uid":"57675","comment":"Seems like it isn't possible to tell with the current UI, but the puzzle submission has all the tetraloops locked into a GAAA sequence.","created":"15 May 2013","picture":"sites\/default\/files\/pictures\/picture-57675.png"}],"num_slots":null,"num_synthesized":0,"follow":[{"nid":"2857463","uid":"57675","id":"2857430","updated_time":"1368649258","expired_time":null,"type":"node"}],"sum_picks":"40","num_solutions":null,"my_votes":0,"uid":"57675"},"memcache":true}

 

To get the secondary structure, there's a new type=lab_puzzle that starts out with

 

{"data":{"puzzle":{"nid":"2857430","title":"The GAAA loop","secstruct":"((.(((((....))))).(((((....)).((((....)))).)))..))..(((....))).(((((((....))))))).","rna_type":"single","object":null,"cover_image":null,"num_slots":"40","synthesized_solutions":[{"title":"GAAA Loop 2z","id":"2872419","created":"1369076516","body":"No comment","sequence":"GGAAAGCAGAUGGGAAACCAUCAGGCCGGAAACGAGCAGGAAACUGCAGCCAAGCAAGCGGAAACGCAGAGUACCUUCGGGUACUCAAAAGAAACAACAACAACAAC","puznid":"2857430","name":"Zanna","uid":"87216","picture":"sites\/default\/files\/pictures\/picture-87216.jpg","synthesis-score":"93","synthesis-round":"1","submitted-round":"1","gu":"0","gc":"20","au":"6","meltpoint":"107.00","energy":"-51.1","SHAPE":"1, 0.708, 0.7335, 1.1768, 0.6047, 0.7158, 0.3601, 0.3418, 0.4304, 0.1566, 0.0495, 0.0165, 0.0989, 0.033, 0.1972, 0.7872, 0.3466, 0.4178, 0.0321, 0.0161, 0.0139, 0.039, 0.2145, 0.2653, 0.6008, 0.3247, 0.1176, 0.0845, 0.2583, 0.9568, 1.2771, 1.2119, 0.4502, 0.2249, 0.9119, 1.175, 0.1892, 0.1214, 0.1837, 0.2113, 0.5323, 1.2314, 0.7564, 0.5279, 0.1902, 0.1093, 0.0402, 0.0689, 0.2536, 0.5254, 0.1629, 0.2216, 0.6726, 1.0855, 0.5482, 0.6624, 0.9893, 1.084, 0.2315, 0.0854, 0.3391, 0.1929, 1.099, 0.8844, 0.3507, 0.1385, 0.0801, 0.3576, 0.586, 0.1796, 0.0631, 0.021, 0.0457, 0.1595, 0.0436, 0.2587, 0.5577, 0.2353, 0.3346, 0, 0","SHAPE-threshold":"0.388","SHAPE-max":"0.712","SHAPE-min":"0.065","synthesis-data":"[{\"start_index\":1,\"target_index\":0,\"reactive\":\"SHAPE\", ...