diff bcftools_concat.xml @ 17:03e0645395d2 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:55:03 +0000
parents fc47ffec447e
children
line wrap: on
line diff
--- a/bcftools_concat.xml	Sat Jul 23 13:44:41 2022 +0000
+++ b/bcftools_concat.xml	Tue Sep 20 12:55:03 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>Concatenate or combine VCF/BCF files</description>
     <macros>
         <token name="@EXECUTABLE@">concat</token>
@@ -29,6 +29,9 @@
         #end if
     #end if
     ${section.mode.ligate}
+    #if $section.mode.ligate_mode
+        $section.mode.ligate_mode
+    #end if
 #end if
 ${section.compact_PS}
 #if str($section.min_PQ):
@@ -56,7 +59,7 @@
         </section>
         <section name="sec_default" expanded="true" title="Concat Options">
             <conditional name="mode">
-                <param name="naive" type="select" label="naive concat">
+                <param argument="--naive" type="select" label="Naive concat">
                     <help><![CDATA[
 --naive concatenates VCF or BCF files without recompression. This can be used used to combine results that were generated separately for each chromosome.  This is very fast but requires that all files are of the same type (all VCF or all BCF) and have the same headers. This is because all tags and chromosome names in the BCF body rely on the implicit order of the contig and tag definitions in the header. Currently no sanity checks are in place. Dangerous, use with caution.
                     ]]></help>
@@ -90,6 +93,10 @@
                     </conditional>
                     <param name="ligate" type="boolean" truevalue="--ligate" falsevalue="" label="Ligate"
                            help="Ligate phased VCFs by matching phase at overlapping haplotypes" />
+                    <param name="ligate_mode" type="select" optional="true" label="Ligate mode" help="It allows finer control of --ligate behavior">
+                        <option value="--ligate-warn">Ligate warn: Drop sites that are present in one chunk but absent in the other (--ligate-warn)</option>
+                        <option value="--ligate-force">Ligate force: Kepp sites that are present only in one chunk (--ligate-force)</option>
+                    </param>
                 </when>
             </conditional>
             <param name="compact_PS" type="boolean" truevalue="--compact-PS" falsevalue="" label="Compact Ps"
@@ -115,7 +122,7 @@
         </test>
         <test>
             <param name="input_files" ftype="vcf" value="concat.1.b.vcf,concat.1.a.vcf" />
-            <param name="naive" value="yes" />
+            <param name="naive" value="no" />
             <param name="output_type" value="v" />
             <output name="output_file">
                 <assert_contents>
@@ -146,6 +153,46 @@
                 </assert_contents>
             </output>
         </test>
+        <!-- Test region overlap-->
+        <test>
+            <param name="input_files" ftype="vcf" value="concat.1.b.vcf,concat.1.a.vcf" />
+            <param name="output_type" value="v" />
+            <section name="sec_restrict">
+                <param name="regions_overlap" value="1"/>
+            </section>
+            <output name="output_file">
+                <assert_contents>
+                    <has_text_matching expression="1\t100"/>
+                    <has_text_matching expression="3\t192"/>
+                </assert_contents>
+            </output>
+            <assert_command>
+                <has_text text="--regions-overlap" />
+            </assert_command>
+        </test>
+        <!-- Test ligate options -->
+        <test>
+            <param name="input_files" ftype="vcf" value="concat.1.b.vcf,concat.1.a.vcf" />
+            <param name="output_type" value="v" />
+            <section name="sec_default">
+                <conditional name="mode">
+                    <conditional name="overlaps">
+                        <param name="allow_overlaps" value="no"/>
+                    </conditional>
+                    <param name="ligate" value="true"/>
+                    <param name="ligate_mode" value="--ligate-warn"/>
+                </conditional>
+            </section>
+            <output name="output_file">
+                <assert_contents>
+                    <has_text_matching expression="1\t100"/>
+                    <has_text_matching expression="3\t192"/>
+                </assert_contents>
+            </output>
+            <assert_command>
+                <has_text text="--ligate-warn" />
+            </assert_command>
+        </test>
     </tests>
     <help><![CDATA[
 =====================================