diff numeric_clustering.xml @ 24:abb5a3f256e3 draft

planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit c0a3a186966888e5787335a7628bf0a4382637e7
author bgruening
date Tue, 14 May 2019 18:11:02 -0400
parents 9d234733ccfd
children 37e193b3fdd7
line wrap: on
line diff
--- a/numeric_clustering.xml	Sun Dec 30 01:55:30 2018 -0500
+++ b/numeric_clustering.xml	Tue May 14 18:11:02 2019 -0400
@@ -16,12 +16,16 @@
 <![CDATA[
 import sys
 import json
+import numpy as np
 import sklearn.cluster
 import pandas
 from sklearn import metrics
 from scipy.io import mmread
 
-exec(open("$__tool_directory__/utils.py").read(), globals())
+sys.path.insert(0, '$__tool_directory__')
+from utils import read_columns
+
+N_JOBS = int(__import__('os').environ.get('GALAXY_SLOTS', 1))
 
 input_json_path = sys.argv[1]
 with open(input_json_path, "r") as param_handler:
@@ -56,8 +60,7 @@
     header=header,
     parse_dates=True,
     encoding=None,
-    tupleize_cols=False
-)
+    tupleize_cols=False)
 #end if
 
 prediction = cluster_object.fit_predict( data_matrix )