diff macros.xml @ 2:0b8c84a7fdb5 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/stacks2 commit f55e2407891a3c1f73f14a77b7ddadcd6f5eb1f8"
author iuc
date Wed, 15 Jul 2020 17:20:51 -0400
parents e58e2ecb6285
children cd034465d4a4
line wrap: on
line diff
--- a/macros.xml	Mon Sep 30 14:14:39 2019 -0400
+++ b/macros.xml	Wed Jul 15 17:20:51 2020 -0400
@@ -3,12 +3,14 @@
     <xml name="requirements">
         <requirements>
             <requirement type="package" version="@STACKS_VERSION@">stacks</requirement>
+            <requirement type="package" version="3.7">python</requirement>
+            <requirement type="package" version="4.6.0">findutils</requirement>
             <yield/>
         </requirements>
     </xml>
 
-    <token name="@STACKS_VERSION@">2.4</token>
-    <token name="@WRAPPER_VERSION@">1</token>
+    <token name="@STACKS_VERSION@">2.53</token>
+    <token name="@WRAPPER_VERSION@">0</token>
     <!-- fix to 18.01 since https://github.com/galaxyproject/galaxy/pull/7032 -->
     <token name="@PROFILE@">18.01</token>
 
@@ -107,16 +109,11 @@
     <!-- log file handling -->
     <token name="@TEE_APPEND_LOG@"><![CDATA[
         #if $output_log
-            2>> '$output_log' &&
-        #end if
-    ]]></token>
-    <token name="@CAT_LOG_TO_STDERR@"><![CDATA[
-        #if $output_log
-            cat '$output_log' 2>&1
+            2> '$output_log'
         #end if
     ]]></token>
     <xml name="in_log">
-        <param name="add_log" type="boolean" checked="true" truevalue="yes" falsevalue="no" label="Add log output as dataset" />
+        <param name="add_log" type="boolean" checked="true" truevalue="yes" falsevalue="no" label="Add log output as dataset"/>
     </xml>
     <xml name="out_log">
         <data format="txt" name="output_log" label="${tool.name} on ${on_string} log file">
@@ -126,19 +123,19 @@
 
     <!-- inputs from previous pipeline steps -->
     <xml name="input_stacks_macro">
-        <param name="input_stacks" format="tabular,txt" type="data_collection" collection_type="list" label="Loci and polymorphism" help="output from previous Stacks pipeline steps e.g. denovo_map, refmap or ustacks" />
+        <param name="input_stacks" format="tabular,txt" type="data_collection" collection_type="list" label="Loci and polymorphism" help="output from previous Stacks pipeline steps e.g. denovo_map, refmap or ustacks"/>
     </xml>
     <xml name="input_cat_macro">
-        <param name="input_cat" format="tabular,txt" type="data_collection" collection_type="list" label="Catalog of loci" help="output from a previous Stacks pipeline steps e.g. denovo_map, refmap or cstacks" />
+        <param name="input_cat" format="tabular,txt" type="data_collection" collection_type="list" label="Catalog of loci" help="output from a previous Stacks pipeline steps e.g. denovo_map, refmap or cstacks"/>
     </xml>
     <xml name="input_matches_macro">
-        <param name="input_matches" format="tabular,txt" type="data_collection" collection_type="list" label="Matches to the catalog" help="output from previous Stacks pipeline steps e.g. denovo_map, refmap or sstacks" />
+        <param name="input_matches" format="tabular,txt" type="data_collection" collection_type="list" label="Matches to the catalog" help="output from previous Stacks pipeline steps e.g. denovo_map, refmap or sstacks"/>
     </xml>
     <xml name="bam_input_macro">
-        <param name="input_bam" format="bam" type="data" multiple="true" optional="false" label="Aligned data" help="either the matches to the catalog (bam), i.e. tsv2bam, or reads aligned to a reference" />
+        <param name="input_bam" format="bam" type="data" multiple="true" optional="false" label="Aligned data" help="either the matches to the catalog (bam), i.e. tsv2bam, or reads aligned to a reference"/>
     </xml>
     <xml name="input_aln_macro">
