annotate Selenzyme_query.ipynb @ 1:b0b7deebb71e draft

planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
author pablocarb
date Mon, 29 Apr 2019 10:53:09 -0400
parents ac027c9ace4d
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
1 {
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
2 "cells": [
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
3 {
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
4 "cell_type": "code",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
5 "execution_count": 1,
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
6 "metadata": {},
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
7 "outputs": [],
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
8 "source": [
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
9 "import json\n",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
10 "import os\n",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
11 "import sys\n",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
12 "import time\n",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
13 "import signal\n",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
14 "import datetime\n",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
15 "import logging\n",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
16 "import copy\n",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
17 "import requests"
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
18 ]
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
19 },
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
20 {
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
21 "cell_type": "code",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
22 "execution_count": 15,
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
23 "metadata": {},
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
24 "outputs": [],
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
25 "source": [
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
26 "smarts = \"O=C([O-])CCC(=O)C(=O)[O-].NC(CC(=O)[O-])C(=O)O>>O=C([O-])CC(=O)C(=O)[O-].NC(CCC(=O)[O-])C(=O)O\"\n",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
27 "targets = 2\n",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
28 "noMSA = False"
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
29 ]
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
30 },
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
31 {
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
32 "cell_type": "markdown",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
33 "metadata": {},
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
34 "source": [
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
35 "Request with smarts string"
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
36 ]
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
37 },
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
38 {
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
39 "cell_type": "code",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
40 "execution_count": 16,
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
41 "metadata": {},
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
42 "outputs": [],
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
43 "source": [
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
44 "all_request_data = {'smarts': smarts, \"targets\": targets, \"noMSA\": noMSA}\n"
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
45 ]
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
46 },
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
47 {
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
48 "cell_type": "code",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
49 "execution_count": 18,
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
50 "metadata": {},
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
51 "outputs": [],
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
52 "source": [
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
53 "url = 'http://selenzyme.synbiochem.co.uk/REST'\n",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
54 "url = 'http://localhost:5000/REST'\n",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
55 "r = requests.post( os.path.join(url, 'Query') , json=all_request_data )\n",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
56 "res = json.loads( r.content.decode('utf-8') )\n",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
57 "assert res['data'] is not None\n",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
58 "val = json.loads( res['data'] )\n",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
59 "assert 'Seq. ID' in val and len(val['Seq. ID'])>0"
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
60 ]
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
61 },
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
62 {
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
63 "cell_type": "code",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
64 "execution_count": 19,
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
65 "metadata": {},
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
66 "outputs": [
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
67 {
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
68 "data": {
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
69 "text/plain": [
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
70 "{'app': 'Selenzy',\n",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
71 " 'author': 'Synbiochem',\n",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
72 " 'data': '{\"Score\":{\"1\":163.7,\"2\":155.9},\"Seq. ID\":{\"1\":\"Q68XV9\",\"2\":\"P85951\"},\"Description\":{\"1\":\"Aspartate aminotransferase\",\"2\":\"Aspartate aminotransferase 2 (Fragments)\"},\"Organism Source\":{\"1\":\"Rickettsia typhi (strain ATCC VR-144 \\\\/ Wilmington) \",\"2\":\"Pseudotsuga menziesii PE=1 SV=1\"},\"Tax. distance\":{\"1\":15,\"2\":23},\"Rxn. ID\":{\"1\":\"MNXR32641\",\"2\":\"MNXR32641\"},\"EC Number\":{\"1\":\"2.6.1.1\",\"2\":\"2.6.1.1\"},\"Uniprot protein evidence\":{\"1\":3,\"2\":1},\"Consv. Score\":{\"1\":79.0,\"2\":79.0},\"Rxn Sim.\":{\"1\":1.0,\"2\":1.0},\"Direction Used\":{\"1\":1,\"2\":1},\"Direction Preferred\":{\"1\":0,\"2\":0},\"% helices\":{\"1\":42.6,\"2\":27.8},\"% sheets\":{\"1\":24.8,\"2\":72.2},\"% turns\":{\"1\":19.6,\"2\":5.6},\"% coils\":{\"1\":17.2,\"2\":83.3},\"Mol. Weight\":{\"1\":44337.23,\"2\":3587.11},\"Isoelec. Point\":{\"1\":8.3119,\"2\":10.4338},\"Polar %\":{\"1\":45.113,\"2\":41.176},\"Query\":{\"1\":\"O=C([O-])CCC(=O)C(=O)[O-].NC(CC(=O)[O-])C(=O)O>>O=C([O-])CC(=O)C(=O)[O-].NC(CCC(=O)[O-])C(=O)O\",\"2\":\"O=C([O-])CCC(=O)C(=O)[O-].NC(CC(=O)[O-])C(=O)O>>O=C([O-])CC(=O)C(=O)[O-].NC(CCC(=O)[O-])C(=O)O\"},\"Hit\":{\"1\":\"O=C([O-])CC(=O)C(=O)[O-].NC(CCC(=O)[O-])C(=O)O>>O=C([O-])CCC(=O)C(=O)[O-].NC(CC(=O)[O-])C(=O)O\",\"2\":\"O=C([O-])CC(=O)C(=O)[O-].NC(CCC(=O)[O-])C(=O)O>>O=C([O-])CCC(=O)C(=O)[O-].NC(CC(=O)[O-])C(=O)O\"}}',\n",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
73 " 'version': '1.0'}"
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
74 ]
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
75 },
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
76 "execution_count": 19,
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
77 "metadata": {},
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
78 "output_type": "execute_result"
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
79 }
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
80 ],
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
81 "source": [
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
82 "res"
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
83 ]
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
84 },
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
85 {
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
86 "cell_type": "code",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
87 "execution_count": 5,
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
88 "metadata": {},
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
89 "outputs": [
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
90 {
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
91 "name": "stdout",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
92 "output_type": "stream",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
93 "text": [
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
94 "{'Score': {'1': 136.7, '2': 125.9}, 'Seq. ID': {'1': 'P39643', '2': 'E9L7A5'}, 'Description': {'1': 'Probable aspartate aminotransferase', '2': 'Bifunctional aspartate aminotransferase and glutamate/aspartate-prephenate aminotransferase'}, 'Organism Source': {'1': 'Bacillus subtilis (strain 168) ', '2': 'Petunia hybrida PE=1 SV=1'}, 'Tax. distance': {'1': 18, '2': 29}, 'Rxn. ID': {'1': 'MNXR32641', '2': 'MNXR32641'}, 'EC Number': {'1': '2.6.1.1', '2': '2.6.1.1'}, 'Uniprot protein evidence': {'1': 3, '2': 1}, 'Consv. Score': {'1': 55.0, '2': 55.0}, 'Rxn Sim.': {'1': 1.0, '2': 1.0}, 'Direction Used': {'1': 1, '2': 1}, 'Direction Preferred': {'1': 0, '2': 0}, '% helices': {'1': 51.4, '2': 31.3}, '% sheets': {'1': 16.2, '2': 29.4}, '% turns': {'1': 13.8, '2': 18.6}, '% coils': {'1': 22.7, '2': 24.2}, 'Mol. Weight': {'1': 44702.91, '2': 51743.31}, 'Isoelec. Point': {'1': 5.4491, '2': 8.6228}, 'Polar %': {'1': 42.105, '2': 43.841}, 'Query': {'1': 'O=C([O-])CCC(=O)C(=O)[O-].NC(CC(=O)[O-])C(=O)O>>O=C([O-])CC(=O)C(=O)[O-].NC(CCC(=O)[O-])C(=O)O', '2': 'O=C([O-])CCC(=O)C(=O)[O-].NC(CC(=O)[O-])C(=O)O>>O=C([O-])CC(=O)C(=O)[O-].NC(CCC(=O)[O-])C(=O)O'}, 'Hit': {'1': 'O=C([O-])CC(=O)C(=O)[O-].NC(CCC(=O)[O-])C(=O)O>>O=C([O-])CCC(=O)C(=O)[O-].NC(CC(=O)[O-])C(=O)O', '2': 'O=C([O-])CC(=O)C(=O)[O-].NC(CCC(=O)[O-])C(=O)O>>O=C([O-])CCC(=O)C(=O)[O-].NC(CC(=O)[O-])C(=O)O'}}\n"
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
95 ]
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
96 }
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
97 ],
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
98 "source": [
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
99 "print(val)"
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
100 ]
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
101 },
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
102 {
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
103 "cell_type": "markdown",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
104 "metadata": {},
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
105 "source": [
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
106 "Request with reaction DB and reaction ID following indications on http://selenzyme.synbiochem.co.uk/"
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
107 ]
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
108 },
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
109 {
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
110 "cell_type": "code",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
111 "execution_count": 6,
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
112 "metadata": {},
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
113 "outputs": [],
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
114 "source": [
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
115 "all_request_data = {\"db\": \"mnx\", \"rxnid\": \"MNXR141534\", \"targets\": targets, \"noMSA\": noMSA}"
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
116 ]
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
117 },
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
118 {
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
119 "cell_type": "code",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
120 "execution_count": 7,
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
121 "metadata": {
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
122 "scrolled": true
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
123 },
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
124 "outputs": [
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
125 {
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
126 "ename": "AssertionError",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
127 "evalue": "",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
128 "output_type": "error",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
129 "traceback": [
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
130 "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
131 "\u001b[0;31mAssertionError\u001b[0m Traceback (most recent call last)",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
132 "\u001b[0;32m<ipython-input-7-b6f4ae0ef527>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[1;32m 2\u001b[0m \u001b[0mr\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mrequests\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpost\u001b[0m\u001b[0;34m(\u001b[0m \u001b[0mos\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpath\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mjoin\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0murl\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m'Query'\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m,\u001b[0m \u001b[0mjson\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mall_request_data\u001b[0m \u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3\u001b[0m \u001b[0mres\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mjson\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mloads\u001b[0m\u001b[0;34m(\u001b[0m \u001b[0mr\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcontent\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdecode\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'utf-8'\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 4\u001b[0;31m \u001b[0;32massert\u001b[0m \u001b[0mres\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'data'\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;32mis\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 5\u001b[0m \u001b[0mval\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mjson\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mloads\u001b[0m\u001b[0;34m(\u001b[0m \u001b[0mres\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'data'\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 6\u001b[0m \u001b[0;32massert\u001b[0m \u001b[0;34m'Seq. ID'\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mval\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0mlen\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mval\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'Seq. ID'\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m>\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
133 "\u001b[0;31mAssertionError\u001b[0m: "
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
134 ]
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
135 }
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
136 ],
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
137 "source": [
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
138 "url = 'http://selenzyme.synbiochem.co.uk/REST'\n",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
139 "r = requests.post( os.path.join(url, 'Query') , json=all_request_data )\n",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
140 "res = json.loads( r.content.decode('utf-8') )\n",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
141 "assert res['data'] is not None\n",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
142 "val = json.loads( res['data'] )\n",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
143 "assert 'Seq. ID' in val and len(val['Seq. ID'])>0"
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
144 ]
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
145 },
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
146 {
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
147 "cell_type": "markdown",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
148 "metadata": {},
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
149 "source": [
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
150 "Same reaction with its sabiork id"
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
151 ]
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
152 },
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
153 {
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
154 "cell_type": "code",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
155 "execution_count": 8,
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
156 "metadata": {},
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
157 "outputs": [],
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
158 "source": [
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
159 "all_request_data = {\"db\": \"sabiork\", \"rxnid\": \"12346\", \"targets\": targets, \"noMSA\": noMSA}"
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
160 ]
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
161 },
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
162 {
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
163 "cell_type": "code",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
164 "execution_count": 9,
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
165 "metadata": {},
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
166 "outputs": [
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
167 {
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
168 "ename": "AssertionError",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
169 "evalue": "",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
170 "output_type": "error",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
171 "traceback": [
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
172 "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
173 "\u001b[0;31mAssertionError\u001b[0m Traceback (most recent call last)",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
174 "\u001b[0;32m<ipython-input-9-b6f4ae0ef527>\u001b[0m in \u001b[0;36m<module>\u001b[0;34m()\u001b[0m\n\u001b[1;32m 2\u001b[0m \u001b[0mr\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mrequests\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpost\u001b[0m\u001b[0;34m(\u001b[0m \u001b[0mos\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpath\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mjoin\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0murl\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m'Query'\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m,\u001b[0m \u001b[0mjson\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mall_request_data\u001b[0m \u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 3\u001b[0m \u001b[0mres\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mjson\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mloads\u001b[0m\u001b[0;34m(\u001b[0m \u001b[0mr\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcontent\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mdecode\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'utf-8'\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 4\u001b[0;31m \u001b[0;32massert\u001b[0m \u001b[0mres\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'data'\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;32mis\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 5\u001b[0m \u001b[0mval\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mjson\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mloads\u001b[0m\u001b[0;34m(\u001b[0m \u001b[0mres\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'data'\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 6\u001b[0m \u001b[0;32massert\u001b[0m \u001b[0;34m'Seq. ID'\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mval\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0mlen\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mval\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0;34m'Seq. ID'\u001b[0m\u001b[0;34m]\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m>\u001b[0m\u001b[0;36m0\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
175 "\u001b[0;31mAssertionError\u001b[0m: "
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
176 ]
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
177 }
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
178 ],
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
179 "source": [
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
180 "url = 'http://selenzyme.synbiochem.co.uk/REST'\n",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
181 "r = requests.post( os.path.join(url, 'Query') , json=all_request_data )\n",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
182 "res = json.loads( r.content.decode('utf-8') )\n",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
183 "assert res['data'] is not None\n",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
184 "val = json.loads( res['data'] )\n",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
185 "assert 'Seq. ID' in val and len(val['Seq. ID'])>0"
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
186 ]
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
187 },
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
188 {
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
189 "cell_type": "markdown",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
190 "metadata": {},
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
191 "source": [
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
192 "same reaction with its EC number"
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
193 ]
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
194 },
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
195 {
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
196 "cell_type": "code",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
197 "execution_count": 73,
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
198 "metadata": {},
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
199 "outputs": [],
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
200 "source": [
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
201 "all_request_data = {\"db\": \"ec\", \"rxnid\": \"3.2.1.2\", \"targets\": targets, \"noMSA\": noMSA}"
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
202 ]
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
203 },
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
204 {
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
205 "cell_type": "code",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
206 "execution_count": 74,
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
207 "metadata": {
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
208 "scrolled": true
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
209 },
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
210 "outputs": [],
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
211 "source": [
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
212 "url = 'http://selenzyme.synbiochem.co.uk/REST'\n",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
213 "r = requests.post( os.path.join(url, 'Query') , json=all_request_data )\n",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
214 "res = json.loads( r.content.decode('utf-8') )\n",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
215 "assert res['data'] is not None\n",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
216 "val = json.loads( res['data'] )\n",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
217 "assert 'Seq. ID' in val and len(val['Seq. ID'])>0"
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
218 ]
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
219 },
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
220 {
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
221 "cell_type": "code",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
222 "execution_count": 75,
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
223 "metadata": {},
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
224 "outputs": [
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
225 {
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
226 "data": {
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
227 "text/plain": [
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
228 "{'app': 'Selenzy',\n",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
229 " 'author': 'Synbiochem',\n",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
230 " 'data': '{\"Score\":{\"1\":134.6,\"2\":121.9},\"Seq. ID\":{\"1\":\"Q9HHC8\",\"2\":\"O23553\"},\"Description\":{\"1\":\"Cyclomaltodextrinase\",\"2\":\"Beta-amylase 3; chloroplastic\"},\"Organism Source\":{\"1\":\"Thermococcus sp. B1001 \",\"2\":\"Arabidopsis thaliana \"},\"Tax. distance\":{\"1\":16,\"2\":29},\"Rxn. ID\":{\"1\":\"MNXR87651\",\"2\":\"MNXR87683\"},\"EC Number\":{\"1\":\"3.2.1\",\"2\":\"3.2.1.2\"},\"Uniprot protein evidence\":{\"1\":4,\"2\":1},\"Consv. Score\":{\"1\":51.0,\"2\":51.0},\"Rxn Sim.\":{\"1\":1.0,\"2\":1.0},\"Direction Used\":{\"1\":-1,\"2\":-1},\"Direction Preferred\":{\"1\":-1,\"2\":-1},\"% helices\":{\"1\":45.7,\"2\":33.8},\"% sheets\":{\"1\":20.7,\"2\":17.9},\"% turns\":{\"1\":18.5,\"2\":24.6},\"% coils\":{\"1\":17.7,\"2\":26.7},\"Mol. Weight\":{\"1\":78842.79,\"2\":61353.16},\"Isoelec. Point\":{\"1\":9.1162,\"2\":7.0599},\"Polar %\":{\"1\":45.455,\"2\":47.993},\"Query\":{\"1\":\"O.[*]OC1C(CO)OC(OC2C(CO)OC(O)C(O)C2O)C(O)C1O>>OCC1OC(OC2C(CO)OC(O)C(O)C2O)C(O)C(O)C1O\",\"2\":\"O.[*]OC1C(CO)OC(OC2C(CO)OC(O)C(O)C2O)C(O)C1O>>OCC1OC(OC2C(CO)OC(O)C(O)C2O)C(O)C(O)C1O\"},\"Hit\":{\"1\":\"O.[*]OC1C(CO)OC(OC2C(CO)OC(OC3C(CO)OC(O)C(O)C3O)C(O)C2O)C(O)C1O>>OCC1OC(OC2C(CO)OC(O)C(O)C2O)C(O)C(O)C1O.OCC1OC(O)C(O)C(O)C1O\",\"2\":\"O.[*]OC1C(CO)OC(OC2C(CO)OC(O)C(O)C2O)C(O)C1O>>OCC1OC(OC2C(CO)OC(O)C(O)C2O)C(O)C(O)C1O.[*]OC1C(CO)OC(OC2C(CO)OC(O)C(O)C2O)C(O)C1O\"}}',\n",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
231 " 'version': '1.0'}"
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
232 ]
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
233 },
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
234 "execution_count": 75,
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
235 "metadata": {},
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
236 "output_type": "execute_result"
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
237 }
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
238 ],
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
239 "source": [
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
240 "res"
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
241 ]
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
242 },
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
243 {
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
244 "cell_type": "code",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
245 "execution_count": null,
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
246 "metadata": {},
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
247 "outputs": [],
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
248 "source": []
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
249 },
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
250 {
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
251 "cell_type": "code",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
252 "execution_count": null,
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
253 "metadata": {},
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
254 "outputs": [],
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
255 "source": []
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
256 }
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
257 ],
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
258 "metadata": {
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
259 "anaconda-cloud": {},
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
260 "kernelspec": {
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
261 "display_name": "Python 3",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
262 "language": "python",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
263 "name": "python3"
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
264 },
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
265 "language_info": {
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
266 "codemirror_mode": {
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
267 "name": "ipython",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
268 "version": 3
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
269 },
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
270 "file_extension": ".py",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
271 "mimetype": "text/x-python",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
272 "name": "python",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
273 "nbconvert_exporter": "python",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
274 "pygments_lexer": "ipython3",
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
275 "version": "3.6.6"
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
276 }
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
277 },
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
278 "nbformat": 4,
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
279 "nbformat_minor": 2
ac027c9ace4d planemo upload commit 9e24fae395aeaca30c5bcdef80a21b7decb04042-dirty
pablocarb
parents:
diff changeset
280 }