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

Changeset 1:9a44832748c5 (2019-09-30)
Previous changeset 0:6fba323a242d (2019-07-01) Next changeset 2:38942a7e3801 (2020-02-12)
Commit message:
"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/stacks2 commit c300b84615660459bb0020fa74ccd3b874d329a4"
modified:
macros.xml
macros_process.xml
stacks_populations.xml
added:
test-data/procrad/process_radtags2.out
b
diff -r 6fba323a242d -r 9a44832748c5 macros.xml
--- a/macros.xml Mon Jul 01 11:01:14 2019 -0400
+++ b/macros.xml Mon Sep 30 14:17:47 2019 -0400
b
@@ -8,7 +8,7 @@
     </xml>
 
     <token name="@STACKS_VERSION@">2.4</token>
-    <token name="@WRAPPER_VERSION@">0</token>
+    <token name="@WRAPPER_VERSION@">1</token>
     <!-- fix to 18.01 since https://github.com/galaxyproject/galaxy/pull/7032 -->
     <token name="@PROFILE@">18.01</token>
 
@@ -216,8 +216,8 @@
         </expand>
     </xml>
 
-    <!-- fastq input (used in denovomap, tsv2bam, ustacks) 
-         - fastq_optional: makes fastq input optional (true/false) 
+    <!-- fastq input (used in denovomap, tsv2bam, ustacks)
+         - fastq_optional: makes fastq input optional (true/false)
          - se_option: wording for "single end" option (for tsv2bam this is the
               reverse reads for the others its the forward reads)
          - help: help text -->
@@ -568,10 +568,10 @@
         </expand>
     </xml>
 
- <!-- variant calling option for use in gstacks and denovomap 
+ <!-- variant calling option for use in gstacks and denovomap
          default for var_alpha is 0.01 if model == marukilow (which is the case in denovomap and refmap)
          otherwise no default is is available and gstacks will output and error
-         "Error: No value was provided for \-\-var-alpha and there is no default for this model)" 
+         "Error: No value was provided for \-\-var-alpha and there is no default for this model)"
  -->
     <xml name="variant_calling_options_vg" token_varalpha_default="">
         <param argument="--var-alpha" name="var_alpha" type="float" value="@VARALPHA_DEFAULT@" min="0" label="Alpha threshold for discovering SNPs" help="Default is 0.01 if the marukilow model is used (which is the case in refmap and denovomap), otherwise no default value is available." />
b
diff -r 6fba323a242d -r 9a44832748c5 macros_process.xml
--- a/macros_process.xml Mon Jul 01 11:01:14 2019 -0400
+++ b/macros_process.xml Mon Sep 30 14:17:47 2019 -0400
b
@@ -75,7 +75,7 @@
                 <param name="score" type="integer" value="10" min="0" max="40" argument="-s" label="Set the score limit. If the average score within the sliding window drops below this value, the read is discarded" />
                 <param name="remove" type="boolean" checked="false" truevalue="-c" falsevalue="" argument="-c" label="Clean data, remove any read with an uncalled base" />
                 <param name="discard" type="boolean" checked="false" truevalue="-q" falsevalue="" argument="-q" label="Discard reads with low quality scores"/>
-                <param argument="--filter_illumina" type="boolean" checked="false" truevalue="--filter_illumina" falsevalue="" label="Discard reads that have been marked by Illumina's chastity/purity filter as failing" />
+                <param argument="--filter-illumina" name="filter_illumina" type="boolean" checked="false" truevalue="--filter-illumina" falsevalue="" label="Discard reads that have been marked by Illumina's chastity/purity filter as failing" />
             </when>
             <when value="no">
                 <param argument="--len_limit" type="integer" value="" optional="true" label="Minimum sequence length" help="useful if your data has already been trimmed"/>
