changeset 2:504ea7ea42b1 draft

planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 641ac64ded23fbb6fe85d5f13926da12dcce4e76
author bgruening
date Tue, 13 Mar 2018 04:57:23 -0400 (2018-03-13)
parents 813b38053344
children 35b7a9c1c557
files clf_metrics.xml main_macros.xml
diffstat 2 files changed, 16 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/clf_metrics.xml	Fri Feb 16 14:56:35 2018 -0500
+++ b/clf_metrics.xml	Tue Mar 13 04:57:23 2018 -0400
@@ -27,8 +27,20 @@
 params = json.load(open(input_json_path, "r"))
 
 
-y_t = columns("$clf_metrics.infile1","$clf_metrics.col1")
-y_p = columns("$clf_metrics.infile2","$clf_metrics.col2")
+y_t = read_columns(
+        "$clf_metrics.infile1",
+        "$clf_metrics.col1",
+        sep='\t',
+        header=None,
+        parse_dates=True
+)
+y_p = read_columns(
+        "$clf_metrics.infile2",
+        "$clf_metrics.col2",
+        sep='\t',
+        header=None,
+        parse_dates=True
+)
 
 options = params["clf_metrics"].get("options", {})
 print(options)
--- a/main_macros.xml	Fri Feb 16 14:56:35 2018 -0500
+++ b/main_macros.xml	Tue Mar 13 04:57:23 2018 -0400
@@ -2,8 +2,8 @@
   <token name="@VERSION@">0.9</token>
 
   <token name="@COLUMNS_FUNCTION@">
-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))