diff dada2_filterAndTrim.xml @ 2:23fc35093b11 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/dada2 commit f2a33fe115fef9d711112b53136cf7619f1b19be"
author iuc
date Mon, 16 Mar 2020 07:33:38 -0400
parents cc41546adf56
children 34e55239e68b
line wrap: on
line diff
--- a/dada2_filterAndTrim.xml	Thu Dec 05 17:59:14 2019 -0500
+++ b/dada2_filterAndTrim.xml	Mon Mar 16 07:33:38 2020 -0400
@@ -82,6 +82,11 @@
 
 rownames(ftout) <- c( '$paired_cond.reads.element_identifier' )
 write.table(ftout, "$outtab", quote=F, sep="\t", col.names=NA)
+
+if(0 %in% ftout){
+    quit(save="no", status="1")
+}
+
     ]]></configfile>
     </configfiles>
     <inputs>
@@ -137,7 +142,13 @@
                 <element name="forward" value="filterAndTrim_F3D0_R1.fq.gz" ftype="fastqsanger.gz" />
                 <element name="reverse" value="filterAndTrim_F3D0_R2.fq.gz" ftype="fastqsanger.gz" />
             </output_collection>
-            <output name="outtab" value="filterAndTrim_F3D0.tab" ftype="tabular"/>
+            <!-- in the test the used collection (the pair) has the name "Unnamed collection" hence we have two lines difference. In the real world the pair will have the sample name, i.e its OK. To be sure we test for the counts as well -->
+            <output name="outtab" value="F3D0_S188_L001_R1_001.tab" ftype="tabular" lines_diff="2">
+                <assert_contents>
+                    <has_text text="745" />
+                    <has_text text="750" />
+                </assert_contents>
+            </output>
         </test>
         <!-- paired data given separately -->
         <test expect_num_outputs="3">
@@ -148,7 +159,7 @@
             </conditional>
             <output name="output_fwd" value="filterAndTrim_F3D0_R1.fq.gz" ftype="fastqsanger.gz" />
             <output name="output_rev" value="filterAndTrim_F3D0_R2.fq.gz" ftype="fastqsanger.gz" />
-            <output name="outtab" value="filterAndTrim_F3D0.tab" ftype="tabular" compare="sim_size"/>
+            <output name="outtab" value="F3D0_S188_L001_R1_001.tab" ftype="tabular"/>
         </test>
         <!-- single end data -->
         <test expect_num_outputs="1">
@@ -213,6 +224,22 @@
             <param name="output_statistics" value="FALSE" />
             <output_collection name="paired_output" type="paired" count="2"/>
         </test>
+
+        <!-- test failure in case all reads are filtered -->
+        <test expect_exit_code="1" expect_failure="true">
+            <conditional name="paired_cond" >
+                <param name="paired_select" value="paired"/>
+                <param name="reads">
+                    <collection type="paired">
+                        <element name="forward" value="F3D0_S188_L001_R1_001.fastq.gz" ftype="fastqsanger.gz"/>
+                        <element name="reverse" value="F3D0_S188_L001_R2_001.fastq.gz" ftype="fastqsanger.gz"/>
+                    </collection>
+                </param>
+            </conditional>
+            <param name="filter|minLen" value="1000" />
+            <param name="output_statistics" value="FALSE" />
+        </test>
+
     </tests>
 
     <help><![CDATA[