Repository 'stacks_populations'
hg clone https://toolshed.g2.bx.psu.edu/repos/iuc/stacks_populations

Changeset 4:d0b325dfe508 (2016-09-26)
Previous changeset 3:2ac5c9616748 (2016-06-25) Next changeset 5:b3ea05f1490b (2017-02-27)
Commit message:
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/stacks commit 643293a896a2ccfac10fe995f48c7f01c1a89a7f
modified:
macros.xml
stacks_populations.xml
added:
test-data/populations/batch_1.vcf
removed:
tool_dependencies.xml
b
diff -r 2ac5c9616748 -r d0b325dfe508 macros.xml
--- a/macros.xml Sat Jun 25 17:28:14 2016 -0400
+++ b/macros.xml Mon Sep 26 11:44:41 2016 -0400
b
@@ -2,14 +2,14 @@
 <macros>
     <xml name="requirements">
         <requirements>
-            <requirement type="package" version="1.40">stacks</requirement>
+            <requirement type="package" version="1.42">stacks</requirement>
             <requirement type="package" version="1.2.10">velvet</requirement>
-            <container type="docker">quay.io/mulled/stacks:1.40--1</container>
+            <container type="docker">quay.io/mulled/stacks:1.42--2</container>
             <yield/>
         </requirements>
     </xml>
 
-    <token name="@WRAPPER_VERSION@">1.40</token>
+    <token name="@WRAPPER_VERSION@">1.42</token>
 
     <xml name="stdio">
         <stdio>
@@ -86,6 +86,10 @@
         <option value="taqI">taqI</option>
         <option value="xbaI">xbaI</option>
         <option value="xhoI">xhoI</option>
+        <option value="csp6I">csp6I</option>
+        <option value="bsaHI">bsaHI</option>
+        <option value="hpaII">hpaII</option>
+        <option value="ncoI">ncoI</option>
     </xml>
 
     <xml name="cross_types">
b
diff -r 2ac5c9616748 -r d0b325dfe508 stacks_populations.xml
--- a/stacks_populations.xml Sat Jun 25 17:28:14 2016 -0400
+++ b/stacks_populations.xml Mon Sep 26 11:44:41 2016 -0400
[
@@ -1,4 +1,4 @@
-<tool id="stacks_populations" name="Stacks: populations" version="@WRAPPER_VERSION@.1">
+<tool id="stacks_populations" name="Stacks: populations" version="@WRAPPER_VERSION@.0">
     <description>analyze a population of individual samples ('populations' program)</description>
     <macros>
         <import>macros.xml</import>
@@ -12,21 +12,29 @@
 
         &&
 
-        #for $input_file in $options_usage.input_col:
-            #set $filename = str($input_file.element_identifier)
-            #if not $filename.endswith('.tsv'):
-                #set $filename = $filename + ".tsv"
-            #end if
-            #if re.search('\.(tags|snps|alleles|matches)(\.tsv)?$', $filename):
-                ln -s "${input_file}" "stacks_outputs/${filename}" &&
-            #end if
-        #end for
+        #if str($options_usage.input_type) == 'stacks':
+            #for $input_file in $options_usage.input_col:
+                #set $filename = str($input_file.element_identifier)
+                #if not $filename.endswith('.tsv'):
+                    #set $filename = $filename + ".tsv"
+                #end if
+                #if re.search('\.(tags|snps|alleles|matches)(\.tsv)?$', $filename):
+                    ln -s "${input_file}" "stacks_outputs/${filename}" &&
+                #end if
+            #end for
+        #end if
 
         populations
 
         -t \${GALAXY_SLOTS:-1}
 
-        -P stacks_outputs
+        #if str($options_usage.input_type) == 'vcf':
+            -V "$options_usage.input_vcf"
+        #else:
+            -P stacks_outputs
+            -b $advanced_options.batchid
+        #end if
+
         -M "$options_usage.popmap"
 
         ## Data filtering
@@ -111,14 +119,23 @@
         #if $advanced_options.whitelist:
             -W "$advanced_options.whitelist"
         #end if
-        -b $advanced_options.batchid
     ]]></command>
 
     <inputs>
-        <section name="options_usage" title="Input" expanded="true">
-            <param name="input_col" format="tabular,txt" type="data_collection" collection_type="list" label="Output from previous Stacks pipeline steps (e.g. denovo_map or refmap)" />
-            <param name="popmap" type="data" format="tabular,txt" label="Specify a population map" argument="-M" />
-        </section>
+        <conditional name="options_usage">
+            <param name="input_type" type="select" label="Input type" help="select input file type" >
+                <option value="stacks">Stacks output</option>
+                <!--option value="vcf">VCF file</option--> <!-- broken in 1.42 -->
+            </param>
+            <when value="stacks">
+                <param name="input_col" format="tabular,txt" type="data_collection" collection_type="list" label="Output from previous Stacks pipeline steps (e.g. denovo_map or refmap)" argument="-P" />
+                <param name="popmap" type="data" format="tabular,txt" label="Specify a population map" argument="-M" />
+            </when>
+            <when value="vcf">
+                <param name="input_vcf" format="vcf" type="data" label="VCF file" argument="-V" />
+                <param name="popmap" type="data" format="tabular,txt" label="Specify a population map" argument="-M" />
+            </when>
+        </conditional>
 
         <section name="options_filtering" title="Data filtering options" expanded="true">
 
@@ -225,6 +242,7 @@
 
     <tests>
         <test>
+            <param name="options_usage|input_type" value="stacks" />
             <param name="options_usage|input_col">
                 <collection type="list">
                     <element name="batch_1.catalog.alleles.tsv" ftype="tabular" value="genotypes/batch_1.catalog.alleles.tsv" />