-        <param name="input_aln" format="vcf,fasta.gz" type="data_collection" collection_type="list" label="Assembled contigs and variant sites" help="output from previous Stacks pipeline steps (e.g. gstacks, denovo_map, or refmap)" argument="-P" />
+        <param name="input_aln" format="vcf,fasta.gz" type="data_collection" collection_type="list" label="Assembled contigs and variant sites" help="output from previous Stacks pipeline steps (e.g. gstacks, denovo_map, or refmap)" argument="-P"/>
     </xml>
 
     <!-- code for creating links to the data sets from previous pipeline steps
@@ -195,15 +192,15 @@
                 <option value="paired">Paired-end files</option>
             </param>
             <when value="single">
-                <param name="fqinputs" argument="-f" type="data" format="fastqsanger,fastqsanger.gz" multiple="@MULTIPLE@" label="Singles-end reads" />
+                <param name="fqinputs" argument="-f" type="data" format="fastqsanger,fastqsanger.gz" multiple="@MULTIPLE@" label="Singles-end reads"/>
                 <param name="barcode_encoding" type="select" label="Barcode location">
-                    <expand macro="barcode_encoding_single" type="Barcode" />
+                    <expand macro="barcode_encoding_single" type="Barcode"/>
                 </param>
             </when>
             <when value="paired">
                 <param name="fqinputs" type="data_collection" collection_type="@LISTTYPE@" label="Paired-end reads" format="fastqsanger,fastqsanger.gz"/>
                 <param name="barcode_encoding" type="select" label="Barcode location">
-                    <expand macro="barcode_encoding_pair" type="Barcode" />
+                    <expand macro="barcode_encoding_pair" type="Barcode"/>
                 </param>
             </when>
         </conditional>
@@ -212,7 +209,7 @@
 
     <xml name="fastq_input_bc_file" token_multiple="false" token_listtype="paired">
         <expand macro="fastq_input_bc" multiple="@MULTIPLE@" listtype="@LISTTYPE@">
-            <param name="barcode" argument="-b" type="data" format="tabular,txt" label="Barcode file" />
+            <param name="barcode" argument="-b" type="data" format="tabular,txt" label="Barcode file"/>
         </expand>
     </xml>
 
@@ -392,27 +389,27 @@
     <!-- TODO tags, snps, and alleles could go to sub collections; same for other tools -->
     <xml name="ustacks_outputs_macro" token_tooladd="">
         <collection name="tabs" type="list" label="${tool.name} @TOOLADD@ on ${on_string} Loci and polymorphism">
-            <discover_datasets pattern="(?P&lt;name&gt;(?!catalog).+\.tags)\.tsv$" ext="tabular" directory="stacks_outputs" />
-            <discover_datasets pattern="(?P&lt;name&gt;(?!catalog).+\.snps)\.tsv$" ext="tabular" directory="stacks_outputs" />
-            <discover_datasets pattern="(?P&lt;name&gt;(?!catalog).+\.alleles)\.tsv$" ext="tabular" directory="stacks_outputs" />
+            <discover_datasets pattern="(?P&lt;name&gt;(?!catalog).+\.tags)\.tsv$" ext="tabular" directory="stacks_outputs"/>
+            <discover_datasets pattern="(?P&lt;name&gt;(?!catalog).+\.snps)\.tsv$" ext="tabular" directory="stacks_outputs"/>
+            <discover_datasets pattern="(?P&lt;name&gt;(?!catalog).+\.alleles)\.tsv$" ext="tabular" directory="stacks_outputs"/>
         </collection>
     </xml>
     <!-- cstacks outputs collection containing catalog.tags.tsv, catalog.snps.tsv, catalog.alleles.tsv -->
     <xml name="cstacks_outputs_macro" token_tooladd="">
         <collection name="catalog" type="list" label="${tool.name} @TOOLADD@ on ${on_string} Catalog of loci">
-            <discover_datasets pattern="(?P&lt;name&gt;catalog\.(tags|snps|alleles))\.tsv$" ext="tabular" directory="stacks_outputs" />
+            <discover_datasets pattern="(?P&lt;name&gt;catalog\.(tags|snps|alleles))\.tsv$" ext="tabular" directory="stacks_outputs"/>
         </collection>
     </xml>
     <!-- sstacks outputs collection containing SAMPLE.matches.tsv -->
     <xml name="sstacks_outputs_macro" token_tooladd="">
         <collection name="matches" type="list" label="${tool.name} @TOOLADD@ on ${on_string} Matches to the catalog">
