# HG changeset patch
# User bgruening
# Date 1528195628 14400
# Node ID d147f912b882bb98baca40a83dec5494edd8703a
# Parent 5fc54e80a39fb896bc706a51e69512601829d1aa
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 97c4f22cdcfa6cddeeffc7b102c418a7ff12a888
diff -r 5fc54e80a39f -r d147f912b882 clf_metrics.xml
--- a/clf_metrics.xml Wed May 30 08:26:13 2018 -0400
+++ b/clf_metrics.xml Tue Jun 05 06:47:08 2018 -0400
@@ -27,18 +27,30 @@
params = json.load(open(input_json_path, "r"))
header='infer' if params["clf_metrics"].get("header1", None) else None
+column_option = params["clf_metrics"]["column_selector_options_1"]["selected_column_selector_option"]
+if column_option == "by_index_number":
+ c = params["clf_metrics"]["column_selector_options_1"]["col1"]
+else:
+ c = None
y_t = read_columns(
"$clf_metrics.infile1",
- "$clf_metrics.col1",
+ c = c,
+ c_option = column_option,
sep='\t',
header=header,
parse_dates=True
)
header='infer' if params["clf_metrics"].get("header2", None) else None
+column_option = params["clf_metrics"]["column_selector_options_2"]["selected_column_selector_option2"]
+if column_option == "by_index_number":
+ c = params["clf_metrics"]["column_selector_options_2"]["col2"]
+else:
+ c = None
y_p = read_columns(
"$clf_metrics.infile2",
- "$clf_metrics.col2",
+ c = c,
+ c_option = column_option,
sep='\t',
header=header,
parse_dates=True
diff -r 5fc54e80a39f -r d147f912b882 main_macros.xml
--- a/main_macros.xml Wed May 30 08:26:13 2018 -0400
+++ b/main_macros.xml Tue Jun 05 06:47:08 2018 -0400
@@ -2,12 +2,11 @@
0.9
-def read_columns(f, c, return_df=False, **args):
+def read_columns(f, c=None, c_option='by_index_number', return_df=False, **args):
data = pandas.read_csv(f, **args)
- cols = c.split (',')
- cols = map(int, cols)
- cols = list(map(lambda x: x - 1, cols))
- data = data.iloc[:,cols]
+ if c_option == 'by_index_number':
+ cols = list(map(lambda x: x - 1, c))
+ data = data.iloc[:,cols]
y = data.values
if return_df:
return y, data
@@ -17,7 +16,6 @@
## generate an instance for one of sklearn.feature_selection classes
-## must call "@COLUMNS_FUNCTION@"
def feature_selector(inputs):
selector = inputs["selected_algorithm"]
@@ -428,16 +426,37 @@
-
+
-
-
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -470,10 +489,14 @@
-
+
+
+
-
+
+
+