Mercurial > repos > bgruening > sklearn_numeric_clustering
diff numeric_clustering.xml @ 15:f02f05990cc9 draft
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit f54ff2ba2f8e7542d68966ce5a6b17d7f624ac48
author | bgruening |
---|---|
date | Fri, 13 Jul 2018 03:55:06 -0400 |
parents | 6bbf5cb20652 |
children | 6ba8d7af7e7a |
line wrap: on
line diff
--- a/numeric_clustering.xml Tue Jul 10 03:11:22 2018 -0400 +++ b/numeric_clustering.xml Fri Jul 13 03:55:06 2018 -0400 @@ -25,7 +25,9 @@ @COLUMNS_FUNCTION@ input_json_path = sys.argv[1] -params = json.load(open(input_json_path, "r")) +with open(input_json_path, "r") as param_handler: + params = json.load(param_handler) + selected_algorithm = params["input_types"]["algorithm_options"]["selected_algorithm"] @@ -36,7 +38,7 @@ cluster_object.set_params(**options) #if $input_types.selected_input_type == "sparse": -data_matrix = mmread(open("$infile", 'r')) +data_matrix = mmread("$infile") #else: data = pandas.read_csv("$infile", sep='\t', header=0, index_col=None, parse_dates=True, encoding=None, tupleize_cols=False ) header = 'infer' if params["input_types"]["header"] else None