diff stacks_sstacks.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 09b8edb56d80
line wrap: on
line diff
--- a/stacks_sstacks.xml	Mon Sep 30 14:14:39 2019 -0400
+++ b/stacks_sstacks.xml	Wed Jul 15 17:20:51 2020 -0400
@@ -8,9 +8,8 @@
     <command detect_errors="aggressive"><![CDATA[
 #import re
 
-mkdir stacks_inputs stacks_outputs
-
-&&
+trap ">&2 cat '$output_log'" err exit &&
+mkdir stacks_inputs stacks_outputs &&
 
 @LINK_STACKS_INPUT@
 @LINK_CAT_INPUT@
@@ -34,7 +33,6 @@
 
 @GAP_OPTIONS_ONOFF@
 @TEE_APPEND_LOG@
-@CAT_LOG_TO_STDERR@
 
 #if $popmap
     ## When using a popmap, stacks write to the input dir
@@ -45,8 +43,8 @@
     <inputs>
         <expand macro="input_stacks_macro"/>
         <expand macro="input_cat_macro"/>
-        <param name="popmap" type="data" format="tabular,txt" label="Population map" help="If set, matching will be done only for samples listed in this file" optional="true" argument="-M" />
-        <param argument="-x" type="boolean" checked="true" truevalue="" falsevalue="-x" label="Verify haplotype of matching locus" />
+        <param name="popmap" type="data" format="tabular,txt" label="Population map" help="If set, matching will be done only for samples listed in this file" optional="true" argument="-M"/>
+        <param argument="-x" type="boolean" checked="true" truevalue="" falsevalue="-x" label="Verify haplotype of matching locus"/>
         <expand macro="gap_options_onoff"/>
         <expand macro="in_log"/>
     </inputs>
@@ -58,101 +56,101 @@
 
     <tests>
         <!-- test w default parameters and popmap -->
-        <test>
+        <test expect_num_outputs="2">
             <param name="input_cat">
                 <collection type="list">
-                    <element name="catalog.alleles" ftype="tabular" value="cstacks/catalog.alleles.tsv" />
-                    <element name="catalog.snps" ftype="tabular" value="cstacks/catalog.snps.tsv" />
-                    <element name="catalog.tags" ftype="tabular" value="cstacks/catalog.tags.tsv" />
+                    <element name="catalog.alleles" ftype="tabular" value="cstacks/catalog.alleles.tsv"/>
+                    <element name="catalog.snps" ftype="tabular" value="cstacks/catalog.snps.tsv"/>
+                    <element name="catalog.tags" ftype="tabular" value="cstacks/catalog.tags.tsv"/>
                </collection>
             </param>
             <param name="input_stacks">
                 <collection type="list">
-                    <element name="PopA_01.alleles" ftype="tabular" value="ustacks/PopA_01.alleles.tsv" />
-                    <element name="PopA_01.snps" ftype="tabular" value="ustacks/PopA_01.snps.tsv" />
-                    <element name="PopA_01.tags" ftype="tabular" value="ustacks/PopA_01.tags.tsv" />
-                    <element name="PopA_02.alleles" ftype="tabular" value="ustacks/PopA_02.alleles.tsv" />
-                    <element name="PopA_02.snps" ftype="tabular" value="ustacks/PopA_02.snps.tsv" />
-                    <element name="PopA_02.tags" ftype="tabular" value="ustacks/PopA_02.tags.tsv" />
+                    <element name="PopA_01.alleles" ftype="tabular" value="ustacks/PopA_01.alleles.tsv"/>
+                    <element name="PopA_01.snps" ftype="tabular" value="ustacks/PopA_01.snps.tsv"/>
+                    <element name="PopA_01.tags" ftype="tabular" value="ustacks/PopA_01.tags.tsv"/>
+                    <element name="PopA_02.alleles" ftype="tabular" value="ustacks/PopA_02.alleles.tsv"/>
+                    <element name="PopA_02.snps" ftype="tabular" value="ustacks/PopA_02.snps.tsv"/>
+                    <element name="PopA_02.tags" ftype="tabular" value="ustacks/PopA_02.tags.tsv"/>
                </collection>
             </param>
-            <param name="popmap" ftype="tabular" value="denovo_map/popmap_cstacks.tsv" />
-            <param name="add_log" value="yes" />
+            <param name="popmap" ftype="tabular" value="denovo_map/popmap_cstacks.tsv"/>
+            <param name="add_log" value="yes"/>
             <assert_command>
-                <not_has_text text="-x" />
-                <not_has_text text="--disable-gapped" />
-                <has_text text="-M" />
+                <not_has_text text="-x"/>
+                <not_has_text text="--disable-gapped"/>
+                <has_text text="-M"/>
             </assert_command>
             <output name="output_log" ftype="txt" file="sstacks/sstacks.log"/>
             <output_collection name="matches" type="list">
-                <element name="PopA_01.matches" file="sstacks/PopA_01.matches.tsv" ftype="tabular" lines_diff="2"/>
-                <element name="PopA_02.matches" file="sstacks/PopA_02.matches.tsv" ftype="tabular" lines_diff="2"/>
+                <element name="PopA_01.matches" file="sstacks/PopA_01.matches.tsv" ftype="tabular" lines_diff="4"/>
+                <element name="PopA_02.matches" file="sstacks/PopA_02.matches.tsv" ftype="tabular" lines_diff="4"/>
             </output_collection>
         </test>
         <!-- test w default parameters -->
-        <test>
+        <test expect_num_outputs="2">
             <param name="input_cat">
                 <collection type="list">
-                    <element name="catalog.alleles" ftype="tabular" value="cstacks/catalog.alleles.tsv" />
-                    <element name="catalog.snps" ftype="tabular" value="cstacks/catalog.snps.tsv" />
-                    <element name="catalog.tags" ftype="tabular" value="cstacks/catalog.tags.tsv" />
+                    <element name="catalog.alleles" ftype="tabular" value="cstacks/catalog.alleles.tsv"/>
+                    <element name="catalog.snps" ftype="tabular" value="cstacks/catalog.snps.tsv"/>
+                    <element name="catalog.tags" ftype="tabular" value="cstacks/catalog.tags.tsv"/>
                </collection>
             </param>
             <param name="input_stacks">
                 <collection type="list">
-                    <element name="PopA_01.alleles" ftype="tabular" value="ustacks/PopA_01.alleles.tsv" />
-                    <element name="PopA_01.snps" ftype="tabular" value="ustacks/PopA_01.snps.tsv" />
-                    <element name="PopA_01.tags" ftype="tabular" value="ustacks/PopA_01.tags.tsv" />
-                    <element name="PopA_02.alleles" ftype="tabular" value="ustacks/PopA_02.alleles.tsv" />
-                    <element name="PopA_02.snps" ftype="tabular" value="ustacks/PopA_02.snps.tsv" />
-                    <element name="PopA_02.tags" ftype="tabular" value="ustacks/PopA_02.tags.tsv" />
+                    <element name="PopA_01.alleles" ftype="tabular" value="ustacks/PopA_01.alleles.tsv"/>
+                    <element name="PopA_01.snps" ftype="tabular" value="ustacks/PopA_01.snps.tsv"/>
+                    <element name="PopA_01.tags" ftype="tabular" value="ustacks/PopA_01.tags.tsv"/>
+                    <element name="PopA_02.alleles" ftype="tabular" value="ustacks/PopA_02.alleles.tsv"/>
+                    <element name="PopA_02.snps" ftype="tabular" value="ustacks/PopA_02.snps.tsv"/>
+                    <element name="PopA_02.tags" ftype="tabular" value="ustacks/PopA_02.tags.tsv"/>
                </collection>
             </param>
-            <param name="add_log" value="yes" />
+            <param name="add_log" value="yes"/>
             <assert_command>
-                <not_has_text text="-x" />
-                <not_has_text text="--disable-gapped" />
-                <not_has_text text="-M" />
+                <not_has_text text="-x"/>
+                <not_has_text text="--disable-gapped"/>
+                <not_has_text text="-M"/>
             </assert_command>
-            <output name="output_log" ftype="txt"><assert_contents><has_text text="done." /></assert_contents></output>
+            <output name="output_log" ftype="txt"><assert_contents><has_text text="done."/></assert_contents></output>
             <output_collection name="matches" type="list" count="2">
-                <element name="PopA_01.matches"><assert_contents><has_text text="generated on " /></assert_contents></element>
-                <element name="PopA_02.matches"><assert_contents><has_text text="generated on " /></assert_contents></element>
+                <element name="PopA_01.matches"><assert_contents><has_text text="# sstacks completed on "/></assert_contents></element>
+                <element name="PopA_02.matches"><assert_contents><has_text text="# sstacks completed on "/></assert_contents></element>
             </output_collection>
         </test>
 
         <!-- test w non default parameters and popmap-->
-        <test>
+        <test expect_num_outputs="1">
             <param name="input_cat">
                 <collection type="list">
-                    <element name="catalog.alleles" ftype="tabular" value="cstacks/catalog.alleles.tsv" />
-                    <element name="catalog.snps" ftype="tabular" value="cstacks/catalog.snps.tsv" />
-                    <element name="catalog.tags" ftype="tabular" value="cstacks/catalog.tags.tsv" />
+                    <element name="catalog.alleles" ftype="tabular" value="cstacks/catalog.alleles.tsv"/>
+                    <element name="catalog.snps" ftype="tabular" value="cstacks/catalog.snps.tsv"/>
+                    <element name="catalog.tags" ftype="tabular" value="cstacks/catalog.tags.tsv"/>
                </collection>
             </param>
             <param name="input_stacks">
                 <collection type="list">
-                    <element name="PopA_01.alleles" ftype="tabular" value="ustacks/PopA_01.alleles.tsv" />
-                    <element name="PopA_01.snps" ftype="tabular" value="ustacks/PopA_01.snps.tsv" />
-                    <element name="PopA_01.tags" ftype="tabular" value="ustacks/PopA_01.tags.tsv" />
-                    <element name="PopA_02.alleles" ftype="tabular" value="ustacks/PopA_02.alleles.tsv" />
-                    <element name="PopA_02.snps" ftype="tabular" value="ustacks/PopA_02.snps.tsv" />
-                    <element name="PopA_02.tags" ftype="tabular" value="ustacks/PopA_02.tags.tsv" />
+                    <element name="PopA_01.alleles" ftype="tabular" value="ustacks/PopA_01.alleles.tsv"/>
+                    <element name="PopA_01.snps" ftype="tabular" value="ustacks/PopA_01.snps.tsv"/>
+                    <element name="PopA_01.tags" ftype="tabular" value="ustacks/PopA_01.tags.tsv"/>
+                    <element name="PopA_02.alleles" ftype="tabular" value="ustacks/PopA_02.alleles.tsv"/>
+                    <element name="PopA_02.snps" ftype="tabular" value="ustacks/PopA_02.snps.tsv"/>
+                    <element name="PopA_02.tags" ftype="tabular" value="ustacks/PopA_02.tags.tsv"/>
                </collection>
             </param>
-            <param name="gapped|use_gapped" value="yes" />
-            <param name="x" value="-x" />
-            <param name="popmap" ftype="tabular" value="denovo_map/popmap_cstacks.tsv" />
-            <param name="add_log" value="yes" />
+            <param name="gapped|use_gapped" value="yes"/>
+            <param name="x" value="-x"/>
+            <param name="popmap" ftype="tabular" value="denovo_map/popmap_cstacks.tsv"/>
+            <param name="add_log" value="no"/>
             <assert_command>
-                <has_text text="-x" />
-                <not_has_text text="--disable-gapped" />
-                <has_text text="-M" />
+                <has_text text="-x"/>
+                <not_has_text text="--disable-gapped"/>
+                <has_text text="-M"/>
             </assert_command>
-            <output name="output_log" ftype="txt"><assert_contents><has_text text="done." /></assert_contents></output>
+            <assert_stderr><has_text text="done."/></assert_stderr>
             <output_collection name="matches" type="list" count="2">
-                <element name="PopA_01.matches"><assert_contents><has_text text="generated on " /></assert_contents></element>
-                <element name="PopA_02.matches"><assert_contents><has_text text="generated on " /></assert_contents></element>
+                <element name="PopA_01.matches"><assert_contents><has_text text="# sstacks completed on "/></assert_contents></element>
+                <element name="PopA_02.matches"><assert_contents><has_text text="# sstacks completed on "/></assert_contents></element>
             </output_collection>
         </test>
     </tests>
@@ -200,5 +198,5 @@
 @STACKS_INFOS@
 ]]>
     </help>
-    <expand macro="citation" />
+    <expand macro="citation"/>
 </tool>