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

Changeset 8:bec1f08cdfcc (2017-04-27)
Previous changeset 7:f1f715f5d2f3 (2017-04-07) Next changeset 9:57910d476be9 (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_procrad.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 f1f715f5d2f3 -r bec1f08cdfcc macros.xml
--- a/macros.xml Fri Apr 07 11:49:00 2017 -0400
+++ b/macros.xml Thu Apr 27 04:19:34 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 f1f715f5d2f3 -r bec1f08cdfcc stacks_procrad.xml
--- a/stacks_procrad.xml Fri Apr 07 11:49:00 2017 -0400
+++ b/stacks_procrad.xml Thu Apr 27 04:19:34 2017 -0400
[
b'@@ -7,29 +7,29 @@\n     <expand macro="stdio"/>\n     <command><![CDATA[\n \n-        #if $input_type.options_type_selector == "single":\n+        #if $input_type.options_type_selector == "single"\n \n-            #if $input_type.input_single.is_of_type(\'fastqsanger\'):\n+            #if $input_type.input_single.is_of_type(\'fastqsanger\')\n                 #set $ext = ".fq"\n                 #set inputype = "fastq"\n-            #else:\n+            #else\n                 #set $ext = ".fq.gz"\n                 #set inputype = "gzfastq"\n             #end if\n \n-            ln -s "$input_type.input_single" R1$ext &&\n+            ln -s \'$input_type.input_single\' R1$ext &&\n         #else\n \n-            #if $input_type.inputs_paired1.is_of_type(\'fastqsanger\'):\n+            #if $input_type.inputs_paired1.is_of_type(\'fastqsanger\')\n                 #set $ext = ".fq"\n                 #set inputype = "fastq"\n-            #else:\n+            #else\n                 #set $ext = ".fq.gz"\n                 #set inputype = "gzfastq"\n             #end if\n \n-            ln -s "$input_type.inputs_paired1" R1$ext &&\n-            ln -s "$input_type.inputs_paired2" R2$ext &&\n+            ln -s \'$input_type.inputs_paired1\' R1$ext &&\n+            ln -s \'$input_type.inputs_paired2\' R2$ext &&\n         #end if\n \n         mkdir stacks_outputs\n@@ -38,31 +38,33 @@\n \n         process_radtags\n \n-            #if $input_type.options_type_selector == "single":\n+            #if $input_type.options_type_selector == "single"\n                 -f R1$ext\n-            #else:\n+            #else\n                 -1 R1$ext\n                 -2 R2$ext\n             #end if\n \n             -i $inputype\n-            -b "$barcode"\n+            -b \'$barcode\'\n \n             $input_type.barcode_encoding\n \n-            #if str( $options_enzyme.options_enzyme_selector ) == "1":\n+            #if str( $options_enzyme.options_enzyme_selector ) == "1"\n                 -e $options_enzyme.enzyme\n-            #else:\n+            #else\n                 --renz_1 $options_enzyme.enzyme --renz_2 $options_enzyme.enzyme2\n             #end if\n \n-            -y $outype\n+            #if str( $outype ) != "auto"\n+                -y $outype\n+            #end if\n \n             $capture\n \n             $options_advanced.retain_header\n \n-            #if str($options_advanced.truncate):\n+            #if str($options_advanced.truncate)\n                 -t $options_advanced.truncate\n             #end if\n \n@@ -85,7 +87,7 @@\n                 <option value="paired">Paired-end files</option>\n             </param>\n             <when value="single">\n-                <param name="input_single" argument="-f" format="fastqsanger,fastq.gz" type="data" label="singles-end reads infile(s)" help="input files" />\n+                <param name="input_single" argument="-f" format="fastqsanger,fastqsanger.gz" type="data" label="singles-end reads infile(s)" help="input files" />\n \n                 <param name="barcode_encoding" type="select" label="Barcode location">\n                     <option value="--inline_null" selected="True">Barcode is inline with sequence</option>\n@@ -93,8 +95,8 @@\n                 </param>\n             </when>\n             <when value="paired">\n-                <param name="inputs_paired1" argument="-1" format="fastqsanger,fastq.gz" type="data" label="paired-end reads infile(s) 1" help="Files must have this syntax : name_R1_001.fastq" />\n-                <param name="inputs_paired2" argument="-2" format="fastqsanger,fastq.gz" type="data" label="paired-end reads infile(s) 2" help="Files must have this syntax : name_R2_001.fastq" />\n+                <param name="inputs_paired1" argument="-1" format="fastqsanger,fastqsanger.gz" type="data" label="paired-end reads infile(s) 1" help="Files must have this syntax : name_R1_001.fastq" />\n+                <param name="inputs_paired2" argument="-2" format="fastqsanger,fastqsanger.gz" type="data" label="paired-end reads infile(s) 2" help="Files must have this syntax : name_R2_'..b'type="list" label="${tool.name}: discarded reads from ${on_string}">\n             <filter>capture is True</filter>\n             <discover_datasets pattern="(?P&lt;name&gt;.+)\\.fq\\.discards$" ext="fastqsanger" directory="stacks_outputs" />\n+            <discover_datasets pattern="(?P&lt;name&gt;.+)\\.fq\\.gz.discards$" ext="fastqsanger" directory="stacks_outputs" /> <!-- discards are never gzipped -->\n             <discover_datasets pattern="(?P&lt;name&gt;.+)\\.fa\\.discards$" ext="fasta" directory="stacks_outputs" />\n         </collection>\n     </outputs>\n@@ -189,6 +195,23 @@\n             </output_collection>\n         </test>\n         <test>\n+            <param name="options_type_selector" value="single"/>\n+            <param name="input_single" ftype="fastqsanger" value="procrad/R1.fq"/>\n+            <param name="barcode" value="procrad/barcodes"/>\n+            <param name="options_enzyme_selector" value="1"/>\n+            <param name="enzyme" value="ecoRI"/>\n+            <param name="discard" value="true"/>\n+            <param name="capture" value="true"/>\n+            <param name="outype" value="gzfastq"/>\n+            <output name="output_log" file="procrad/process_radtags.out" compare="sim_size"/>\n+            <output_collection name="demultiplexed">\n+                <element name="PopA_01" ftype="fastqsanger.gz" md5="c7250f50138cbca747b85223aaae9565"/>\n+            </output_collection>\n+            <output_collection name="discarded">\n+                <element name="R1" ftype="fastqsanger" md5="786b30d864332a2d56d9179f0a53add4"/>\n+            </output_collection>\n+        </test>\n+        <test>\n             <param name="options_type_selector" value="paired"/>\n             <param name="inputs_paired1" ftype="fastqsanger" value="procrad/R1.fq"/>\n             <param name="inputs_paired2" ftype="fastqsanger" value="procrad/R2.fq"/>\n@@ -262,6 +285,43 @@\n                 </element>\n             </output_collection>\n         </test>\n+        <test>\n+            <param name="options_type_selector" value="single"/>\n+            <param name="input_single" ftype="fastqsanger" value="procrad/R1.fq.gzip"/>\n+            <param name="barcode" value="procrad/barcodes"/>\n+            <param name="options_enzyme_selector" value="1"/>\n+            <param name="enzyme" value="ecoRI"/>\n+            <param name="discard" value="true"/>\n+            <param name="capture" value="true"/>\n+            <output name="output_log" file="procrad/process_radtags.out" compare="sim_size"/>\n+            <output_collection name="demultiplexed">\n+                <element name="PopA_01" compare="sim_size" file="demultiplexed/PopA_01.1.fq"/>\n+            </output_collection>\n+            <output_collection name="discarded">\n+                <element name="R1">\n+                    <assert_contents>\n+                        <has_text text="lane1_fakedata0_11" />\n+                    </assert_contents>\n+                </element>\n+            </output_collection>\n+        </test>\n+        <test>\n+            <param name="options_type_selector" value="single"/>\n+            <param name="input_single" ftype="fastqsanger.gz" value="procrad/R1.fq.gzip"/>\n+            <param name="barcode" value="procrad/barcodes"/>\n+            <param name="options_enzyme_selector" value="1"/>\n+            <param name="enzyme" value="ecoRI"/>\n+            <param name="discard" value="true"/>\n+            <param name="capture" value="true"/>\n+            <param name="outype" value="gzfastq"/>\n+            <output name="output_log" file="procrad/process_radtags.out" compare="sim_size"/>\n+            <output_collection name="demultiplexed">\n+                <element name="PopA_01" compare="sim_size" file="demultiplexed/PopA_01.1.fq.gzip"/>\n+            </output_collection>\n+            <output_collection name="discarded">\n+                <element name="R1" ftype="fastqsanger" md5="786b30d864332a2d56d9179f0a53add4"/>\n+            </output_collection>\n+        </test>\n     </tests>\n \n \n'
b
diff -r f1f715f5d2f3 -r bec1f08cdfcc test-data/demultiplexed/PopA_01.1.fq.gzip
b
Binary file test-data/demultiplexed/PopA_01.1.fq.gzip has changed
b
diff -r f1f715f5d2f3 -r bec1f08cdfcc 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:19:34 2017 -0400
b
@@ -0,0 +1,1 @@
+PopA_01 myPopA
b
diff -r f1f715f5d2f3 -r bec1f08cdfcc test-data/procrad/R1.fq.gzip
b
Binary file test-data/procrad/R1.fq.gzip has changed
b
diff -r f1f715f5d2f3 -r bec1f08cdfcc 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:19:34 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.