diff samtools_depth.xml @ 2:2ee8dc1aeda9 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tool_collections/samtools/samtools_depth commit 0f75269223c0821c6c82acf98fde947d0f816f2b"
author iuc
date Tue, 28 Sep 2021 16:12:22 +0000
parents 44de678a44c4
children 56faa6a57e50
line wrap: on
line diff
--- a/samtools_depth.xml	Mon Oct 15 10:10:39 2018 -0400
+++ b/samtools_depth.xml	Tue Sep 28 16:12:22 2021 +0000
@@ -1,4 +1,4 @@
-<tool id="samtools_depth" name="Samtools depth" version="@TOOL_VERSION@">
+<tool id="samtools_depth" name="Samtools depth" version="@TOOL_VERSION@" profile="@PROFILE@">
     <description>compute the depth at each position or region</description>
     <macros>
         <import>macros.xml</import>
@@ -32,6 +32,15 @@
 #for $i in range(len( $input_bams )):
     ${i}
 #end for
+#set $filter = $additional_options.required_flags
+@FLAGS@
+-g $flags
+#set $filter = $additional_options.skipped_flags
+@FLAGS@
+-G $flags
+$additional_options.deletions
+$additional_options.single_read
+$output_options.header
 > '${output}'
     ]]></command>
     <inputs>
@@ -61,11 +70,30 @@
 
         <param name="basequality" type="integer" argument="-q" min="0" optional="true" label="Only count reads with base quality greater than" />
         <param name="mapquality" type="integer" argument="-Q" min="0" optional="true" label="Only count reads with mapping quality greater than" />
+
+        <section name="additional_options" title="Additional Filter Options">
+            <param name="required_flags" argument="-g" type="select" multiple="True" label="Require that these flags are set.">
+                <expand macro="flag_options" />
+            </param>
+
+            <param name="skipped_flags" argument="-G" type="select" multiple="True" label="Exclude reads with any of the following flags set (the default set is UNMAP,SECONDARY,QCFAIL,DUP or 0x704).">
+                <expand macro="flag_options" s4="true" s256="true" s512="true" s1024="true"/>
+            </param>
+
+            <param name="deletions" type="boolean" argument="-J" truevalue="-J" falsevalue="" checked="false" label="Include reads with deletions in depth computation." />
+            <param name="single_read" type="boolean" argument="-s" truevalue="-s" falsevalue="" checked="false" label="For the overlapping section of a read pair, count only the bases of a single read." />
+        </section>
+
+        <section name="output_options" title="Output Options" expanded="true">
+            <param name="header" type="boolean" argument="-H" truevalue="-H" falsevalue="" checked="false" label="Print a file header to file." />
+        </section>
+
     </inputs>
     <outputs>
         <data name="output" format="tabular" label="${tool.name} on ${on_string}" />
     </outputs>
     <tests>
+        <!-- 1) -->
         <test>
             <conditional name="cond_region">
                 <param name="select_region" value="bed"/>
@@ -74,6 +102,7 @@
             <param name="input_bams" value="eboVir3.bam" ftype="bam" />
             <output name="output" file="samtools_depth_out1.tab" />
         </test>
+        <!-- 2) -->
         <test>
             <conditional name="cond_region">
                 <param name="select_region" value="text"/>
@@ -82,11 +111,13 @@
             <param name="input_bams" value="eboVir3.bam" ftype="bam" />
             <output name="output" file="samtools_depth_out2.tab" />
         </test>
+        <!-- 3) -->
         <test>
             <param name="input_bams" value="eboVir3.bam,eboVir3.2.bam" ftype="bam" />
             <param name="all" value="-a"/>
             <output name="output" file="samtools_depth_out3.tab" />
         </test>
+        <!-- 4) -->
         <test>
             <param name="input_bams" value="eboVir3.bam,eboVir3.2.bam" ftype="bam" />
             <param name="minlength" value="10" />
@@ -97,6 +128,28 @@
             <param name="mapquality" value="12" />
             <output name="output" file="samtools_depth_out4.tab" />
         </test>
+        <!-- 5) Testing argument -H -->
+        <test>
+            <conditional name="cond_region">
+                <param name="select_region" value="bed"/>
+                <param name="input_bed" value="eboVir3.1.bed" ftype="bed" />
+            </conditional>
+            <param name="input_bams" value="eboVir3.bam" ftype="bam" />
+            <param name="header" value="true" />
+            <output name="output" file="samtools_depth_out5.tab" />
+        </test>
+        <!-- 6) Tetsing argument -g -->
+        <test>
+            <param name="input_bams" value="eboVir3.bam" ftype="bam" />
+            <param name="required_flags" value="2,16,64" />
+            <output name="output" file="samtools_depth_out6.tab" />
+        </test>
+        <!-- 7) Tetsing argument -G -->
+        <test>
+            <param name="input_bams" value="eboVir3.bam" ftype="bam" />
+            <param name="skipped_flags" value="2,16,64" />
+            <output name="output" file="samtools_depth_out7.tab" />
+        </test>
     </tests>
     <help>
 **What it does**