diff main_macros.xml @ 12:ada7bb28fe13 draft

planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit cd4a8b019168acd5a513c57a1b1f380622f230f6
author bgruening
date Sun, 01 Jul 2018 03:18:53 -0400
parents 6b31f5167cf8
children 78c664cc1841
line wrap: on
line diff
--- a/main_macros.xml	Wed Jun 06 17:41:48 2018 -0400
+++ b/main_macros.xml	Sun Jul 01 03:18:53 2018 -0400
@@ -10,6 +10,12 @@
   if c_option == 'all_but_by_index_number':
     cols = list(map(lambda x: x - 1, c))
     data.drop(data.columns[cols], axis=1, inplace=True)
+  if c_option == 'by_header_name':
+    cols = [e.strip() for e in c.split(',')]
+    data = data[cols]
+  if c_option == 'all_but_by_header_name':
+    cols = [e.strip() for e in c.split(',')]
+    data.drop(cols, axis=1, inplace=True)
   y = data.values
   if return_df:
     return y, data
@@ -446,17 +452,23 @@
   <xml name="samples_column_selector_options" token_column_option="selected_column_selector_option" token_col_name="col1" token_multiple="False" token_infile="infile1">
     <param name="@COLUMN_OPTION@" type="select" label="Choose how to select data by column:">
       <option value="by_index_number" selected="true">Select columns by column index number(s)</option>
-      <!--<option value="by_header_name">Select columns by column header name(s)</option>-->
+      <option value="by_header_name">Select columns by column header name(s)</option>
       <option value="all_but_by_index_number">All columns but by column index number(s)</option>
-      <!--<option value="all_but_by_header_name">All columns but by column header name(s)</option> -->
+      <option value="all_but_by_header_name">All columns but by column header name(s)</option>
       <option value="all_columns">All columns</option>
     </param>
     <when value="by_index_number">
       <param name="@COL_NAME@" multiple="@MULTIPLE@" type="data_column" data_ref="@INFILE@" label="Select target column(s):"/>
     </when>
+    <when value="by_header_name">
+      <param name="@COL_NAME@" type="text" value="" label="Type header name(s):" help="String seperate by colon. For example: target1,target2"/>
+    </when>
     <when value="all_but_by_index_number">
       <param name="@COL_NAME@" multiple="@MULTIPLE@" type="data_column" data_ref="@INFILE@" label="Select target column(s):"/>
     </when>
+    <when value="all_but_by_header_name">
+      <param name="@COL_NAME@" type="text" value="" label="Type header name(s):" help="String seperate by colon. For example: target1,target2"/>
+    </when>
     <when value="all_columns">
     </when>
   </xml>