diff prepare_population_structure.xml @ 12:4b6590dd7250

Uploaded
author miller-lab
date Wed, 12 Sep 2012 17:10:26 -0400
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/prepare_population_structure.xml	Wed Sep 12 17:10:26 2012 -0400
@@ -0,0 +1,74 @@
+<tool id="gd_prepare_population_structure" name="Prepare" version="1.0.0">
+  <description>to look for population structure</description>
+
+  <command interpreter="python">
+    prepare_population_structure.py "$input" "$min_reads" "$min_qual" "$min_spacing" "$output" "$output.files_path"
+    #if $individuals.choice == '0'
+        "all_individuals"
+    #else if $individuals.choice == '1'
+        #for $population in $individuals.populations
+          #set $pop_arg = 'population:%s:%s' % (str($population.p_input), str($population.p_input.name))
+          "$pop_arg"
+        #end for
+    #end if
+    #for $individual, $individual_col in zip($input.dataset.metadata.individual_names, $input.dataset.metadata.individual_columns)
+        #set $arg = 'individual:%s:%s' % ($individual_col, $individual)
+        "$arg"
+    #end for
+  </command>
+
+  <inputs>
+    <param name="input" type="data" format="gd_snp" label="SNP table" />
+    <param name="min_reads" type="integer" min="0" value="0" label="Minimum reads covering a SNP, per individual" />
+    <param name="min_qual" type="integer" min="0" value="0" label="Minimum quality value, per individual" />
+    <param name="min_spacing" type="integer" min="0" value="0" label="Minimum spacing between SNPs on the same scaffold" />
+    <conditional name="individuals">
+      <param name="choice" type="select" label="Individuals">
+        <option value="0" selected="true">All</option>
+        <option value="1">Choose</option>
+      </param>
+      <when value="0" />
+      <when value="1">
+        <repeat name="populations" title="Population" min="1">
+          <param name="p_input" type="data" format="gd_indivs" label="Individuals" />
+        </repeat>
+      </when>
+    </conditional>
+  </inputs>
+
+  <outputs>
+    <data name="output" format="gd_ped">
+      <actions>
+        <action type="metadata" name="base_name" default="admix" />
+      </actions>
+    </data>
+  </outputs>
+
+  <tests>
+    <test>
+      <param name="input" value="test_in/sample.gd_snp" ftype="gd_snp" />
+      <param name="min_reads" value="3" />
+      <param name="min_qual" value="30" />
+      <param name="min_spacing" value="0" />
+      <param name="choice" value="0" />
+      <output name="output" file="test_out/prepare_population_structure/prepare_population_structure.html" ftype="html" compare="diff" lines_diff="2">
+        <extra_files type="file" name="admix.map" value="test_out/prepare_population_structure/admix.map" />
+        <extra_files type="file" name="admix.ped" value="test_out/prepare_population_structure/admix.ped" />
+      </output>
+    </test>
+  </tests>
+
+  <help>
+**What it does**
+
+The tool converts a SNP table into two tables, called "admix.map" and
+"admix.ped", needed for estimating the population structure.  The user
+can read or download those files, or simply pass this tool's output on to
+other programs.  The user imposes conditions on which SNPs to consider,
+such as the minimum coverage and/or quality value for every individual,
+or the distance to the closest SNP in the same contig (as named in the
+first column of the SNP table).  A useful piece of information produced
+by the tool is the number of SNPs meeting those conditions, which can
+be found by clicking on the "eye" after the program runs.
+  </help>
+</tool>