-            <discover_datasets pattern="(?P&lt;name&gt;.+\.matches)\.tsv$" ext="tabular" directory="stacks_outputs" />
+            <discover_datasets pattern="(?P&lt;name&gt;.+\.matches)\.tsv$" ext="tabular" directory="stacks_outputs"/>
         </collection>
     </xml>
     <!-- tsv2bam outputs collection containing SAMPLE.matches.bam -->
     <xml name="tsv2bam_outputs_macro" token_tooladd="">
         <collection name="bams" type="list" label="${tool.name} @TOOLADD@ on ${on_string} Matches to the catalog (bam)">
-            <discover_datasets pattern="(?P&lt;name&gt;.+\.matches)\.bam$" ext="bam" directory="stacks_outputs" />
+            <discover_datasets pattern="(?P&lt;name&gt;.+\.matches)\.bam$" ext="bam" directory="stacks_outputs"/>
         </collection>
     </xml>
     <!-- gstacks outputs collection containing catalog.calls.vcf and catalog.fa.gz
@@ -423,7 +420,7 @@
             <filter>add_log_distribs</filter>
         </data>
         <collection name="gstacks_alns_out" type="list" label="${tool.name} @TOOLADD@ on ${on_string} Read alignments">
-            <discover_datasets pattern="(?P&lt;name&gt;.*).alns.bam$" ext="bam" directory="stacks_outputs" />
+            <discover_datasets pattern="(?P&lt;name&gt;.*).alns.bam$" ext="bam" directory="stacks_outputs"/>
             <filter>mode_cond['mode_select'] == 'denovo' and mode_cond['advanced_cond']['advanced_select'] == "yes" and mode_cond['advanced_cond']['write_alignments'] != "" and popmap!=None</filter>
         </collection>
         <data name="gstacks_aln_out" format="bam" label="${tool.name} @TOOLADD@ on ${on_string} Read alignment" from_work_dir="stacks_outputs/alignments.bam">
@@ -432,24 +429,27 @@
     </xml>
     <xml name="gstacks_outputs_macro" token_tooladd="">
         <collection name="gstacks_out" type="list" label="${tool.name} @TOOLADD@ on ${on_string} Assembled contigs and variant sites">
-            <discover_datasets pattern="(?P&lt;name&gt;catalog\.calls\.vcf)$" ext="vcf" directory="stacks_outputs" />
-            <discover_datasets pattern="(?P&lt;name&gt;catalog\.fa\.gz)$" ext="fasta.gz" directory="stacks_outputs" />
+            <discover_datasets pattern="(?P&lt;name&gt;catalog\.calls\.vcf)$" ext="vcf" directory="stacks_outputs"/>
+            <discover_datasets pattern="(?P&lt;name&gt;catalog\.fa\.gz)$" ext="fasta.gz" directory="stacks_outputs"/>
         </collection>
     </xml>
 
     <!-- default output of populations -->
     <xml name="populations_output_light" token_tooladd="">
-        <data format="tabular" name="out_haplotypes" label="${tool.name} @TOOLADD@ on ${on_string} Raw Genotypes/Haplotypes" from_work_dir="stacks_outputs/populations.haplotypes.tsv" />
-        <data format="tabular" name="out_hapstats" label="${tool.name} @TOOLADD@ on ${on_string} Population-level haplotype summary statistics" from_work_dir="stacks_outputs/populations.hapstats.tsv" />
-        <data format="txt" name="out_populations_log_distribs" label="${tool.name} @TOOLADD@ on ${on_string} Populations log distributions" from_work_dir="stacks_outputs/populations.log.distribs" />
-        <data format="tabular" name="out_sumstats_sum" label="${tool.name} @TOOLADD@ on ${on_string} Summary of Population-level summary statistics" from_work_dir="stacks_outputs/populations.sumstats_summary.tsv" />
-        <data format="tabular" name="out_sumstats" label="${tool.name} @TOOLADD@ on ${on_string} Population-level summary statistics" from_work_dir="stacks_outputs/populations.sumstats.tsv" />
-        <data format="tabular" name="out_sql" label="${tool.name} @TOOLADD@ on ${on_string} Genotyping markers" from_work_dir="stacks_outputs/populations.markers.tsv" />
+        <data format="tabular" name="out_haplotypes" label="${tool.name} @TOOLADD@ on ${on_string} Raw Genotypes/Haplotypes" from_work_dir="stacks_outputs/populations.haplotypes.tsv"/>
+        <data format="tabular" name="out_hapstats" label="${tool.name} @TOOLADD@ on ${on_string} Population-level haplotype summary statistics" from_work_dir="stacks_outputs/populations.hapstats.tsv"/>
+        <data format="txt" name="out_populations_log_distribs" label="${tool.name} @TOOLADD@ on ${on_string} Populations log distributions" from_work_dir="stacks_outputs/populations.log.distribs"/>
+        <data format="tabular" name="out_sumstats_sum" label="${tool.name} @TOOLADD@ on ${on_string} Summary of Population-level summary statistics" from_work_dir="stacks_outputs/populations.sumstats_summary.tsv"/>
+        <data format="tabular" name="out_sumstats" label="${tool.name} @TOOLADD@ on ${on_string} Population-level summary statistics" from_work_dir="stacks_outputs/populations.sumstats.tsv"/>
     </xml>
 
     <xml name="populations_output_full">
         <expand macro="populations_output_light"/>
 
