diff ensemble.xml @ 20:038cecaa9e7c draft

planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 8cf3d813ec755166ee0bd517b4ecbbd4f84d4df1
author bgruening
date Thu, 23 Aug 2018 16:16:12 -0400
parents 4570575d060c
children 9ce3e347506c
line wrap: on
line diff
--- a/ensemble.xml	Fri Aug 17 12:28:21 2018 -0400
+++ b/ensemble.xml	Thu Aug 23 16:16:12 2018 -0400
@@ -20,10 +20,10 @@
 import numpy as np
 import sklearn.ensemble
 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())
 
 # Get inputs, outputs.
 input_json_path = sys.argv[1]
@@ -75,7 +75,7 @@
 
 else:
     with open(infile_model, 'rb') as model_handler:
-        classifier_object = pickle.load(model_handler)
+        classifier_object = SafePickler.load(model_handler)
     header = 'infer' if params["selected_tasks"]["header"] else None
     data = pandas.read_csv(infile_data, sep='\t', header=header, index_col=None, parse_dates=True, encoding=None, tupleize_cols=False)
     prediction = classifier_object.predict(data)