diff bcftools_merge.xml @ 23:d3286f971e89 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/main/tools/bcftools commit f6efda26965eb73c9107d367fd5ffdf246ed0dbc
author iuc
date Tue, 02 Dec 2025 08:05:39 +0000
parents 2215287d5cc9
children
line wrap: on
line diff
--- a/bcftools_merge.xml	Sun Aug 18 10:12:56 2024 +0000
+++ b/bcftools_merge.xml	Tue Dec 02 08:05:39 2025 +0000
@@ -1,15 +1,13 @@
-<?xml version='1.0' encoding='utf-8'?>
 <tool name="bcftools @EXECUTABLE@" id="bcftools_@EXECUTABLE@" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
     <description>Merge multiple VCF/BCF files from non-overlapping sample sets to create one multi-sample file</description>
     <macros>
         <token name="@EXECUTABLE@">merge</token>
         <import>macros.xml</import>
     </macros>
-    <expand macro="bio_tools" />
-    <expand macro="requirements" />
-    <expand macro="version_command" />
+    <expand macro="bio_tools"/>
+    <expand macro="requirements"/>
+    <expand macro="version_command"/>
     <command detect_errors="aggressive"><![CDATA[
-@PREPARE_ENV@
 @PREPARE_INPUT_FILES@
 #set $section = $sec_restrict
 @PREPARE_REGIONS_FILE@
@@ -49,53 +47,55 @@
 ]]>
     </command>
     <inputs>
-        <expand macro="macro_inputs" />
+        <expand macro="macro_inputs"/>
         <section name="sec_restrict" expanded="false" title="Restrict to">
-            <expand macro="macro_apply_filters" />
-            <expand macro="macro_restrict" />
+            <expand macro="macro_apply_filters"/>
+            <expand macro="macro_region_restrict"/>
         </section>
         <section name="sec_merge" expanded="true" title="Merge Options">
-            <param name="force_samples" type="boolean" truevalue="--force-samples" falsevalue="" label="Force Samples" help="Resolve duplicate sample names" />
-            <param name="info_rules" type="text" label="Info Rules" help="Rules for merging INFO fields (method is one of sum,avg,min,max,join) or &quot;-&quot; to turn off the default [DP:sum,DP4:sum]" />
-            <param name="merge" type="select" label="Merge" optional="True" 
-                  help="Allow multiallelic records for: snps|indels|both|all|none|id, see man page for details [both]" >
-                  <option value="none">none - no new multiallelics, output multiple records instead</option>
-                  <option value="snps">snps - allow multiallelic SNP records</option>
-                  <option value="indels">indels - allow multiallelic indel records</option>
-                  <option value="both">both - both SNP and indel records can be multiallelic</option>
-                  <option value="all">all - SNP records can be merged with indel records</option>
-                  <option value="id">id - merge by ID</option>
+            <param name="force_samples" type="boolean" truevalue="--force-samples" falsevalue="" label="Force Samples" help="Resolve duplicate sample names"/>
+            <param name="info_rules" type="text" label="Info Rules" help="Rules for merging INFO fields (method is one of sum,avg,min,max,join) or &quot;-&quot; to turn off the default [DP:sum,DP4:sum]"/>
+            <param name="merge" type="select" label="Merge" optional="True" help="Allow multiallelic records for: snps|indels|both|all|none|id, see man page for details [both]">
+                <option value="none">none - no new multiallelics, output multiple records instead</option>
+                <option value="snps">snps - allow multiallelic SNP records</option>
+                <option value="indels">indels - allow multiallelic indel records</option>
+                <option value="both">both - both SNP and indel records can be multiallelic</option>
+                <option value="all">all - SNP records can be merged with indel records</option>
+                <option value="id">id - merge by ID</option>
             </param>
-            <param argument="--no-index" type="boolean" truevalue="--no-index" falsevalue="" checked="false"
-                label="Allow merge unindexed files" help="Requires the input files to have chromosomes in th same order and consistent with the order of sequences in the header" />
+            <param argument="--no-index" type="boolean" truevalue="--no-index" falsevalue="" checked="false" label="Allow merge unindexed files" help="Requires the input files to have chromosomes in th same order and consistent with the order of sequences in the header"/>
         </section>
         <section name="sec_header" expanded="false" title="Header Options">
-          <param name="use_header" type="data" format="vcf" label="Use Header" optional="True" help="Use the provided header" />
-          <param name="print_header" type="boolean" truevalue="--print-header" falsevalue="" label="Print Header" help="Print only the merged header and exit" />
+            <param name="use_header" type="data" format="vcf" label="Use Header" optional="True" help="Use the provided header"/>
+            <param name="print_header" type="boolean" truevalue="--print-header" falsevalue="" label="Print Header" help="Print only the merged header and exit"/>
         </section>
-        <expand macro="macro_select_output_type" />
+        <expand macro="macro_select_output_type"/>
     </inputs>
     <outputs>
         <expand macro="macro_vcf_output"/>
     </outputs>
     <tests>
         <test>
-            <param name="input_files" ftype="vcf" value="merge.a.vcf,merge.b.vcf,merge.c.vcf" />
-            <param name="force_samples" value="true" />
-            <param name="output_type" value="v" />
+            <param name="input_files" ftype="vcf" value="merge.a.vcf,merge.b.vcf,merge.c.vcf"/>
+            <section name="sec_merge">
+                <param name="force_samples" value="true"/>
+            </section>
+            <param name="output_type" value="v"/>
             <output name="output_file">
                 <assert_contents>
-                    <has_text text="3000150" />
-                    <has_text text="3188209" />
+                    <has_text text="3000150"/>
+                    <has_text text="3188209"/>
                     <has_text_matching expression="\tq10;q20\t[\s]*INDEL"/>
                 </assert_contents>
             </output>
         </test>
         <test>
