Mercurial > repos > bgruening > sklearn_generalized_linear
changeset 2:3326dd4f1e8d draft
planemo upload for repository https://github.com/bgruening/galaxytools/tools/sklearn commit 641ac64ded23fbb6fe85d5f13926da12dcce4e76
author | bgruening |
---|---|
date | Tue, 13 Mar 2018 04:58:51 -0400 |
parents | 8e02b727dd74 |
children | be8d2100f07b |
files | generalized_linear.xml main_macros.xml |
diffstat | 2 files changed, 16 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- 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)
--- 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 @@ <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))