changeset 11:bce330b97d42 draft

planemo upload commit 58fe26f452c61f1682290f662666043937943b81-dirty
author pablocarb
date Tue, 11 Jun 2019 04:04:24 -0400
parents 6a1fbacdfaf5
children ced66a3d2814
files README.md Selenzyme_query.ipynb maketool.sh out.csv out1.csv reaction2.csv rpviz.xml selenzyme_tool.py toolVisualizer.py
diffstat 9 files changed, 90 insertions(+), 466 deletions(-) [+]
line wrap: on
line diff
--- a/README.md	Fri May 03 05:18:02 2019 -0400
+++ b/README.md	Tue Jun 11 04:04:24 2019 -0400
@@ -2,7 +2,7 @@
 
 ## galaxy_selenzyme
 
-Creating a tool within Galaxy to run Selenzyme.
+Creating a tool within Galaxy to run [Selenzyme](http://selenzyme.synbiochem.co.uk).
 
 See:
 
@@ -21,3 +21,19 @@
 - [x] Install in the Galaxy container from the toolshed.
 - [ ] Create a tool using Galaxy XML that post JSON request and receives a JSON response (no local tool running in the Galaxy server).
 - [ ] Submit the purely XML tool to the [Galaxy Tool Shed](https://toolshed.g2.bx.psu.edu/).
+
+To learn more about Selenzyme:
+
+Carbonell, Pablo, et al. Selenzyme: enzyme selection tool for pathway design. *Bioinformatics* 34: 2153-2154, (2018). https://doi.org/10.1093/bioinformatics/bty065
+
+## galaxy_OptBioDes
+
+Creating a tool within Galaxy to run OptBioDes (optimal design of experiments).
+
+Plan:
+- [x] Create a basic command line tool using Python that submits a ``CSV`` with the design specifications sheet.
+- [x] Create a Galaxy Tool XML file.
+- [x] Use planemo in order to create a repository in the toolshed.
+- [x] Register in the toolshed.
+- [x] Install in the Galaxy container from the toolshed.
+- [ ] Write documentiation about the design specifications sheet.
\ No newline at end of file
--- a/Selenzyme_query.ipynb	Fri May 03 05:18:02 2019 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,280 +0,0 @@
-{
- "cells": [
-  {
-   "cell_type": "code",
-   "execution_count": 1,
-   "metadata": {},
-   "outputs": [],
-   "source": [
-    "import json\n",
-    "import os\n",
-    "import sys\n",
-    "import time\n",
-    "import signal\n",
-    "import datetime\n",
-    "import logging\n",
-    "import copy\n",
-    "import requests"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 15,
-   "metadata": {},
-   "outputs": [],
-   "source": [
-    "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",
-    "targets = 2\n",
-    "noMSA = False"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": [
-    "Request with smarts string"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 16,
-   "metadata": {},
-   "outputs": [],
-   "source": [
-    "all_request_data = {'smarts': smarts, \"targets\": targets, \"noMSA\": noMSA}\n"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 18,
-   "metadata": {},
-   "outputs": [],
-   "source": [
-    "url = 'http://selenzyme.synbiochem.co.uk/REST'\n",
-    "url = 'http://localhost:5000/REST'\n",
-    "r = requests.post( os.path.join(url, 'Query') , json=all_request_data )\n",
-    "res = json.loads( r.content.decode('utf-8') )\n",
-    "assert res['data'] is not None\n",
-    "val = json.loads( res['data'] )\n",
-    "assert 'Seq. ID' in val and len(val['Seq. ID'])>0"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 19,
-   "metadata": {},
-   "outputs": [
-    {
-     "data": {
-      "text/plain": [
-       "{'app': 'Selenzy',\n",
-       " 'author': 'Synbiochem',\n",
-       " '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",
-       " 'version': '1.0'}"
-      ]
-     },
-     "execution_count": 19,
-     "metadata": {},
-     "output_type": "execute_result"
-    }
-   ],
-   "source": [
-    "res"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 5,
-   "metadata": {},
-   "outputs": [
-    {
-     "name": "stdout",
-     "output_type": "stream",
-     "text": [
-      "{'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"
-     ]
-    }
-   ],
-   "source": [
-    "print(val)"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": [
-    "Request with reaction DB and reaction ID following indications on http://selenzyme.synbiochem.co.uk/"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 6,
-   "metadata": {},
-   "outputs": [],
-   "source": [
-    "all_request_data = {\"db\": \"mnx\", \"rxnid\": \"MNXR141534\", \"targets\": targets, \"noMSA\": noMSA}"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 7,
-   "metadata": {
-    "scrolled": true
-   },
-   "outputs": [
-    {
-     "ename": "AssertionError",
-     "evalue": "",
-     "output_type": "error",
-     "traceback": [
-      "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
-      "\u001b[0;31mAssertionError\u001b[0m                            Traceback (most recent call last)",
-      "\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",
-      "\u001b[0;31mAssertionError\u001b[0m: "
-     ]
-    }
-   ],
-   "source": [
-    "url = 'http://selenzyme.synbiochem.co.uk/REST'\n",
-    "r = requests.post( os.path.join(url, 'Query') , json=all_request_data )\n",
-    "res = json.loads( r.content.decode('utf-8') )\n",
-    "assert res['data'] is not None\n",
-    "val = json.loads( res['data'] )\n",
-    "assert 'Seq. ID' in val and len(val['Seq. ID'])>0"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": [
-    "Same reaction with its sabiork id"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 8,
-   "metadata": {},
-   "outputs": [],
-   "source": [
-    "all_request_data = {\"db\": \"sabiork\", \"rxnid\": \"12346\", \"targets\": targets, \"noMSA\": noMSA}"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 9,
-   "metadata": {},
-   "outputs": [
-    {
-     "ename": "AssertionError",
-     "evalue": "",
-     "output_type": "error",
-     "traceback": [
-      "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
-      "\u001b[0;31mAssertionError\u001b[0m                            Traceback (most recent call last)",
-      "\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",
-      "\u001b[0;31mAssertionError\u001b[0m: "
-     ]
-    }
-   ],
-   "source": [
-    "url = 'http://selenzyme.synbiochem.co.uk/REST'\n",
-    "r = requests.post( os.path.join(url, 'Query') , json=all_request_data )\n",
-    "res = json.loads( r.content.decode('utf-8') )\n",
-    "assert res['data'] is not None\n",
-    "val = json.loads( res['data'] )\n",
-    "assert 'Seq. ID' in val and len(val['Seq. ID'])>0"
-   ]
-  },
-  {
-   "cell_type": "markdown",
-   "metadata": {},
-   "source": [
-    "same reaction with its EC number"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 73,
-   "metadata": {},
-   "outputs": [],
-   "source": [
-    "all_request_data = {\"db\": \"ec\", \"rxnid\": \"3.2.1.2\", \"targets\": targets, \"noMSA\": noMSA}"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 74,
-   "metadata": {
-    "scrolled": true
-   },
-   "outputs": [],
-   "source": [
-    "url = 'http://selenzyme.synbiochem.co.uk/REST'\n",
-    "r = requests.post( os.path.join(url, 'Query') , json=all_request_data )\n",
-    "res = json.loads( r.content.decode('utf-8') )\n",
-    "assert res['data'] is not None\n",
-    "val = json.loads( res['data'] )\n",
-    "assert 'Seq. ID' in val and len(val['Seq. ID'])>0"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": 75,
-   "metadata": {},
-   "outputs": [
-    {
-     "data": {
-      "text/plain": [
-       "{'app': 'Selenzy',\n",
-       " 'author': 'Synbiochem',\n",
-       " '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",
-       " 'version': '1.0'}"
-      ]
-     },
-     "execution_count": 75,
-     "metadata": {},
-     "output_type": "execute_result"
-    }
-   ],
-   "source": [
-    "res"
-   ]
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {},
-   "outputs": [],
-   "source": []
-  },
-  {
-   "cell_type": "code",
-   "execution_count": null,
-   "metadata": {},
-   "outputs": [],
-   "source": []
-  }
- ],
- "metadata": {
-  "anaconda-cloud": {},
-  "kernelspec": {
-   "display_name": "Python 3",
-   "language": "python",
-   "name": "python3"
-  },
-  "language_info": {
-   "codemirror_mode": {
-    "name": "ipython",
-    "version": 3
-   },
-   "file_extension": ".py",
-   "mimetype": "text/x-python",
-   "name": "python",
-   "nbconvert_exporter": "python",
-   "pygments_lexer": "ipython3",
-   "version": "3.6.6"
-  }
- },
- "nbformat": 4,
- "nbformat_minor": 2
-}
--- a/maketool.sh	Fri May 03 05:18:02 2019 -0400
+++ b/maketool.sh	Tue Jun 11 04:04:24 2019 -0400
@@ -27,6 +27,20 @@
     --example_input 'example.xlsx' \
     --example_output 'out.csv out2.csv' \
     --help_from_command 'python3 toolOptBioDes.py -h'
+
+# Generate tool backbone (additional params need to be entered manually 
+planemo tool_init --force \
+    --id 'rpviz' \
+    --name 'rpVisualizer' \
+    --description 'Pathway visualizer' \
+    --requirement libsbml \
+    --requirement networkx \
+    --requirement beatifulsoup4 \
+    --example_command 'python $__tool_directory__/toolVisualizer.py $input1 $output1' \
+    --example_input 'path.sbml' \
+    --example_output 'out.html' \
+    --help_from_command 'python3 toolVisualizer.py -h'
+
    
 # Init shed repository
 planemo shed_init . --force \
--- a/out.csv	Fri May 03 05:18:02 2019 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-Seq. ID,Score,Organism Source,Description
-Q56114,91.7,Salmonella typhi ,Aspartate aminotransferase
-Q53IZ1,89.9,Pseudomonas sp. ,Bifunctional aspartate aminotransferase and L-aspartate beta-decarboxylase
-P44425,88.7,Haemophilus influenzae (strain ATCC 51907 / DSM 11121 / KW20 / Rd) ,Aspartate aminotransferase
-Q3IED5,88.7,Pseudoalteromonas haloplanktis (strain TAC 125) ,AspC protein
-Q93QX0,87.9,Comamonas testosteroni ,Bifunctional aspartate aminotransferase and L-aspartate beta-decarboxylase
-P52069,86.7,Methylobacterium extorquens PE=3 SV=1,Putative aspartate aminotransferase (Fragment)
-O86459,85.7,Rhizobium leguminosarum bv. phaseoli ,Aspartate aminotransferase
-Q54SF7,84.7,Dictyostelium discoideum ,Aspartate aminotransferase; cytoplasmic
-Q55F21,84.7,Dictyostelium discoideum ,Aspartate aminotransferase; mitochondrial
-Q9ZE56,84.7,Rickettsia prowazekii (strain Madrid E) ,Aspartate aminotransferase
-O67781,84.7,Aquifex aeolicus (strain VF5) ,Aspartate aminotransferase
-O33822,84.7,Thermus aquaticus ,Aspartate aminotransferase
-Q60013,84.7,Streptomyces virginiae ,Aspartate aminotransferase
-Q68XV9,84.7,Rickettsia typhi (strain ATCC VR-144 / Wilmington) ,Aspartate aminotransferase
-Q1RGV0,84.7,Rickettsia bellii (strain RML369-C) ,Aspartate aminotransferase
-Q56232,83.9,Thermus thermophilus (strain HB8 / ATCC 27634 / DSM 579) ,Aspartate aminotransferase
-P9WQ90,82.7,Mycobacterium tuberculosis (strain CDC 1551 / Oshkosh) ,Probable aspartate aminotransferase
-Q9V0L2,82.7,Pyrococcus abyssi (strain GE5 / Orsay) ,Aspartate aminotransferase
-Q60317,82.7,Methanocaldococcus jannaschii (strain ATCC 43067 / DSM 2661 / JAL-1 / JCM 10045 / NBRC 100440) ,Probable aspartate aminotransferase 1
-O93744,82.7,Thermococcus kodakarensis (strain ATCC BAA-918 / JCM 12380 / KOD1) ,Aspartate aminotransferase
-P39643,81.7,Bacillus subtilis (strain 168) ,Probable aspartate aminotransferase
-Q972A2,81.7,Sulfolobus tokodaii (strain DSM 16993 / JCM 10545 / NBRC 100140 / 7) ,Aspartate aminotransferase
-Q4J8X2,81.7,Sulfolobus acidocaldarius (strain ATCC 33909 / DSM 639 / JCM 8929 / NBRC 15157 / NCIMB 11770) ,Aspartate aminotransferase
-P53001,81.7,Bacillus subtilis (strain 168) ,Aspartate aminotransferase
-O42652,78.7,Schizosaccharomyces pombe (strain 972 / ATCC 24843) ,Aspartate aminotransferase; cytoplasmic
-O94320,78.7,Schizosaccharomyces pombe (strain 972 / ATCC 24843) ,Aspartate aminotransferase; mitochondrial
-P23542,77.9,Saccharomyces cerevisiae (strain ATCC 204508 / S288c) ,Aspartate aminotransferase; cytoplasmic
-P85951,76.9,Pseudotsuga menziesii PE=1 SV=1,Aspartate aminotransferase 2 (Fragments)
-P85906,76.9,Pseudotsuga menziesii PE=1 SV=1,Aspartate aminotransferase 1 (Fragments)
-Q5F4K8,75.9,Pinus pinaster ,Aspartate aminotransferase
-E9L7A5,70.9,Petunia hybrida PE=1 SV=1,Bifunctional aspartate aminotransferase and glutamate/aspartate-prephenate aminotransferase
-P46645,70.9,Arabidopsis thaliana ,Aspartate aminotransferase; cytoplasmic isozyme 1
-Q9SIE1,70.9,Arabidopsis thaliana ,Bifunctional aspartate aminotransferase and glutamate/aspartate-prephenate aminotransferase
-P26563,69.8,Lupinus angustifolius PE=2 SV=1,Aspartate aminotransferase P2; mitochondrial (Fragment)
-P85310,68.9,Catharanthus roseus PE=1 SV=1,Aspartate aminotransferase; mitochondrial (Fragments)
-Q42391,68.8,Panicum miliaceum ,Aspartate aminotransferase
-P37833,68.8,Oryza sativa subsp. japonica ,Aspartate aminotransferase; cytoplasmic
-Q43305,68.8,Panicum miliaceum ,Aspartate aminotransferase
-P12343,64.9,Oryctolagus cuniculus ,Aspartate aminotransferase; cytoplasmic (Fragment)
-P08907,64.9,Equus caballus ,Aspartate aminotransferase; mitochondrial
-P00506,64.9,Sus scrofa ,Aspartate aminotransferase; mitochondrial
-P12344,62.9,Bos taurus ,Aspartate aminotransferase; mitochondrial
-P33097,62.9,Bos taurus ,Aspartate aminotransferase; cytoplasmic
-P13221,61.9,Rattus norvegicus ,Aspartate aminotransferase; cytoplasmic
-P05202,60.9,Mus musculus ,Aspartate aminotransferase; mitochondrial
-P05201,60.9,Mus musculus ,Aspartate aminotransferase; cytoplasmic
-P17174,60.9,Homo sapiens ,Aspartate aminotransferase; cytoplasmic
-Q5R691,60.8,Pongo abelii ,Aspartate aminotransferase; cytoplasmic
-A5A6K8,60.8,Pan troglodytes ,Aspartate aminotransferase; cytoplasmic
-P00504,58.9,Gallus gallus ,Aspartate aminotransferase; cytoplasmic
--- a/out1.csv	Fri May 03 05:18:02 2019 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,129 +0,0 @@
-promoter3,promoter5,promoter7,promoter9,gene10,promoter11,pos
-1,3,2,2,1,0,0
-0,1,2,0,0,2,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v4:7](:[#6&v4:8](:[#7&+&v4:9](:[#6&v4:10]:1-[#1&v1:11])-[#6&v4:12]1(-[#8&v2:13]-[#6&v4:14](-[#6&v4:15](-[#8&v2:16]-[#15&v5:17])(-[#1&v1:18])-[#1&v1:19])(-[#6&v4:20](-[#8&v2:21]-[#1&v1:22])(-[#6&v4:23]-1(-[#8&v2:24]-[#1&v1:25])-[#1&v1:26])-[#1&v1:27])-[#1&v1:28])-[#1&v1:29])-[#1&v1:30])-[#1&v1:31])-[#1&v1:32])-[#1&v1:33])>>([#7&v3:1](=[#6&v4:2](-[#8&v2:3]-[#1&v1:4])-[#6&v4:5]1-[#6&v4:6](-[#6&v4:7](=[#6&v4:8](-[#7&+0&v3:9](-[#6&v4:10]=1-[#1&v1:11])-[#6&v4:12]1(-[#8&v2:13]-[#6&v4:14](-[#6&v4:15](-[#8&v2:16]-[#15&v5:17])(-[#1&v1:18])-[#1&v1:19])(-[#6&v4:20](-[#8&v2:21]-[#1&v1:22])(-[#6&v4:23]-1(-[#8&v2:24]-[#1&v1:25])-[#1&v1:26])-[#1&v1:27])-[#1&v1:28])-[#1&v1:29])-[#1&v1:30])-[#1&v1:31])(-[#1&v1:32])-[#1&v1])-[#1&v1:33])"
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/rpviz.xml	Tue Jun 11 04:04:24 2019 -0400
@@ -0,0 +1,28 @@
+<tool id="rpviz" name="rpVisualizer" version="0.1.0" python_template_version="3.5">
+    <description>Pathway visualizer</description>
+    <requirements>
+        <requirement type="package">libsbml</requirement>
+        <requirement type="package">networkx</requirement>
+        <requirement type="package">beatifulsoup4</requirement>
+        <requirement type="package">rdkit</requirement>
+    </requirements>
+    <command detect_errors="exit_code"><![CDATA[
+        if [ ! -d rpviz ]
+	then
+           git clone https://github.com/pablocarb/rpviz.git $__tool_directory__/rpviz > /dev/null
+	else
+	   cd $__tool_directory__/rpviz; git pull; cd ..
+	fi
+	cd $__tool_directory__
+        python $__tool_directory__/toolVisualizer.py $input1 $output1
+    ]]></command>
+    <inputs>
+        <param type="data" name="input1" format="sbml" />
+    </inputs>
+    <outputs>
+        <data name="output1" format="html" from_work_dir="out.html" />
+    </outputs>
+    <help><![CDATA[
+        python3 toolVisualizer.py inputfile outputfile
+    ]]></help>
+</tool>
--- a/selenzyme_tool.py	Fri May 03 05:18:02 2019 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-import requests
-url = 'http://selenzyme.synbiochem.co.uk/REST'
-r = requests.post(url, data= {'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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/toolVisualizer.py	Tue Jun 11 04:04:24 2019 -0400
@@ -0,0 +1,31 @@
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+"""
+Created on Mar 19
+
+@author: Pablo Carbonell
+@description: Pathway visualizer.
+
+"""
+import argparse
+import os
+from rpviz.main import run
+
+def arguments():
+    parser = argparse.ArgumentParser(description='toolVisualizer: Pathway visualizer. Pablo Carbonell, SYNBIOCHEM, 2019')
+    parser.add_argument('infile', 
+                        help='Input SBML pathway file.')
+    parser.add_argument('outfile', 
+                        help='Output HTML file.')
+    return parser
+    
+def runVisualizer( infile, outfile ):
+    run(infile,outfile)
+
+
+
+if __name__ == "__main__":
+    parser = arguments()
+    arg = parser.parse_args()
+    assert os.path.exists(arg.infile)
+    runVisualizer( arg.infile, arg.outfile )