diff select_individuals.xml @ 0:2c498d40ecde

Uploaded
author miller-lab
date Mon, 09 Apr 2012 12:03:06 -0400
parents
children e29f4d801bb0
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/select_individuals.xml	Mon Apr 09 12:03:06 2012 -0400
@@ -0,0 +1,42 @@
+<tool id="gd_select_individuals" name="Select" version="1.0.0">
+  <description>individuals from a SNP table</description>
+
+  <command interpreter="bash">
+    echo.bash "$input" "$output"
+    #for $individual in str($individuals).split(',')
+        #set $individual_idx = $input.dataset.metadata.individual_names.index($individual)
+        #set $individual_col = str( $input.dataset.metadata.individual_columns[$individual_idx] )
+        #set $arg = '\t'.join([$individual_col, $individual, ''])
+        "$arg"
+    #end for
+  </command>
+
+  <inputs>
+    <param name="input" type="data" format="wsf"/>
+    <param name="individuals" type="select" display="checkboxes" multiple="true" label="Individuals to include">
+      <options>
+        <filter type="data_meta" ref="input" key="individual_names" />
+      </options>
+      <validator type="no_options" message="You must select at least one individual"/>
+    </param>
+  </inputs>
+
+  <outputs>
+    <data name="output" format="ind" label="Individuals from ${input.hid}" />
+  </outputs>
+
+  <tests>
+    <test>
+      <param name="input" value="test_in/sample.wsf" ftype="wsf" />
+      <param name="individuals" value="PB1,PB2" />
+      <output name="output" file="test_in/a.ind" />
+    </test>
+  </tests>
+
+  <help>
+**What it does**
+
+The user selects a SNP table and a set of individuals from the table.
+The command saves that list of individuals for use by other Galaxy tools.
+  </help>
+</tool>