diff samtools_flagstat.xml @ 7:fe34990e5ce7 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_flagstat commit 0f75269223c0821c6c82acf98fde947d0f816f2b"
author iuc
date Tue, 28 Sep 2021 16:13:41 +0000
parents 22970df7a40e
children fefd89ab563c
line wrap: on
line diff
--- a/samtools_flagstat.xml	Fri Sep 06 11:22:29 2019 -0400
+++ b/samtools_flagstat.xml	Tue Sep 28 16:13:41 2021 +0000
@@ -1,4 +1,4 @@
-<tool id="samtools_flagstat" name="Samtools flagstat" version="2.0.3">
+<tool id="samtools_flagstat" name="Samtools flagstat" version="2.0.4" profile="@PROFILE@">
     <description>tabulate descriptive stats for BAM datset</description>
 
     <macros>
@@ -10,21 +10,46 @@
 
     <command><![CDATA[
     @ADDTHREADS@
-    samtools flagstat -@ \$addthreads '$input1' > '$output1'
+    samtools flagstat -@ \$addthreads 
+    #if $output_fmt != 'txt'
+        --output-fmt $output_fmt
+    #end if
+    '$input1'
+    > '$output1'
     ]]></command>
 
     <inputs>
         <param name="input1" type="data" format="sam,bam,cram" label="BAM File to report statistics of" />
+        <param argument="--output-fmt" type="select" label="Output format">
+            <option value="txt">txt</option>
+            <option value="tsv">tsv</option>
+            <option value="json">json</option>
+        </param>
     </inputs>
 
     <outputs>
-        <data name="output1" format="txt" />
+        <data name="output1" format="txt">
+            <change_format>
+                <when input="output_fmt" value="tsv" format="tabular" />
+                <when input="output_fmt" value="json" format="json" />
+            </change_format>
+        </data>
     </outputs>
 
     <tests>
         <test>
             <param name="input1" value="samtools_flagstat_input1.bam" ftype="bam" />
-            <output name="output1" file="samtools_flagstat_out1.txt" />
+            <output name="output1" file="samtools_flagstat_out1.txt" ftype="txt"/>
+        </test>
+        <test>
+            <param name="input1" value="samtools_flagstat_input1.bam" ftype="bam" />
+            <param name="output_fmt" value="tsv"/>
+            <output name="output1" file="samtools_flagstat_out1.tsv" ftype="tabular" />
+        </test>
+        <test>
+            <param name="input1" value="samtools_flagstat_input1.bam" ftype="bam" />
+            <param name="output_fmt" value="json"/>
+            <output name="output1" file="samtools_flagstat_out1.json" ftype="json" />
         </test>
     </tests>
     <help><![CDATA[