# HG changeset patch
# User bgruening
# Date 1539152968 14400
# Node ID 7b21a9b5922f7ab612874ae1e121cfb63288380a
# Parent 7b2455348edfbc354869f128f35b5d1096472896
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/plotly_parallel_coordinates_plot commit 7ba5d8f0e920dccbc82588e4f4a7b9039dc3ea36
diff -r 7b2455348edf -r 7b21a9b5922f paracords_plot.py
--- a/paracords_plot.py Sun Sep 23 07:52:27 2018 -0400
+++ b/paracords_plot.py Wed Oct 10 02:29:28 2018 -0400
@@ -4,7 +4,7 @@
import plotly.graph_objs as go
import pandas as pd
-def main(infile, col_dimensions, col_color):
+def main(infile, col_dimensions, categorized, col_color):
"""
Produce an interactive paracords plotting html
Args:
@@ -18,13 +18,13 @@
col_dimensions = [int(x)-1 for x in col_dimensions.split(',')]
for col in col_dimensions:
values = df[df.columns[col]]
- if all(type(e) is int for e in values ):
+ if categorized == 'boolfalse' and all(type(e) is int for e in values ):
dimensions.append(
dict( values = values,
tickformat = ",.2r",
label = df.columns[col])
)
- elif all(type(e) is float for e in values ):
+ elif categorized == 'boolfalse' and all(type(e) is float for e in values ):
dimensions.append(
dict( values = values,
tickformat = "g",
@@ -32,6 +32,7 @@
)
else:
unique_values = list(set(values))
+ unique_values.sort()
dimensions.append(
dict( range = [0, len(unique_values)-1],
tickvals = list(range(len(unique_values))),
@@ -77,7 +78,8 @@
aparser = argparse.ArgumentParser()
aparser.add_argument( "-i", "--input", dest="infile", required=True)
aparser.add_argument( "-d", "--col_dimensions", dest="col_dimensions")
+ aparser.add_argument( "-t", "--categorized_datatype", dest="categorized")
aparser.add_argument( "-c", "--col_color", dest="col_color")
args = aparser.parse_args()
- main(args.infile, args.col_dimensions, args.col_color)
\ No newline at end of file
+ main(args.infile, args.col_dimensions, args.categorized, args.col_color)
\ No newline at end of file
diff -r 7b2455348edf -r 7b21a9b5922f paracords_plot.xml
--- a/paracords_plot.xml Sun Sep 23 07:52:27 2018 -0400
+++ b/paracords_plot.xml Wed Oct 10 02:29:28 2018 -0400
@@ -10,12 +10,14 @@
python '$__tool_directory__/paracords_plot.py'
-i '$infile'
-d '$col_dimensions'
+ -t '$categorized_datatype'
-c '$col_color'
]]>
+
@@ -26,12 +28,14 @@
+
+