# HG changeset patch
# User pablocarb
# Date 1565169207 14400
# Node ID d854b21ada0c41a7c125c004ee1d2877cdf16a39
# Parent 501f39987c9b0c0b8f27b1e0db5c26b66f39927a
planemo upload commit c56eddc745b70354680c2a2b605840ed72bb98ef
diff -r 501f39987c9b -r d854b21ada0c README.md
--- a/README.md Fri Aug 02 05:27:32 2019 -0400
+++ b/README.md Wed Aug 07 05:13:27 2019 -0400
@@ -36,4 +36,13 @@
- [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
+- [ ] Write documentiation about the design specifications sheet.
+
+## galaxy_RPViz
+
+A tool to visualize pathways by querying an RPViz server.
+
+`RPViz` returns an interactive HTML file that requires javascript. The `RPViz` tool has to be included in the [Galaxy whitelist](https://docs.galaxyproject.org/en/latest/admin/config.html).
+
+
+
diff -r 501f39987c9b -r d854b21ada0c rpVisualizer.xml
--- a/rpVisualizer.xml Fri Aug 02 05:27:32 2019 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-
- Pathway visualizer
-
- python-libsbml
- networkx
- beautifulsoup4
- rdkit
-
- $__tool_directory__/info.log;
- PYTHONPATH="$__tool_directory__" python $__tool_directory__/toolVisualizer.py $input1 $output1
- ]]>
-
-
-
-
-
-
-
-
diff -r 501f39987c9b -r d854b21ada0c rpviz.xml
--- a/rpviz.xml Fri Aug 02 05:27:32 2019 -0400
+++ b/rpviz.xml Wed Aug 07 05:13:27 2019 -0400
@@ -4,7 +4,7 @@
requests
@@ -19,6 +19,6 @@
diff -r 501f39987c9b -r d854b21ada0c toolRPViz.py
--- a/toolRPViz.py Fri Aug 02 05:27:32 2019 -0400
+++ b/toolRPViz.py Wed Aug 07 05:13:27 2019 -0400
@@ -13,6 +13,7 @@
import os
import json
import tarfile
+import shutil
def arguments():
parser = argparse.ArgumentParser(description='toolRPViz: Pathway visualizer. Pablo Carbonell, SYNBIOCHEM, 2019')
@@ -39,13 +40,13 @@
print( res )
def pathwayUpload( arg ):
- files = { 'file': open(arg.infile, 'rb' ) }
+ # Post request
data = {'selenzyme_table': arg.selenzyme_table, 'input_format': arg.input_format}
+ files = { 'file': open(arg.infile, 'rb' ), 'data': ('data.json', json.dumps(data)) }
print('Sending query to '+arg.server)
- r=requests.post( arg.server+'/Query',files=files,data=data )
- if arg.outfolder is None:
- arg.outfolder = os.path.dirname( arg.outfile )
- if not os.path.exists(outfolder):
+ r=requests.post(arg.server+'/Query',files=files)
+ # Read response
+ if not os.path.exists(arg.outfolder):
os.mkdir(arg.outfolder)
outtar = os.path.join( arg.outfolder, 'out.tar' )
open(outtar,'wb').write( r.content )
@@ -53,7 +54,7 @@
tar = tarfile.open(outtar)
tar.extractall(path=arg.outfolder)
html = os.path.join( arg.outfolder, 'index.html' )
- shutil.cp( html, arg.outfile )
+ shutil.copy( html, arg.outfile )
print( 'Files extracted' )
diff -r 501f39987c9b -r d854b21ada0c toolVisualizer.py
--- a/toolVisualizer.py Fri Aug 02 05:27:32 2019 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +0,0 @@
-#!/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 )