diff pre_process.xml @ 21:f156acc7239b draft

planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 2a058459e6daf0486871f93845f00fdb4a4eaca1
author bgruening
date Sat, 29 Sep 2018 07:31:15 -0400
parents f196d4715cfb
children d6b8103c909c
line wrap: on
line diff
--- a/pre_process.xml	Thu Aug 23 16:16:54 2018 -0400
+++ b/pre_process.xml	Sat Sep 29 07:31:15 2018 -0400
@@ -23,7 +23,7 @@
 from scipy.io import mmwrite
 from sklearn import preprocessing
 
-execfile("$__tool_directory__/utils.py")
+exec(open("$__tool_directory__/utils.py").read(), globals())
 
 input_json_path = sys.argv[1]
 with open(input_json_path, "r") as param_handler:
@@ -60,7 +60,7 @@
 result = estimator.transform(X)
 
 #if $input_type.selected_input_type == "sparse":
-with open("$outfile_transform", "w+") as transform_handler:
+with open("$outfile_transform", "wb") as transform_handler:
     mmwrite(transform_handler, result)
 #else:
 res = pandas.DataFrame(result)