@@ -292,7 +310,7 @@
             </output>
             <output name="out_vcf">
                 <assert_contents>
-                    <has_text text="fileformat=VCFv4.0" />
+                    <has_text text="fileformat=VCFv4.2" />
                 </assert_contents>
             </output>
             <output name="out_treemix_pop">
@@ -306,6 +324,75 @@
                 </assert_contents>
             </output>
         </test>
+        <!--test>
+            <param name="options_usage|input_type" value="vcf" />
+            <param name="options_usage|input_vcf" value="populations/batch_1.vcf" />
+            <param name="options_usage|popmap" ftype="tabular" value="denovo_map/popmap.tsv" />
+            <param name="options_filtering|correction_select|correction" value="p_value" />
+
+            <param name="populations_output|ordered_export" value="true" />
+            <param name="populations_output|vcf" value="true" />
+            <param name="populations_output|vcf_haplotypes" value="true" />
+            <param name="populations_output|genepop" value="true" />
+            <param name="populations_output|structure" value="true" />
+            <param name="populations_output|fasta" value="true" />
+            <param name="populations_output|fasta_strict" value="true" />
+            <param name="populations_output|hzar" value="true" />
+            <param name="populations_output|phase" value="true" />
+            <param name="populations_output|fastphase" value="true" />
+            <param name="populations_output|beagle" value="true" />
+            <param name="populations_output|beagle_phased" value="true" />
+            <param name="populations_output|plink" value="true" />
+            <param name="populations_output|phylip" value="true" />
+            <param name="populations_output|phylip_var" value="true" />
+            <param name="populations_output|phylip_var_all" value="true" />
+            <param name="populations_output|treemix" value="true" />
+
+            <param name="populations_output|options_genomic|genomic" value="true" />
+            <param name="populations_output|options_genomic|enzyme" value="ecoRI" /-->
+
+            <!-- populations -->
+            <!--output name="out_haplotypes">
+                <assert_contents>
+                    <has_text text="PopA_01" />
+                </assert_contents>
+            </output>
+            <output name="out_hapstats">
+                <assert_contents>
+                    <has_text text="Smoothed Gene Diversity" />
+                </assert_contents>
+            </output>
+            <output name="out_populations_log">
+                <assert_contents>
+                    <has_text text="populations version" />
+                </assert_contents>
+            </output>
+            <output name="out_sumstats_sum">
+                <assert_contents>
+                    <has_text text="Polymorphic Sites" />
+                </assert_contents>
+            </output>
+            <output name="out_sumstats">
+                <assert_contents>
+                    <has_text text="Smoothed Pi" />
+                </assert_contents>
+            </output>
+            <output name="out_vcf">
+                <assert_contents>
+                    <has_text text="fileformat=VCFv4.2" />
+                </assert_contents>
+            </output>
+            <output name="out_treemix_pop">
+                <assert_contents>
+                    <has_text text="TreeMix v1.1;" />
+                </assert_contents>
+            </output>
+            <output name="out_fasta">
+                <assert_contents>
+                    <has_text text="AATTCGTTTGCTGCTTCAGGAATCTCTCGTATAATCTGAGTATGTGCGTACGTACGCTATTTAGATGGATAACCGACGCTGCCAGACGCGAGAC" />
+                </assert_contents>
+            </output>
+        </test-->  <!-- broken in 1.42 -->
     </tests>
     <help>
 <![CDATA[
b
diff -r 2ac5c9616748 -r d0b325dfe508 test-data/populations/batch_1.vcf
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/populations/batch_1.vcf Mon Sep 26 11:44:41 2016 -0400
b
@@ -0,0 +1,12 @@
+##fileformat=VCFv4.2
+##fileDate=20160926
+##source="Stacks v1.42"
+##INFO=<ID=NS,Number=1,Type=Integer,Description="Number of Samples With Data">
+##INFO=<ID=AF,Number=.,Type=Float,Description="Allele Frequency">
+##FORMAT=<ID=GT,Number=1,Type=String,Description="Genotype">
+##FORMAT=<ID=DP,Number=1,Type=Integer,Description="Read Depth">
+##FORMAT=<ID=AD,Number=1,Type=Integer,Description="Allele Depth">
+##FORMAT=<ID=GL,Number=.,Type=Float,Description="Genotype Likelihood">
+#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT PopA_01 PopA_02
+un 35 1_33 A C . PASS NS=2;AF=0.500 GT:DP:AD:GL 0/1:18:9,9:.,19.78,. 0/1:10:6,4:.,13.18,.
+un 90 1_88 A C . PASS NS=2;AF=0.500 GT:DP:AD:GL 0/1:18:9,9:.,19.78,. 0/1:10:4,6:.,13.18,.
b
diff -r 2ac5c9616748 -r d0b325dfe508 tool_dependencies.xml
--- a/tool_dependencies.xml Sat Jun 25 17:28:14 2016 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
b
@@ -1,9 +0,0 @@
-<?xml version="1.0"?>
-<tool_dependency>
-    <package name="stacks" version="1.40">
-        <repository changeset_revision="51d4ab2c4dcf" name="package_stacks_1_40" owner="iuc" toolshed="https://toolshed.g2.bx.psu.edu" />
-    </package>
-    <package name="velvet" version="1.2.10">
-        <repository changeset_revision="93d32326537b" name="package_velvet_1_2_10" owner="devteam" toolshed="https://toolshed.g2.bx.psu.edu" />
-    </package>
-</tool_dependency>