comparison generalized_linear.xml @ 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 32a88b3bea94
children fd6c50f21cd0
comparison
equal deleted inserted replaced
1:8e02b727dd74 2:3326dd4f1e8d
31 31
32 algorithm = params["selected_tasks"]["selected_algorithms"]["selected_algorithm"] 32 algorithm = params["selected_tasks"]["selected_algorithms"]["selected_algorithm"]
33 options = params["selected_tasks"]["selected_algorithms"]["options"] 33 options = params["selected_tasks"]["selected_algorithms"]["options"]
34 34
35 #if $selected_tasks.selected_algorithms.input_options.selected_input=="tabular": 35 #if $selected_tasks.selected_algorithms.input_options.selected_input=="tabular":
36 X = columns("$selected_tasks.selected_algorithms.input_options.infile1","$selected_tasks.selected_algorithms.input_options.col1") 36 X = read_columns(
37 "$selected_tasks.selected_algorithms.input_options.infile1",
38 "$selected_tasks.selected_algorithms.input_options.col1",
39 sep='\t',
40 header=None,
41 parse_dates=True
42 )
37 #else: 43 #else:
38 X = mmread(open("$selected_tasks.selected_algorithms.input_options.infile1", 'r')) 44 X = mmread(open("$selected_tasks.selected_algorithms.input_options.infile1", 'r'))
39 #end if 45 #end if
40 46
41 y = columns("$selected_tasks.selected_algorithms.input_options.infile2","$selected_tasks.selected_algorithms.input_options.col2") 47 y = read_columns(
48 "$selected_tasks.selected_algorithms.input_options.infile2",
49 "$selected_tasks.selected_algorithms.input_options.col2",
50 sep='\t',
51 header=None,
52 parse_dates=True
53 )
42 54
43 my_class = getattr(sklearn.linear_model, algorithm) 55 my_class = getattr(sklearn.linear_model, algorithm)
44 estimator = my_class(**options) 56 estimator = my_class(**options)
45 estimator.fit(X,y) 57 estimator.fit(X,y)
46 pickle.dump(estimator,open("$outfile_fit", 'w+'), pickle.HIGHEST_PROTOCOL) 58 pickle.dump(estimator,open("$outfile_fit", 'w+'), pickle.HIGHEST_PROTOCOL)