# HG changeset patch
# User bgruening
# Date 1520931531 14400
# Node ID 3326dd4f1e8d4442889bc15a18dcf1286ea8fdbc
# Parent 8e02b727dd7432b3fccd03e4332bb844a32e2f97
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 641ac64ded23fbb6fe85d5f13926da12dcce4e76
diff -r 8e02b727dd74 -r 3326dd4f1e8d generalized_linear.xml
--- a/generalized_linear.xml Fri Feb 16 14:57:09 2018 -0500
+++ b/generalized_linear.xml Tue Mar 13 04:58:51 2018 -0400
@@ -33,12 +33,24 @@
options = params["selected_tasks"]["selected_algorithms"]["options"]
#if $selected_tasks.selected_algorithms.input_options.selected_input=="tabular":
-X = columns("$selected_tasks.selected_algorithms.input_options.infile1","$selected_tasks.selected_algorithms.input_options.col1")
+X = read_columns(
+ "$selected_tasks.selected_algorithms.input_options.infile1",
+ "$selected_tasks.selected_algorithms.input_options.col1",
+ sep='\t',
+ header=None,
+ parse_dates=True
+)
#else:
X = mmread(open("$selected_tasks.selected_algorithms.input_options.infile1", 'r'))
#end if
-y = columns("$selected_tasks.selected_algorithms.input_options.infile2","$selected_tasks.selected_algorithms.input_options.col2")
+y = read_columns(
+ "$selected_tasks.selected_algorithms.input_options.infile2",
+ "$selected_tasks.selected_algorithms.input_options.col2",
+ sep='\t',
+ header=None,
+ parse_dates=True
+)
my_class = getattr(sklearn.linear_model, algorithm)
estimator = my_class(**options)
diff -r 8e02b727dd74 -r 3326dd4f1e8d main_macros.xml
--- a/main_macros.xml Fri Feb 16 14:57:09 2018 -0500
+++ b/main_macros.xml Tue Mar 13 04:58:51 2018 -0400
@@ -2,8 +2,8 @@
0.9
-def columns(f,c):
- data = pandas.read_csv(f, sep='\t', header=None, index_col=None, parse_dates=True, encoding=None, tupleize_cols=False)
+def read_columns(f, c, **args):
+ data = pandas.read_csv(f, **args)
cols = c.split (',')
cols = map(int, cols)
cols = list(map(lambda x: x - 1, cols))