Mercurial > repos > bgruening > sklearn_feature_selection
comparison feature_selection.xml @ 9:537c6763c018 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:31 -0400 |
parents | b0d554b38770 |
children | 96f9b73327f2 |
comparison
equal
deleted
inserted
replaced
8:38faa5ade609 | 9:537c6763c018 |
---|---|
26 @COLUMNS_FUNCTION@ | 26 @COLUMNS_FUNCTION@ |
27 | 27 |
28 @FEATURE_SELECTOR_FUNCTION@ | 28 @FEATURE_SELECTOR_FUNCTION@ |
29 | 29 |
30 input_json_path = sys.argv[1] | 30 input_json_path = sys.argv[1] |
31 params = json.load(open(input_json_path, "r")) | 31 with open(input_json_path, "r") as param_handler: |
32 params = json.load(param_handler) | |
32 | 33 |
33 ## Read features | 34 ## Read features |
34 features_has_header = params["input_options"]["header1"] | 35 features_has_header = params["input_options"]["header1"] |
35 input_type = params["input_options"]["selected_input"] | 36 input_type = params["input_options"]["selected_input"] |
36 if input_type=="tabular": | 37 if input_type=="tabular": |
48 sep='\t', | 49 sep='\t', |
49 header=header, | 50 header=header, |
50 parse_dates=True | 51 parse_dates=True |
51 ) | 52 ) |
52 else: | 53 else: |
53 X = mmread(open("$input_options.infile1", 'r')) | 54 X = mmread("$input_options.infile1") |
54 | 55 |
55 ## Read labels | 56 ## Read labels |
56 header = 'infer' if params["input_options"]["header2"] else None | 57 header = 'infer' if params["input_options"]["header2"] else None |
57 column_option = params["input_options"]["column_selector_options_2"]["selected_column_selector_option2"] | 58 column_option = params["input_options"]["column_selector_options_2"]["selected_column_selector_option2"] |
58 if column_option in ["by_index_number", "all_but_by_index_number", "by_header_name", "all_but_by_header_name"]: | 59 if column_option in ["by_index_number", "all_but_by_index_number", "by_header_name", "all_but_by_header_name"]: |