diff bcftools_roh.xml @ 16:6a636d58dfc2 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bcftools commit db275932cbb485cb44ae91e0b421d6f57698db49
author iuc
date Tue, 20 Sep 2022 12:59:01 +0000
parents fb3af223ff33
children fa65af07ce7d
line wrap: on
line diff
--- a/bcftools_roh.xml	Sat Jul 23 13:39:04 2022 +0000
+++ b/bcftools_roh.xml	Tue Sep 20 12:59:01 2022 +0000
@@ -1,5 +1,5 @@
 <?xml version='1.0' encoding='utf-8'?>
-<tool name="bcftools @EXECUTABLE@" id="bcftools_@EXECUTABLE@" version="@TOOL_VERSION@">
+<tool name="bcftools @EXECUTABLE@" id="bcftools_@EXECUTABLE@" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
     <description>HMM model for detecting runs of homo/autozygosity</description>
     <macros>
         <token name="@EXECUTABLE@">roh</token>
@@ -48,6 +48,8 @@
     --buffer-size "${section.buffer_size}"
   #end if
 #end if
+$section.ignore_homref
+$section.include_noalt
 
 ## HMM section
 #set $section = $sec_hmm
@@ -104,6 +106,8 @@
 The number of overlapping sites for the sliding buffer. The default overlap is set to roughly 1% of the buffer size. 
                 </help>
             </param>
+            <param argument="--ignore-homref" type="boolean" truevalue="--ignore-homref" falsevalue="" checked="false" label="Ignore homo-ref" help="skip hom-ref genotypes (0/0)" />
+            <param argument="--include-noalt" type="boolean" truevalue="--include-noalt" falsevalue="" checked="false" label="Include sites with no ALT allele" help="Ignored by default" />
         </section>
         <section name="sec_hmm" expanded="true" title="HMM Options">
             <param name="hw_to_az" type="float" label="Hw To Az" value="6.7e-8" optional="True" help="P(AZ|HW) transition probability from HW (Hardy-Weinberg) to AZ (autozygous) state" />
@@ -142,6 +146,45 @@
                 </assert_contents>
             </output>
         </test>
+        <!-- Test ignore homref and include noalt-->
+        <test>
+            <param name="input_file" ftype="vcf" value="roh.vcf" />
+            <param name="AF_dflt" value="0.4" />
+            <param name="GTs_only" value="30" />
+            <param name="output_type" value="r" />
+            <param name="ignore_homref" value="true"/>
+            <param name="include_noalt" value="true"/>
+            <output name="output_file">
+                <assert_contents>
+                    <not_has_text text="ST"/>
+                    <has_text_matching expression="RG\tsample\t1"/>
+                </assert_contents>
+            </output>
+            <assert_command>
+                <has_text text="--ignore-homref" />
+                <has_text text="--include-noalt" />
+            </assert_command>
+        </test>
+        <!-- Test region overlap-->
+        <test>
+            <param name="input_file" ftype="vcf" value="roh.vcf" />
+            <section name="sec_general">
+                <param name="AF_dflt" value="0.4" />
+                <param name="GTs_only" value="30" />
+            </section>
+            <section name="sec_restrict">
+                <param name="regions_overlap" value="1"/>
+            </section>
+            <output name="output_file">
+                <assert_contents>
+                    <has_text_matching expression="ST\tsample\t1"/>
+                    <has_text_matching expression="RG\tsample\t1"/>
+                </assert_contents>
+            </output>
+            <assert_command>
+                <has_text text="--regions-overlap" />
+            </assert_command>
+        </test>
     </tests>
     <help><![CDATA[
 =====================================