+        <data format="txt" name="out_sql" label="${tool.name} @TOOLADD@ on ${on_string} Genotyping markers" from_work_dir="stacks_outputs/populations.sql.tsv">
+            <filter>genetic_map_options['map_type'] and genetic_map_options['map_format']</filter>
+        </data>
+
         <!-- log_fst_comp populations.fst_summary.tsv populations.phistats_summary.tsv populations.phistats.tsv-->
         <data format="tabular" name="out_phistats" label="${tool.name} on ${on_string} Phi_st statistics" from_work_dir="stacks_outputs/populations.phistats.tsv">
             <filter>advanced_options['log_fst_comp'] and fstats_conditional['fstats']=='yes'</filter>
@@ -533,6 +533,26 @@
         </data>
     </xml>
 
+    <!-- fastq output for kmer/clone-filter -->
+    <xml name="fastq_output_filter">
+        <data name="clean" format_source="fqinputs" label="${tool.name} on ${on_string}">
+            <filter>input_type['input_type_select'] == 'single'</filter>
+            <yield/>
+        </data>
+        <collection name="clean_pair" type="paired" format_source="fqinputs" label="${tool.name} on ${on_string}">
+            <filter>input_type['input_type_select'] == 'paired'</filter>
+            <yield/>
+        </collection>
+        <data name="discarded" format_source="fqinputs" label="${tool.name} on ${on_string}: discarded reads">
+            <filter>capture and input_type['input_type_select'] == 'single'</filter>
+            <yield/>
+        </data>
+        <collection name="discarded_pair" format_source="fqinputs" type="paired" label="${tool.name} on ${on_string}: discarded reads">
+            <filter>capture and input_type['input_type_select'] == 'paired'</filter>
+            <yield/>
+        </collection>
+    </xml>
+
     <xml name="snp_options_alpha">
         <param argument="--alpha" type="select" label="Chi square significance level required to call a heterozygote or homozygote" >
             <option value="0.1">0.1</option>
@@ -554,7 +574,7 @@
             </when>
             <when value="bounded">
                 <param argument="--bound_low" type="float" value="0.0" min="0.0" max="1.0" label="Lower bound for epsilon, the error rate" help="between 0 and 1.0"/>
-                <param argument="--bound_high" type="float" value="1.0" min="0.0" max="1.0" label="Upper bound for epsilon, the error rate" help="between 0 and 1.0" />
+                <param argument="--bound_high" type="float" value="1.0" min="0.0" max="1.0" label="Upper bound for epsilon, the error rate" help="between 0 and 1.0"/>
                 <expand macro="snp_options_alpha"/>
             </when>
             <when value="fixed">
@@ -574,8 +594,8 @@
          "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." />
-        <param argument="--gt-alpha" name="gt_alpha" type="float" value="0.05" min="0" label="Alpha threshold for calling genotypes" />
+        <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."/>
+        <param argument="--gt-alpha" name="gt_alpha" type="float" value="0.05" min="0" label="Alpha threshold for calling genotypes"/>
     </xml>
 
     <xml name="barcode_encoding_single" token_type="">