-            <param name="input_files" ftype="vcf" value="merge.2.a.vcf,merge.2.b.vcf" />
-            <param name="force_samples" value="true" />
-            <param name="merge" value="none" />
-            <param name="output_type" value="v" />
+            <param name="input_files" ftype="vcf" value="merge.2.a.vcf,merge.2.b.vcf"/>
+            <section name="sec_merge">
+                <param name="force_samples" value="true"/>
+                <param name="merge" value="none"/>
+            </section>
+            <param name="output_type" value="v"/>
             <output name="output_file">
                 <assert_contents>
                     <has_text_matching expression="1\t3000000\t.\tC\tCCG\t"/>
@@ -104,10 +104,12 @@
             </output>
         </test>
         <test>
-            <param name="input_files" ftype="vcf" value="merge.2.a.vcf,merge.2.b.vcf" />
-            <param name="force_samples" value="true" />
-            <param name="merge" value="both" />
-            <param name="output_type" value="v" />
+            <param name="input_files" ftype="vcf" value="merge.2.a.vcf,merge.2.b.vcf"/>
+            <section name="sec_merge">
+                <param name="force_samples" value="true"/>
+                <param name="merge" value="both"/>
+            </section>
+            <param name="output_type" value="v"/>
             <output name="output_file">
                 <assert_contents>
                     <has_text_matching expression="1\t3000150\t\.\tC\t(A,G|G,A)\t"/>
@@ -116,10 +118,12 @@
             </output>
         </test>
         <test>
-            <param name="input_files" ftype="vcf" value="merge.2.a.vcf,merge.2.b.vcf" />
-            <param name="force_samples" value="true" />
-            <param name="merge" value="all" />
-            <param name="output_type" value="v" />
+            <param name="input_files" ftype="vcf" value="merge.2.a.vcf,merge.2.b.vcf"/>
+            <section name="sec_merge">
+                <param name="force_samples" value="true"/>
+                <param name="merge" value="all"/>
+            </section>
+            <param name="output_type" value="v"/>
             <output name="output_file">
                 <assert_contents>
                     <has_text_matching expression="1\t3000000\t\.\tC\t(CCG,G|G,CCG)\t"/>
@@ -127,10 +131,12 @@
             </output>
         </test>
         <test>
-            <param name="input_files" ftype="vcf" value="merge.3.a.vcf,merge.3.b.vcf" />
-            <param name="force_samples" value="true" />
-            <param name="info_rules" value="TR:sum,TA:sum,TG:sum" />
-            <param name="output_type" value="v" />
+            <param name="input_files" ftype="vcf" value="merge.3.a.vcf,merge.3.b.vcf"/>
+            <section name="sec_merge">
+                <param name="force_samples" value="true"/>
+                <param name="info_rules" value="TR:sum,TA:sum,TG:sum"/>
+            </section>
+            <param name="output_type" value="v"/>
             <output name="output_file">
                 <assert_contents>
                     <has_text_matching expression="1\t3000000\t.\tC\t(CG,CCG|CCG,CG)\t"/>
@@ -140,28 +146,37 @@
         </test>
         <!-- Test no_index option -->
         <test>
-            <param name="input_files" ftype="vcf" value="merge.4.a.vcf,merge.4.b.vcf" />
-            <param name="force_samples" value="true" />
-            <param name="merge" value="id" />
-            <param name="no_index" value="true"/>
-            <param name="output_type" value="v" />
+            <param name="input_files" ftype="vcf" value="merge.4.a.vcf,merge.4.b.vcf"/>
+            <section name="sec_merge">
+                <param name="force_samples" value="true"/>
+                <param name="merge" value="id"/>
+                <param name="no_index" value="true"/>
+            </section>
+            <param name="output_type" value="v"/>
             <output name="output_file">
                 <assert_contents>
                     <has_text_matching expression="1\t3000000\tid1\tC\t(A,CCG|CCG,A)\t"/>
                 </assert_contents>
             </output>
             <assert_command>
-                <has_text text="--no-index" />
+                <has_text text="--no-index"/>
             </assert_command>
         </test>
         <!-- Test region overlap option -->
         <test>
-            <param name="input_files" ftype="vcf" value="merge.4.a.vcf,merge.4.b.vcf" />
-            <param name="force_samples" value="true" />
-            <param name="merge" value="id" />
-            <param name="output_type" value="v" />
+            <param name="input_files" ftype="vcf" value="merge.4.a.vcf,merge.4.b.vcf"/>
+            <section name="sec_merge">
+                <param name="force_samples" value="true"/>
+                <param name="merge" value="id"/>
+            </section>
+            <param name="output_type" value="v"/>
             <section name="sec_restrict">
-                <param name="regions_overlap" value="1"/>
+                <conditional name="regions">
+                    <param name="regions_src" value="regions" />
+                    <repeat name="region_specs">
+                        <param name="chrom" value="1" />
+                    </repeat>
+                </conditional>
             </section>
             <output name="output_file">
                 <assert_contents>
@@ -169,7 +184,7 @@
                 </assert_contents>
             </output>
             <assert_command>
-                <has_text text="--regions-overlap" />
+                <has_text text="--regions-overlap"/>
             </assert_command>
         </test>
     </tests>
@@ -188,8 +203,8 @@
 
 @BCFTOOLS_MANPAGE@#@EXECUTABLE@
 
-@BCFTOOLS_WIKI@
+@BCFTOOLS_HOWTOS@
 ]]>
     </help>
-    <expand macro="citations" />
+    <expand macro="citations"/>
 </tool>