diff generalized_linear.xml @ 20:9b7d0655f70f draft

planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 8cf3d813ec755166ee0bd517b4ecbbd4f84d4df1
author bgruening
date Thu, 23 Aug 2018 16:20:19 -0400
parents a259111a305a
children 212e7adfe65f
line wrap: on
line diff
--- a/generalized_linear.xml	Fri Aug 17 12:30:04 2018 -0400
+++ b/generalized_linear.xml	Thu Aug 23 16:20:19 2018 -0400
@@ -19,10 +19,10 @@
 import numpy as np
 import sklearn.linear_model
 import pandas
-import pickle
 from scipy.io import mmread
 
-execfile("$__tool_directory__/utils.py")
+execfile("$__tool_directory__/sk_whitelist.py")
+execfile("$__tool_directory__/utils.py", globals())
 
 input_json_path = sys.argv[1]
 with open(input_json_path, "r") as param_handler:
@@ -43,7 +43,7 @@
 
 #else:
 with open("$selected_tasks.infile_model", 'rb') as model_handler:
-    classifier_object = pickle.load(model_handler)
+    classifier_object = SafePickler.load(model_handler)
 data = pandas.read_csv("$selected_tasks.infile_data", sep='\t', header=None, index_col=None, parse_dates=True, encoding=None, tupleize_cols=False )
 prediction = classifier_object.predict(data)
 prediction_df = pandas.DataFrame(prediction, columns=["predicted"])