Mercurial > repos > bgruening > sklearn_numeric_clustering
comparison numeric_clustering.xml @ 37:80bb86a40de6 draft
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 5b2ac730ec6d3b762faa9034eddd19ad1b347476"
| author | bgruening |
|---|---|
| date | Mon, 16 Dec 2019 10:05:23 +0000 |
| parents | a36e1455971d |
| children | 006e27f0a7ef |
comparison
equal
deleted
inserted
replaced
| 36:836ba896e2be | 37:80bb86a40de6 |
|---|---|
| 43 cluster_object.set_params( n_jobs=N_JOBS ) | 43 cluster_object.set_params( n_jobs=N_JOBS ) |
| 44 | 44 |
| 45 #if $input_types.selected_input_type == "sparse": | 45 #if $input_types.selected_input_type == "sparse": |
| 46 data_matrix = mmread("$infile") | 46 data_matrix = mmread("$infile") |
| 47 #else: | 47 #else: |
| 48 data = pandas.read_csv("$infile", sep='\t', header=0, index_col=None, parse_dates=True, encoding=None, tupleize_cols=False ) | 48 data = pandas.read_csv("$infile", sep='\t', header=0, index_col=None, parse_dates=True, encoding=None) |
| 49 header = 'infer' if params["input_types"]["header"] else None | 49 header = 'infer' if params["input_types"]["header"] else None |
| 50 column_option = params["input_types"]["column_selector_options"]["selected_column_selector_option"] | 50 column_option = params["input_types"]["column_selector_options"]["selected_column_selector_option"] |
| 51 if column_option in ["by_index_number", "all_but_by_index_number", "by_header_name", "all_but_by_header_name"]: | 51 if column_option in ["by_index_number", "all_but_by_index_number", "by_header_name", "all_but_by_header_name"]: |
| 52 c = params["input_types"]["column_selector_options"]["col"] | 52 c = params["input_types"]["column_selector_options"]["col"] |
| 53 else: | 53 else: |
| 57 c = c, | 57 c = c, |
| 58 c_option = column_option, | 58 c_option = column_option, |
| 59 sep='\t', | 59 sep='\t', |
| 60 header=header, | 60 header=header, |
| 61 parse_dates=True, | 61 parse_dates=True, |
| 62 encoding=None, | 62 encoding=None) |
| 63 tupleize_cols=False) | |
| 64 #end if | 63 #end if |
| 65 | 64 |
| 66 prediction = cluster_object.fit_predict( data_matrix ) | 65 prediction = cluster_object.fit_predict( data_matrix ) |
| 67 | 66 |
| 68 if len(np.unique(prediction)) > 1: | 67 if len(np.unique(prediction)) > 1: |
