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

Changeset 8:f5115df39480 (2017-04-27)
Previous changeset 7:5830a37dfa76 (2017-04-07) Next changeset 9:45db1ba16163 (2017-05-21)
Commit message:
planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/stacks commit dc23703c260d004a28fe24a2a7c00cb4371bc32e
modified:
macros.xml
stacks_populations.xml
added:
test-data/demultiplexed/PopA_01.1.fq.gzip
test-data/denovo_map/popmap_cstacks.tsv
test-data/procrad/R1.fq.gzip
test-data/ustacks/ustacks.out
b
diff -r 5830a37dfa76 -r f5115df39480 macros.xml
--- a/macros.xml Fri Apr 07 11:48:24 2017 -0400
+++ b/macros.xml Thu Apr 27 04:18:58 2017 -0400
[
@@ -2,14 +2,14 @@
 <macros>
     <xml name="requirements">
         <requirements>
-            <requirement type="package" version="1.42">stacks</requirement>
+            <requirement type="package" version="1.46">stacks</requirement>
             <requirement type="package" version="1.2.10">velvet</requirement>
-            <container type="docker">quay.io/biocontainers/stacks:1.42--2</container>
+            <requirement type="package" version="1.1">stacks_summary</requirement>
             <yield/>
         </requirements>
     </xml>
 
-    <token name="@WRAPPER_VERSION@">1.42</token>
+    <token name="@WRAPPER_VERSION@">1.46</token>
 
     <xml name="stdio">
         <stdio>
@@ -90,6 +90,7 @@
         <option value="bsaHI">bsaHI</option>
         <option value="hpaII">hpaII</option>
         <option value="ncoI">ncoI</option>
+        <option value="ApaLI">ApaLI</option>
     </xml>
 
     <xml name="cross_types">
@@ -100,6 +101,19 @@
         <option value="GEN">GEN (generic, unspecific to any map type)</option>
     </xml>
 
+    <token name="@CLEAN_EXT@">
+        <![CDATA[
+        #from os.path import splitext
+        #import re
+        #def clean_ext($identifier)
+            #while $identifier.endswith(('.1', '.fa', '.fq', '.fasta', '.fastq', '.gz', '.gzip', '.sam', '.bam'))
+                #set $identifier = splitext($identifier)[0]
+            #end while
+$identifier#slurp
+        #end def
+        ]]>
+    </token>
+
     <token name="@NORM_GENOTYPES_OUTPUT_LIGHT@">
         <![CDATA[
         ## We need to do this as the output file names contains the value of an option (min progeny)
b
diff -r 5830a37dfa76 -r f5115df39480 stacks_populations.xml
--- a/stacks_populations.xml Fri Apr 07 11:48:24 2017 -0400
+++ b/stacks_populations.xml Thu Apr 27 04:18:58 2017 -0400
[
b'@@ -12,36 +12,39 @@\n \n         &&\n \n-        #if str($options_usage.input_type) == \'stacks\':\n-            #for $input_file in $options_usage.input_col:\n+        #if str($options_usage.input_type) == \'stacks\'\n+            #for $input_file in $options_usage.input_col\n                 #set $filename = str($input_file.element_identifier)\n-                #if not $filename.endswith(\'.tsv\'):\n+                #if not $filename.endswith(\'.tsv\')\n                     #set $filename = $filename + ".tsv"\n                 #end if\n-                #if re.search(\'\\.(tags|snps|alleles|matches)(\\.tsv)?$\', $filename):\n-                    ln -s "${input_file}" "stacks_outputs/${filename}" &&\n+                #if re.search(\'\\.(tags|snps|alleles|matches)(\\.tsv)?$\', $filename)\n+                    ln -s \'${input_file}\' \'stacks_outputs/${filename}\' &&\n                 #end if\n             #end for\n+        #else if str($options_usage.input_type) == \'vcf\'\n+            ln -s \'$options_usage.input_vcf\' \'stacks_outputs/batch_1.vcf\' &&\n         #end if\n \n         populations\n \n         -t \\${GALAXY_SLOTS:-1}\n \n-        #if str($options_usage.input_type) == \'vcf\':\n-            -V "$options_usage.input_vcf"\n-        #else:\n+        #if str($options_usage.input_type) == \'vcf\'\n+            -V \'stacks_outputs/batch_1.vcf\'\n+            -O stacks_outputs\n+        #else\n             -P stacks_outputs\n             -b $advanced_options.batchid\n         #end if\n \n-        -M "$options_usage.popmap"\n+        -M \'$options_usage.popmap\'\n \n         ## Data filtering\n         $options_filtering.write_single_snp\n         $options_filtering.write_random_snp\n \n-        #if str($options_filtering.lnl):\n+        #if str($options_filtering.lnl)\n             --lnl_lim $options_filtering.lnl\n         #end if\n \n@@ -49,12 +52,12 @@\n         -p $options_filtering.minpop\n         -m $options_filtering.mindepth\n \n-        #if str($options_filtering.max_obs_het):\n+        #if str($options_filtering.max_obs_het)\n             --max_obs_het $options_filtering.max_obs_het\n         #end if\n \n         --min_maf $options_filtering.minminor\n-        #if str( $options_filtering.correction_select.correction ) != "no_corr":\n+        #if str( $options_filtering.correction_select.correction ) != "no_corr"\n             -f $options_filtering.correction_select.correction\n             --p_value_cutoff $options_filtering.correction_select.pcutoff\n         #end if\n@@ -62,26 +65,26 @@\n         ## Fstats\n         $fstats\n \n-        #if $options_kernel.kernel:\n+        #if $options_kernel.kernel\n             -k\n             --window_size $options_kernel.window\n         #end if\n \n         ## Bootstrap resampling options\n-        #if $bootstrap_resampling.bootstrap_resampling_mode.bootstrap_all:\n+        #if $bootstrap_resampling.bootstrap_resampling_mode.bootstrap_all\n             --bootstrap\n-        #else:\n+        #else\n             $bootstrap_resampling.bootstrap_resampling_mode.bootstrap_pifis\n             $bootstrap_resampling.bootstrap_resampling_mode.bootstrap_fst\n             $bootstrap_resampling.bootstrap_resampling_mode.bootstrap_div\n             $bootstrap_resampling.bootstrap_resampling_mode.bootstrap_phist\n         #end if\n \n-        #if str($bootstrap_resampling.bootstrap_reps):\n+        #if str($bootstrap_resampling.bootstrap_reps)\n             --bootstrap_reps $bootstrap_resampling.bootstrap_reps\n         #end if\n-        #if $bootstrap_resampling.bootstrap_wl:\n-            --bootstrap_wl "$bootstrap_resampling.bootstrap_wl"\n+        #if $bootstrap_resampling.bootstrap_wl\n+            --bootstrap_wl \'$bootstrap_resampling.bootstrap_wl\'\n         #end if\n \n         ## output section\n@@ -103,7 +106,7 @@\n         $populations_output.phylip_var_all\n         $populations_output.treemix\n \n-        #if $populations_output.options_genomic.genomic:\n+        #if $populations_output.options_genomic.genomic\n             --genomic\n             -e $populations_output.options_genomic.enzyme\n         #e'..b'options_usage.popmap\'\n     ]]></command>\n \n     <inputs>\n         <conditional name="options_usage">\n             <param name="input_type" type="select" label="Input type" help="select input file type" >\n                 <option value="stacks">Stacks output</option>\n-                <!--option value="vcf">VCF file</option--> <!-- broken in 1.42 -->\n+                <option value="vcf">VCF file</option>\n             </param>\n             <when value="stacks">\n                 <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" />\n@@ -152,7 +159,7 @@\n                     <option value="bonferroni_win">bonferroni_win</option>\n                     <option value="bonferroni_gen">bonferroni_gen</option>\n                 </param>\n-                <when value="no_corr"></when>\n+                <when value="no_corr"/>\n                 <when value="p_value">\n                     <param name="pcutoff" type="float" value="0.05" label="P-value cutoff" help="required p-value to keep an Fst measurement (0.05 by default). Also used as base for Bonferroni correction" />\n                 </when>\n@@ -238,6 +245,8 @@\n     </inputs>\n     <outputs>\n         <expand macro="populations_output_full"/>\n+\n+        <data format="html" name="output_summary" label="Summary from ${tool.name} on ${on_string}" from_work_dir="stacks_outputs/summary.html" />\n     </outputs>\n \n     <tests>\n@@ -279,9 +288,15 @@\n             <param name="populations_output|phylip_var_all" value="true" />\n             <param name="populations_output|treemix" value="true" />\n \n-            <param name="populations_output|options_genomic|genomic" value="true" />\n+            <param name="populations_output|options_genomic|genomic" value="false" />\n             <param name="populations_output|options_genomic|enzyme" value="ecoRI" />\n \n+            <output name="output_summary">\n+                <assert_contents>\n+                    <has_text text="Stacks Statistics" />\n+                </assert_contents>\n+            </output>\n+\n             <!-- populations -->\n             <output name="out_haplotypes">\n                 <assert_contents>\n@@ -324,7 +339,7 @@\n                 </assert_contents>\n             </output>\n         </test>\n-        <!--test>\n+        <test>\n             <param name="options_usage|input_type" value="vcf" />\n             <param name="options_usage|input_vcf" value="populations/batch_1.vcf" />\n             <param name="options_usage|popmap" ftype="tabular" value="denovo_map/popmap.tsv" />\n@@ -348,11 +363,16 @@\n             <param name="populations_output|phylip_var_all" value="true" />\n             <param name="populations_output|treemix" value="true" />\n \n-            <param name="populations_output|options_genomic|genomic" value="true" />\n-            <param name="populations_output|options_genomic|enzyme" value="ecoRI" /-->\n+            <param name="populations_output|options_genomic|genomic" value="false" />\n+\n+            <output name="output_summary">\n+                <assert_contents>\n+                    <has_text text="Stacks Statistics" />\n+                </assert_contents>\n+            </output>\n \n             <!-- populations -->\n-            <!--output name="out_haplotypes">\n+            <output name="out_haplotypes">\n                 <assert_contents>\n                     <has_text text="PopA_01" />\n                 </assert_contents>\n@@ -389,10 +409,10 @@\n             </output>\n             <output name="out_fasta">\n                 <assert_contents>\n-                    <has_text text="AATTCGTTTGCTGCTTCAGGAATCTCTCGTATAATCTGAGTATGTGCGTACGTACGCTATTTAGATGGATAACCGACGCTGCCAGACGCGAGAC" />\n+                    <has_text text="CLocus_0_Sample_1_Locus_0_Allele_1" />\n                 </assert_contents>\n             </output>\n-        </test-->  <!-- broken in 1.42 -->\n+        </test>\n     </tests>\n     <help>\n <![CDATA[\n'
b
diff -r 5830a37dfa76 -r f5115df39480 test-data/demultiplexed/PopA_01.1.fq.gzip
b
Binary file test-data/demultiplexed/PopA_01.1.fq.gzip has changed
b
diff -r 5830a37dfa76 -r f5115df39480 test-data/denovo_map/popmap_cstacks.tsv
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/denovo_map/popmap_cstacks.tsv Thu Apr 27 04:18:58 2017 -0400
b
@@ -0,0 +1,1 @@
+PopA_01 myPopA
b
diff -r 5830a37dfa76 -r f5115df39480 test-data/procrad/R1.fq.gzip
b
Binary file test-data/procrad/R1.fq.gzip has changed
b
diff -r 5830a37dfa76 -r f5115df39480 test-data/ustacks/ustacks.out
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/ustacks/ustacks.out Thu Apr 27 04:18:58 2017 -0400
b
@@ -0,0 +1,41 @@
+ustacks parameters selected:
+  Sample ID: 1
+  Min depth of coverage to create a stack: 2
+  Max distance allowed between stacks: 2
+  Max distance allowed to align secondary reads: 4
+  Max number of stacks allowed per de novo locus: 3
+  Deleveraging algorithm: disabled
+  Removal algorithm: enabled
+  Model type: SNP
+  Alpha significance level for model: 0.05
+  Gapped alignments: disabled
+Parsing stacks_inputs/PopA_01.fq
+Loading RAD-Tags...done
+Loaded 66 RAD-Tags.
+  Inserted 7 elements into the RAD-Tags hash map.
+  0 reads contained uncalled nucleotides that were modified.
+4 initial stacks were populated; 3 stacks were set aside as secondary reads.
+Initial coverage mean: 15.75; Std Dev: 7.46241; Max: 27
+Deleveraging trigger: 23; Removal trigger: 31
+Calculating distance for removing repetitive stacks.
+  Distance allowed between stacks: 1; searching with a k-mer length of 47 (48 k-mers per read); 1 k-mer hits required.
+Removing repetitive stacks.
+  Removed 0 stacks.
+  4 stacks remain for merging.
+Post-Repeat Removal, coverage depth Mean: 15.75; Std Dev: 7.46241; Max: 27
+Calculating distance between stacks...
+  Distance allowed between stacks: 2; searching with a k-mer length of 31 (64 k-mers per read); 2 k-mer hits required.
+Merging stacks, maximum allowed distance: 2 nucleotide(s)
+  4 stacks merged into 3 loci; deleveraged 0 loci; blacklisted 0 loci.
+After merging, coverage depth Mean: 21; Std Dev: 4.24264; Max: 27
+Merging remainder radtags
+  3 remainder sequences left to merge.
+  Distance allowed between stacks: 4; searching with a k-mer length of 17 (78 k-mers per read); 10 k-mer hits required.
+  Matched 3 remainder reads; unable to match 0 remainder reads.
+After remainders merged, coverage depth Mean: 22; Std Dev: 4.32049; Max: 28
+Calling final consensus sequences, invoking SNP-calling model...
+Number of utilized reads: 66
+Writing loci, SNPs, and alleles to 'stacks_outputs/'...
+  Refetching sequencing IDs from stacks_inputs/PopA_01.fq... read 66 sequence IDs.
+done.
+ustacks is done.