comparison main_macros.xml @ 4:60b8a683ba99 draft

planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 64158f357e708f0b60d2669d92d614f7aee34c0e
author bgruening
date Wed, 06 Jun 2018 17:44:36 -0400
parents 424d8d21744d
children 510aa2ce035e
comparison
equal deleted inserted replaced
3:424d8d21744d 4:60b8a683ba99
5 def read_columns(f, c=None, c_option='by_index_number', return_df=False, **args): 5 def read_columns(f, c=None, c_option='by_index_number', return_df=False, **args):
6 data = pandas.read_csv(f, **args) 6 data = pandas.read_csv(f, **args)
7 if c_option == 'by_index_number': 7 if c_option == 'by_index_number':
8 cols = list(map(lambda x: x - 1, c)) 8 cols = list(map(lambda x: x - 1, c))
9 data = data.iloc[:,cols] 9 data = data.iloc[:,cols]
10 if c_option == 'all_but_by_index_number':
11 cols = list(map(lambda x: x - 1, c))
12 data.drop(data.columns[cols], axis=1, inplace=True)
10 y = data.values 13 y = data.values
11 if return_df: 14 if return_df:
12 return y, data 15 return y, data
13 else: 16 else:
14 return y 17 return y
441 </xml> 444 </xml>
442 445
443 <xml name="samples_column_selector_options" token_column_option="selected_column_selector_option" token_col_name="col1" token_multiple="False" token_infile="infile1"> 446 <xml name="samples_column_selector_options" token_column_option="selected_column_selector_option" token_col_name="col1" token_multiple="False" token_infile="infile1">
444 <param name="@COLUMN_OPTION@" type="select" label="Choose how to select data by column:"> 447 <param name="@COLUMN_OPTION@" type="select" label="Choose how to select data by column:">
445 <option value="by_index_number" selected="true">Select columns by column index number(s)</option> 448 <option value="by_index_number" selected="true">Select columns by column index number(s)</option>
446 <!-- 449 <!--<option value="by_header_name">Select columns by column header name(s)</option>-->
447 <option value="by_header_name">Select columns by column header name(s)</option>
448 <option value="all_but_by_index_number">All columns but by column index number(s)</option> 450 <option value="all_but_by_index_number">All columns but by column index number(s)</option>
449 <option value="all_but_by_header_name">All columns but by column header name(s)</option> 451 <!--<option value="all_but_by_header_name">All columns but by column header name(s)</option> -->
450 -->
451 <option value="all_columns">All columns</option> 452 <option value="all_columns">All columns</option>
452 </param> 453 </param>
453 <when value="by_index_number"> 454 <when value="by_index_number">
455 <param name="@COL_NAME@" multiple="@MULTIPLE@" type="data_column" data_ref="@INFILE@" label="Select target column(s):"/>
456 </when>
457 <when value="all_but_by_index_number">
454 <param name="@COL_NAME@" multiple="@MULTIPLE@" type="data_column" data_ref="@INFILE@" label="Select target column(s):"/> 458 <param name="@COL_NAME@" multiple="@MULTIPLE@" type="data_column" data_ref="@INFILE@" label="Select target column(s):"/>
455 </when> 459 </when>
456 <when value="all_columns"> 460 <when value="all_columns">
457 </when> 461 </when>
458 </xml> 462 </xml>