diff coverage_distributions.xml @ 0:2c498d40ecde

Uploaded
author miller-lab
date Mon, 09 Apr 2012 12:03:06 -0400
parents
children 7a94f11fe71f
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/coverage_distributions.xml	Mon Apr 09 12:03:06 2012 -0400
@@ -0,0 +1,75 @@
+<tool id="gd_coverage_distributions" name="Coverage" version="1.0.0">
+  <description>distributions</description>
+
+  <command interpreter="python">
+    coverage_distributions.py "$input" "0" "$output" "$output.extra_files_path"
+    #if $individuals.choice == '0'
+      "all_individuals"
+    #else if $individuals.choice == '1'
+      #set $arg = 'individuals:%s' % str($individuals.p1_input)
+        "$arg"
+    #else if $individuals.choice == '2'
+      #for $population in $individuals.populations
+        #set $arg = 'population:%s:%s' % (str($population.p_input), str($population.p_input.name))
+        "$arg"
+      #end for
+    #end if
+    #for $individual, $individual_col in zip($input.dataset.metadata.individual_names, $input.dataset.metadata.individual_columns)
+      #set $individual_arg = 'individual:%s:%s' % ($individual_col, $individual)
+      "$individual_arg"
+    #end for
+  </command>
+
+  <inputs>
+    <param name="input" type="data" format="wsf" label="SNP table" />
+
+    <conditional name="individuals">
+      <param name="choice" type="select" label="Individuals">
+        <option value="0" selected="true">All</option>
+        <option value="1">Individuals in a population</option>
+        <option value="2">Population totals</option>
+      </param>
+      <when value="0" />
+      <when value="1">
+        <param name="p1_input" type="data" format="ind" label="Population individuals" />
+      </when>
+      <when value="2">
+        <repeat name="populations" title="Population" min="1">
+          <param name="p_input" type="data" format="ind" label="individuals" />
+        </repeat>
+      </when>
+    </conditional> 
+
+    <!--
+    <param name="data_source" type="select" label="Data source">
+      <option value="0" selected="true">Sequence coverage</option>
+      <option value="1">Genotype quality</option>
+    </param>
+    -->
+  </inputs>
+
+  <outputs>
+    <data name="output" format="html" />
+  </outputs>
+
+  <tests>
+    <test>
+      <param name="input" value="test_in/sample.wsf" ftype="wsf" />
+      <param name="choice" value="0" />
+      <output name="output" file="test_out/coverage_distributions/coverage.html" ftype="html" compare="diff" lines_diff="2">
+        <extra_files type="file" name="coverage.pdf" value="test_out/coverage_distributions/coverage.pdf" compare="sim_size" delta = "1000"/>
+        <extra_files type="file" name="coverage.txt" value="test_out/coverage_distributions/coverage.txt" />
+      </output>
+    </test>
+  </tests>
+
+  <help>
+**What it does**
+
+This tool reports distributions of SNP reliability indicators for
+individuals or populations.  The reliability is measured by the sequence
+coverage.  Textual and graphical reports are generated, where the text
+output gives the cumulative distributions.
+  </help>
+</tool>
+