diff svm.xml @ 8:1a9d5a8fff12 draft

planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit c0a3a186966888e5787335a7628bf0a4382637e7
author bgruening
date Tue, 14 May 2019 18:03:50 -0400
parents 1c5989b930e3
children 153f237ddb36
line wrap: on
line diff
--- a/svm.xml	Sun Dec 30 01:50:39 2018 -0500
+++ b/svm.xml	Tue May 14 18:03:50 2019 -0400
@@ -19,10 +19,10 @@
 import json
 import sklearn.svm
 import pandas
+import pickle
 
-with open("$__tool_directory__/sk_whitelist.json", "r") as f:
-    sk_whitelist = json.load(f)
-exec(open("$__tool_directory__/utils.py").read(), globals())
+sys.path.insert(0, '$__tool_directory__')
+from utils import load_model, get_X_y
 
 input_json_path = sys.argv[1]
 with open(input_json_path, "r") as param_handler:
@@ -43,7 +43,7 @@
 
 #else:
 
-X, y = get_X_y(params, "$selected_tasks.selected_algorithms.input_options.infile1" ,"$selected_tasks.selected_algorithms.input_options.infile2")
+X, y = get_X_y(params, "$selected_tasks.selected_algorithms.input_options.infile1", "$selected_tasks.selected_algorithms.input_options.infile2")
 
 options = params["selected_tasks"]["selected_algorithms"]["options"]
 selected_algorithm = params["selected_tasks"]["selected_algorithms"]["selected_algorithm"]