Mercurial > repos > bgruening > sklearn_feature_selection
comparison feature_selection.xml @ 4:44e26f8a82c6 draft
planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 97c4f22cdcfa6cddeeffc7b102c418a7ff12a888
author | bgruening |
---|---|
date | Tue, 05 Jun 2018 06:46:40 -0400 |
parents | 3a1acc39b39b |
children | 2d681d0f9393 |
comparison
equal
deleted
inserted
replaced
3:3a1acc39b39b | 4:44e26f8a82c6 |
---|---|
33 ## Read features | 33 ## Read features |
34 features_has_header = params["input_options"]["header1"] | 34 features_has_header = params["input_options"]["header1"] |
35 input_type = params["input_options"]["selected_input"] | 35 input_type = params["input_options"]["selected_input"] |
36 if input_type=="tabular": | 36 if input_type=="tabular": |
37 header = 'infer' if features_has_header else None | 37 header = 'infer' if features_has_header else None |
38 header = 'infer' if params["input_options"]["header1"] else None | 38 column_option = params["input_options"]["column_selector_options_1"]["selected_column_selector_option"] |
39 if column_option == "by_index_number": | |
40 c = params["input_options"]["column_selector_options_1"]["col1"] | |
41 else: | |
42 c = None | |
39 X, input_df = read_columns( | 43 X, input_df = read_columns( |
40 "$input_options.infile1", | 44 "$input_options.infile1", |
41 "$input_options.col1", | 45 c = c, |
46 c_option = column_option, | |
42 return_df = True, | 47 return_df = True, |
43 sep='\t', | 48 sep='\t', |
44 header=header, | 49 header=header, |
45 parse_dates=True | 50 parse_dates=True |
46 ) | 51 ) |
47 else: | 52 else: |
48 X = mmread(open("$input_options.infile1", 'r')) | 53 X = mmread(open("$input_options.infile1", 'r')) |
49 | 54 |
50 ## Read labels | 55 ## Read labels |
51 header = 'infer' if params["input_options"]["header2"] else None | 56 header = 'infer' if params["input_options"]["header2"] else None |
57 column_option = params["input_options"]["column_selector_options_2"]["selected_column_selector_option2"] | |
58 if column_option == "by_index_number": | |
59 c = params["input_options"]["column_selector_options_2"]["col2"] | |
60 else: | |
61 c = None | |
52 y = read_columns( | 62 y = read_columns( |
53 "$input_options.infile2", | 63 "$input_options.infile2", |
54 "$input_options.col2", | 64 c = c, |
65 c_option = column_option, | |
55 sep='\t', | 66 sep='\t', |
56 header=header, | 67 header=header, |
57 parse_dates=True | 68 parse_dates=True |
58 ) | 69 ) |
59 y=y.ravel() | 70 y=y.ravel() |