b
diff -r 6fba323a242d -r 9a44832748c5 stacks_populations.xml
--- a/stacks_populations.xml Mon Jul 01 11:01:14 2019 -0400
+++ b/stacks_populations.xml Mon Sep 30 14:17:47 2019 -0400
[
@@ -8,9 +8,11 @@
     <command detect_errors="aggressive"><![CDATA[
 #import re
 
-mkdir stacks_inputs stacks_outputs
+mkdir stacks_inputs stacks_outputs &&
 
-&&
+#if $output_log
+    ln -s '$output_log' stacks_outputs/populations.log &&
+#end if
 
 #if str($options_usage.input_type) == 'stacks'
     #for $input_file in $options_usage.input_aln
@@ -45,9 +47,9 @@
 
 ## Data filtering
 
--p $options_filtering.minpop
--r $options_filtering.minperc
--R $options_filtering.min_samples_overall
+--min-populations $options_filtering.minpop
+--min-samples-per-pop $options_filtering.minperc
+--min-samples-overall $options_filtering.min_samples_overall
 $options_filtering.filter_haplotype_wise
 --min_maf $options_filtering.min_maf
 --min_mac $options_filtering.min_mac
@@ -143,10 +145,6 @@
         > $output_log
     #end if
     && find stacks_outputs -type f -iname "input.p*" | while read file; do mv "\$file" "\$(echo \$file | sed 's/\/input.p/\/populations/;')"; done
-#else
-    #if $output_log
-        && mv stacks_outputs/populations.log $output_log
-    #end if
 #end if
     ]]></command>
 
@@ -169,8 +167,8 @@
         <!-- Data Filtering -->
         <section name="options_filtering" title="Data filtering options" expanded="true">
 
-            <param name="minperc" argument="-r" type="float" value="0.0" min="0" max="1" label="Minimum percentage of individuals in a population required to process a locus for that population" />
-            <param name="minpop" argument="-p" type="integer" value="1" label="Minimum number of populations a locus must be present in to process a locus" />
+            <param name="minperc" argument="--min-samples-per-pop" type="float" value="0.0" min="0" max="1" label="Minimum percentage of individuals in a population required to process a locus for that population" />
+            <param name="minpop" argument="--min-populations" type="integer" value="1" label="Minimum number of populations a locus must be present in to process a locus" />
             <param name="min_samples_overall" argument="--min-samples-overall" type="float" value="0.0" min="0" max="1" label="minimum percentage of individuals across populations required to process a locus" />
             <param name="filter_haplotype_wise" argument="--filter-haplotype-wise" type="boolean" truevalue="--filter-haplotype-wise" falsevalue="" checked="false" label="apply the above filters haplotype wise" help="unshared SNPs will be pruned to reduce haplotype-wise missing data." />
             <param argument="--min_maf" type="float" value="0" min="0" max="0.5" label="Minimum minor allele frequency" help="specify a minimum minor allele frequency required to process a nucleotide site at a locus" />
@@ -431,8 +429,8 @@
                 <param name="blacklist" value="populations/blacklist.tsv" ftype="tabular" />
             </section>
             <assert_command>
-                <has_text text="-r 0.1" />
-                <has_text text="-p 2" />
+                <has_text text="--min-samples-per-pop 0.1" />
+                <has_text text="--min-populations 2" />
                 <has_text text="--min-samples-overall 0.01" />
                 <has_text text="--filter-haplotype-wise" />
                 <has_text text="--min_maf 0.01" />
@@ -466,18 +464,18 @@
                 <param name="min_maf" value="0.01" />
                 <param name="min_mac" value="1"/>
                 <param name="max_obs_het" value="0.8" />
-                <!-- since write_random_snp runs in ifinite loop switch to write_single -->
+                <!-- since write_random_snp runs in infinite loop switch to write_single -->
                 <param name="filter_single_snp" value="--write_single_snp"/>
                 <param name="blacklist" value="populations/blacklist.tsv" ftype="tabular" />
             </section>
             <assert_command>
-                <has_text text="-r 0.1" />
-                <has_text text="-p 2" />
+                <has_text text="--min-samples-per-pop 0.1" />
+                <has_text text="--min-populations 2" />
                 <has_text text="--min-samples-overall 0.01" />
                 <has_text text="--min_maf 0.01" />
                 <has_text text="--min_mac 1" />
                 <has_text text="--max_obs_het 0.8" />
-                <has_text text="--write_random_snp" />
+                <not_has_text text="--write_random_snp" />
                 <has_text text="-B " />
             </assert_command>
             <output ftype="txt" name="output_log"><assert_contents><has_text text="Populations is done." /></assert_contents></output>
b
diff -r 6fba323a242d -r 9a44832748c5 test-data/procrad/process_radtags2.out
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/test-data/procrad/process_radtags2.out Mon Sep 30 14:17:47 2019 -0400
b
@@ -0,0 +1,88 @@
+process_radtags v2.4, executed 2019-09-30 14:57:00 (zlib-1.2.11)
+process_radtags -p stacks_inputs/ -i gzfastq -b /tmp/tmpe_shit/files/d/e/d/dataset_ded45538-15ef-471f-9585-07ee09b6e6d4.dat --inline_null -y gzfastq -o stacks_outputs -w 0.1 -s 11 -c -q -D -e ecoRI
+File Retained Reads Low Quality Barcode Not Found RAD cutsite Not Found Total
+R1.fastq.gz 2222 0 0 4778 7000
+R2.fastq.gz 0 0 7000 0 7000
+
+Total Sequences 14000
+Barcode Not Found 7000
+Low Quality 0
+RAD Cutsite Not Found 4778
+Retained Reads 2222
+
+Barcode Filename Total NoRadTag LowQuality Retained
+ATGGGG PopA_01 160 94 0 66
+GGGTAA PopA_02 146 86 0 60
+AGGAAA PopA_03 224 132 0 92
+TTTAAG PopA_04 168 146 0 22
+GGTGTG PopA_05 220 154 0 66
+TGATGT PopA_06 214 147 0 67
+GGTTGT PopA_07 182 137 0 45
+ATAAGT PopA_08 232 164 0 68
+AAGATA PopA_09 182 134 0 48
+TGTGAG PopA_10 168 128 0 40
+ATAGTT PopA_11 200 132 0 68
+GGAAGG PopA_12 178 136 0 42
+TTTGTG PopA_13 190 152 0 38
+TTAAAT PopA_14 166 96 0 70
+AATAAG PopA_15 152 74 0 78
+AAGAGG PopA_16 174 112 0 62
+TAGTGT PopA_17 242 146 0 96
+TGGAAG PopA_18 148 98 0 50
+GGGTTG PopA_19 110 64 0 46
+CATCAT PopA_20 178 144 0 34
+GGAGAG PopB_20 210 142 0 68
+GTTTTA PopB_01 136 90 0 46
+TGATAA PopB_02 166 108 0 58
+GTTGAT PopB_03 148 74 0 74
+AGATTA PopB_04 180 156 0 24
+GTATAG PopB_05 136 106 0 30
+TTGGGA PopB_06 166 112 0 54
+ATATAT PopB_07 242 156 0 86
+GATGAG PopB_08 208 152 0 56
+GGGAAT PopB_09 198 126 0 72
+AGTAAT PopB_10 164 120 0 44
+GGGATA PopB_11 146 90 0 56
+GAGAAG PopB_12 162 110 0 52
+AGTAGA PopB_13 204 146 0 58
+AAGGAT PopB_14 180 128 0 52
+AGGGTA PopB_15 134 72 0 62
+TGTTTT PopB_16 138 98 0 40
+ATGATG PopB_17 142 100 0 42
+GAGTTA PopB_18 160 112 0 48
+ATGTAG PopB_19 146 104 0 42
+
+Sequences not recorded
+Barcode Total
+CCGGTG 772
+CCGCGC 750
+CCGACA 743
+CCGGTC 723
+CCGCCT 695
+CCGTGG 675
+CCGGTT 667
+CCGATC 579
+CCGTGT 417
+CCGTAT 252
+CCGCGT 198
+CCGCGG 150
+CCGCAT 117
+CCGTTC 94
+CCGTAC 38
+CCGGGA 32
+CCGGAG 26
+CCGAAC 24
+CCGAGT 18
+CCGTGA 10
+CCGGGT 7
+CCGCTT 2
+CCGACG 2
+CCGATT 1
+CCGCCC 1
+CCGGCA 1
+CCGGCT 1
+CCGGGG 1
+CCGCCG 1
+CCGTGC 1
+CCGTAG 1
+CCGACT 1