diff canu.xml @ 1:58346ef3116b draft

planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/canu commit 21c4301d86a46ba48759ffeb4a0b7f3c269558e4
author bgruening
date Sat, 09 Jun 2018 13:46:56 -0400
parents 4c8f32256fa8
children c5b7390290b1
line wrap: on
line diff
--- a/canu.xml	Fri Jun 08 04:43:41 2018 -0400
+++ b/canu.xml	Sat Jun 09 13:46:56 2018 -0400
@@ -15,7 +15,9 @@
     #end for
 
     canu
-        $stage
+        #if $stage != 'all':
+            $stage
+        #end if
         -p canu
         -d out_dir
         #if $s:
@@ -63,6 +65,8 @@
             #end if
         #end for
         2>&1
+        &&  
+        echo "Check echo"
     ]]>
     </command>
     <inputs>
@@ -74,13 +78,15 @@
             <option value="-pacbio-corrected">PacBio corrected</option>
         </param>
         <param name="stage" type="select" label="To restrict canu to only a specific stage, use">
-            <option value="" selected="true">all</option>
+            <option value="all" selected="true">all</option>
             <option value="-correct">generate corrected reads</option>
             <option value="-trim">generate trimmed reads</option>
             <option value="-assemble">generate an assembly</option>
             <option value="-trim-assemble">generate trimmed reads and then assemble them</option>
         </param>
-        <param argument="genomeSize" type="text" label="Estimated genome size (e.g. 80m, 15k, 2g)" />
+        <param argument="genomeSize" type="text" label="Estimated genome size (e.g. 80m, 15k, 2g)">
+            <validator type="empty_field" />
+        </param>
         <param argument="rawErrorRate" type="float" value="" optional="true" min="0" max="1"
             label="Maximum raw overlap mismatch" help="The defaults are 0.300 for PacBio reads and 0.500 for Nanopore reads." />
         <param argument="correctedErrorRate" type="float" value="" optional="true" min="0" max="1"
@@ -102,27 +108,33 @@
     </inputs>
     <outputs>
         <data name="contigs" format="fasta" from_work_dir="out_dir/canu.contigs.fasta" label="${tool.name} on ${on_string} (contigs)">
+            <filter>stage == 'all'</filter>
         </data>
-        <data name="unassembled" format="fasta" from_work_dir="out_dir/canu.unassembled.fasta" label="${tool.name} on ${on_string} (contigs)">
+        <data name="unassembled" format="fasta" from_work_dir="out_dir/canu.unassembled.fasta" label="${tool.name} on ${on_string} (unassembled)">
+            <filter>stage == 'all'</filter>
         </data>
         <data name="unitigs" format="fasta" from_work_dir="out_dir/canu.unitigs.fasta" label="${tool.name} on ${on_string} (unitigs)">
+            <filter>stage == 'all'</filter>
         </data>
-        <data name="corrected_reads" format="fasta.gz" from_work_dir="out_dir/canu.correctedReads.fasta.gz" label="${tool.name} on ${on_string} (unitigs)">
+        <data name="corrected_reads" format="fasta.gz" from_work_dir="out_dir/canu.correctedReads.fasta.gz" label="${tool.name} on ${on_string} (corrected reads)">
+            <filter>'-correct' in stage or stage == 'all'</filter>
+        </data>
+        <data name="trimmed_reads" format="fasta.gz" from_work_dir="out_dir/canu.trimmedReads.fasta.gz" label="${tool.name} on ${on_string} (trimmed reads)">
+            <filter>'-trim' in stage or stage == 'all'</filter>
         </data>
     </outputs>
-    <tests>
-        <test>
-            <!-- test multiple input -->
+     <tests>
+       <test expect_num_outputs="5">
             <param name="inputs" ftype="fasta" value="ecoli-reads.fasta"/>
             <param name="genomeSize" value="4.6m" />
-            <param name="minReadLength" value="2000" />            
-            <output name="contigs" ftype="fasta" file="ecoli_canu_contigs.fa"/>
-            <output name="unitigs" ftype="fasta" file="ecoli_canu_unitigs.fa"/>
-            <output name="unassembled" ftype="fasta" file="ecoli_unassembled.fa"/>
+            <param name="minReadLength" value="2000" />
+            <output name="contigs" ftype="fasta" file="ecoli_canu_contigs_result1.fa"/>
+            <output name="unitigs" ftype="fasta" file="ecoli_canu_unitigs_result1.fa"/>
+            <output name="unassembled" ftype="fasta" file="ecoli_canu_unassembled_result1.fa"/>
+            <output name="corrected_reads" ftype="fasta.gz" decompress="True" file="ecoli_canu_corrected_reads_result1.fa.gz"/>
+            <output name="trimmed_reads" ftype="fasta.gz" decompress="True" file="ecoli_canu_trimmed_reads_result1.fa.gz"/>
         </test>
-
-        <test >
-            <!-- test multiple input -->
+        <test expect_num_outputs="5">
             <param name="inputs" ftype="fasta" value="ecoli-reads.fasta"/>
             <param name="genomeSize" value="4.6m" />
             <param name="minReadLength" value="2000" />
@@ -130,21 +142,26 @@
             <param name="rawErrorRate" value="0.2" />
             <param name="correctedErrorRate" value="0.05" />
             <param name="corOutCoverage" value="2" />
-            <output name="contigs" ftype="fasta" file="canu_contigs_result1.fa"/>
-            <output name="unitigs" ftype="fasta" file="canu_unitigs_result1.fa"/>
-            <output name="unassembled" ftype="fasta" file="canu_unassembled_result1.fa"/>
+            <output name="contigs" ftype="fasta" file="ecoli_canu_contigs_result2.fa"/>
+            <output name="unitigs" ftype="fasta" file="ecoli_canu_unitigs_result2.fa"/>
+            <output name="unassembled" ftype="fasta" file="ecoli_canu_unassembled_result2.fa"/>
+            <output name="corrected_reads" ftype="fasta.gz" decompress="True" file="ecoli_canu_corrected_reads_result2.fa.gz"/>
+            <output name="trimmed_reads" ftype="fasta.gz" decompress="True" file="ecoli_canu_trimmed_reads_result2.fa.gz"/>
         </test>
-        <test>
-            <!-- test multiple input -->
+        <test expect_num_outputs="1">
             <param name="inputs" ftype="fasta" value="ecoli-reads.fasta"/>
-            <param name="minReadLength" value="2000" />
             <param name="stage" value="-correct"/>
+            <param name="minReadLength" value="2500" />
             <param name="genomeSize" value="4.6m" />
-            <section name="contigFilter">
-                <param name="minReads" value="10" />
-            </section>
-            <output name="corrected_reads" ftype="fasta.gz" decompress="True" file="canu_corrected_reads.fa.gz"/>
-        </test>
+            <output name="corrected_reads" ftype="fasta.gz" decompress="True" file="ecoli_canu_corrected_reads_result3.fa.gz"/>
+        </test> 
+        <test expect_num_outputs="1">
+            <param name="inputs" ftype="fasta" value="ecoli-reads.fasta"/>
+            <param name="stage" value="-trim"/>
+            <param name="minReadLength" value="2500" />
+            <param name="genomeSize" value="4.6m" />
+            <output name="trimmed_reads" ftype="fasta.gz" compare="sim_size" delta="12000" file="ecoli_canu_trimmed_reads_result4.fa.gz"/>
+        </test>  
     </tests>
     <help>
     <![CDATA[