diff bcftools_call.xml @ 27:1c91646b70a1 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 07:40:24 +0000
parents 1bdbb4c62840
children
line wrap: on
line diff
--- a/bcftools_call.xml	Sun Aug 18 09:56:40 2024 +0000
+++ b/bcftools_call.xml	Tue Dec 02 07:40:24 2025 +0000
@@ -1,15 +1,12 @@
-<tool name="bcftools @EXECUTABLE@" id="bcftools_@EXECUTABLE@" version="@TOOL_VERSION@+galaxy5" profile="@PROFILE@">
+<tool name="bcftools @EXECUTABLE@" id="bcftools_@EXECUTABLE@" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
     <description>SNP/indel variant calling from VCF/BCF</description>
     <macros>
         <token name="@EXECUTABLE@">call</token>
         <import>macros.xml</import>
         <xml name="macro_novel_rate">
-            <param name="novel_rate_snp" type="float" value="" optional="true" label="Novel rate for SNPs"
-                   help="Likelihood of novel mutation for constrained trio calling, see man page for details" />
-            <param name="novel_rate_del" type="float" value="" optional="true" label="Novel rate for deletions"
-                   help="Likelihood of novel mutation for constrained trio calling, see man page for details" />
-            <param name="novel_rate_ins" type="float" value="" optional="true" label="Novel rate for insertions"
-                   help="Likelihood of novel mutation for constrained trio calling, see man page for details" />
+            <param name="novel_rate_snp" type="float" value="" optional="true" label="Novel rate for SNPs" help="Likelihood of novel mutation for constrained trio calling, see man page for details"/>
+            <param name="novel_rate_del" type="float" value="" optional="true" label="Novel rate for deletions" help="Likelihood of novel mutation for constrained trio calling, see man page for details"/>
+            <param name="novel_rate_ins" type="float" value="" optional="true" label="Novel rate for insertions" help="Likelihood of novel mutation for constrained trio calling, see man page for details"/>
         </xml>
         <token name="@NOVEL_RATE@">
             #set $novel_rate = []
@@ -27,20 +24,18 @@
             #end if
         </token>
     </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_FILE@
 #set $section = $sec_consensus_variant_calling.variant_calling
 #set $targets_path = None
 #if $section.method == 'multiallelic':
-    #if $section.genotypes.constrain == 'alleles':
-        #set $section = $sec_consensus_variant_calling.variant_calling.genotypes
-        @PREPARE_TARGETS_FILE@
-    #end if
+  #set $section = $sec_consensus_variant_calling.variant_calling.genotypes
 #end if
+@PREPARE_TARGETS_FILE@
+
 #set $section = $sec_restrict
 @PREPARE_REGIONS_FILE@
 
@@ -75,6 +70,7 @@
     #if str($section.pval_threshold):
         --pval-threshold $section.pval_threshold
     #end if
+    @TARGETS@
 #end if
 
 #set $section = $sec_restrict
@@ -115,10 +111,10 @@
 > '$output_file'
     ]]></command>
     <inputs>
-        <expand macro="macro_input" />
+        <expand macro="macro_input"/>
         <section name="sec_restrict" expanded="false" title="Restrict to">
-            <expand macro="macro_restrict" />
-            <expand macro="macro_samples" />
+            <expand macro="macro_region_restrict"/>
+            <expand macro="macro_samples"/>
         </section>
         <section name="sec_consensus_variant_calling" expanded="true" title="Consensus/variant calling Options">
             <conditional name="variant_calling">
@@ -134,20 +130,16 @@
                             <option value="trio">trio - call genotypes given the father-mother-child constraint</option>
                         </param>
                         <when value="none">
-                            <expand macro="macro_restrict" type="target" label_type="Target">
-                                <expand macro="macro_invert_targets"/>
-                            </expand>
+                            <expand macro="macro_target_restrict_simple" />
                         </when>
                         <when value="alleles">
-                            <expand macro="macro_restrictions_file" type="target" label_type="Target" />
+                            <expand macro="macro_restrictions_file" type="target" label_type="Target"/>
                             <expand macro="macro_invert_targets"/>
-                            <param argument="--insert-missed" type="boolean" truevalue="--insert-missed" falsevalue="" label="Insert missed" help="Output also sites missed by mpileup but present in -T" />
+                            <param argument="--insert-missed" type="boolean" truevalue="--insert-missed" falsevalue="" label="Insert missed" help="Output also sites missed by mpileup but present in -T"/>
                         </when>
                         <when value="trio">
-                            <expand macro="macro_restrict" type="target" label_type="Target">
-                                <expand macro="macro_invert_targets"/>
-                            </expand>
-                            <expand macro="macro_novel_rate" />
+                            <expand macro="macro_target_restrict_simple"/>
+                            <expand macro="macro_novel_rate"/>
                         </when>
                     </conditional>
                     <param argument="--prior-freqs" type="text" value="" optional="true" label="Use prior knowledge of population allele frequencies">
@@ -161,8 +153,8 @@
                         </help>
                         <validator type="regex" message="The INFO tags (separated by a comma), e.g. AN,AC">^(\w+,\w+)?$</validator>
                     </param>
-                    <param argument="--prior" type="float" value="1.1e-3" optional="true" label="Prior" help="Expected substitution rate" />
-                    <param argument="--gvcf" type="integer" optional="true" label="Output also gVCF blocks of homozygous REF calls" help="The parameter value is the minimum per-sample depth required to include a site in the non-variant block" />
+                    <param argument="--prior" type="float" value="1.1e-3" optional="true" label="Prior" help="Expected substitution rate"/>
+                    <param argument="--gvcf" type="integer" optional="true" label="Output also gVCF blocks of homozygous REF calls" help="The parameter value is the minimum per-sample depth required to include a site in the non-variant block"/>
                 </when>
                 <when value="consensus">
                     <conditional name="genotypes">
@@ -170,15 +162,13 @@
                             <option value="none">Do not constrain</option>
                             <option value="trio">trio - call genotypes given the father-mother-child constraint</option>
                         </param>
-                        <when value="none" />
+                        <when value="none"/>
                         <when value="trio">
-                            <expand macro="macro_novel_rate" />
+                            <expand macro="macro_novel_rate"/>
                         </when>
                     </conditional>
-                    <expand macro="macro_restrict" type="target" label_type="Target">
-                        <expand macro="macro_invert_targets" type="target" label_type="Target" />
-                    </expand>
-                    <param argument="--pval-threshold" type="float" value="0.5" optional="true" label="Pval Threshold" help="Accept variant if P(ref|D)&lt;FLOAT" />
+                    <expand macro="macro_target_restrict_simple" />
+                    <param argument="--pval-threshold" type="float" value="0.5" optional="true" label="Pval Threshold" help="Accept variant if P(ref|D)&lt;FLOAT"/>
                 </when>
             </conditional>
         </section>
@@ -190,139 +180,187 @@
                 <option value="Y">Y - Treat male samples as haploid and female as no-copy, regardless of the chromosome name"</option>
                 <option value="1">1 - Treat all samples as haploid</option>
             </param>
-            <param argument="--ploidy-file" type="data" format="tabular" optional="true" label="Ploidy file" help="Space/tab-delimited list of CHROM,FROM,TO,SEX,PLOIDY" />
-            <expand macro="macro_restrict" />
-            <expand macro="macro_samples" />
+            <param argument="--ploidy-file" type="data" format="tabular" optional="true" label="Ploidy file" help="Space/tab-delimited list of CHROM,FROM,TO,SEX,PLOIDY"/>
+            <expand macro="macro_region_restrict"/>
+            <expand macro="macro_samples"/>
         </section>
         <section name="sec_input_output" expanded="false" title="Input/output Options">
-            <param argument="--group-samples" type="boolean" truevalue="--group-samples -" falsevalue="" label="Single Sample Calling" help="Group samples by population for single-sample calling (-G - is the only option implemented so far)" />
-            <param argument="--keep-alts" type="boolean" truevalue="--keep-alts" falsevalue="" label="Keep alts" help="Output all alternate alleles present in the alignments even if they do not appear in any of the genotypes" />
-            <param argument="--format-fields" type="text" value="" optional="true" label="Comma-separated list of FORMAT fields to output for each sample"
-                   help="Currently GQ and GP fields are supported" >
+            <param argument="--group-samples" type="boolean" truevalue="--group-samples -" falsevalue="" label="Single Sample Calling" help="Group samples by population for single-sample calling (-G - is the only option implemented so far)"/>
+            <param argument="--keep-alts" type="boolean" truevalue="--keep-alts" falsevalue="" label="Keep alts" help="Output all alternate alleles present in the alignments even if they do not appear in any of the genotypes"/>
+            <param argument="--format-fields" type="text" value="" optional="true" label="Comma-separated list of FORMAT fields to output for each sample" help="Currently GQ and GP fields are supported">
                 <validator type="regex" message="FORMAT terms separated by commas">^([A-Za-z]+(,[A-Za-z]+)*)?$</validator>
             </param>
-            <param argument="--keep-masked-ref" type="boolean" truevalue="--keep-masked-ref" falsevalue="" label="Keep masked reference alleles" help="Output sites where REF allele is N" />
+            <param argument="--keep-masked-ref" type="boolean" truevalue="--keep-masked-ref" falsevalue="" label="Keep masked reference alleles" help="Output sites where REF allele is N"/>
             <param argument="--skip-variants" type="select" optional="true" label="Skip variants" help="Skip indels/SNP sites">
                 <option value="indels">indels</option>
                 <option value="snps">snps</option>
             </param>
-            <param argument="--variants-only" type="boolean" truevalue="--variants-only" falsevalue="" label="Output variant sites only" />
+            <param argument="--variants-only" type="boolean" truevalue="--variants-only" falsevalue="" label="Output variant sites only"/>
             <expand macro="macro_output_tags">
                 <option value="INFO/PV4">INFO/PV4: P-values for strand bias, baseQ bias, mapQ bias and tail</option>
                 <option value="FORMAT/GQ">FORMAT/GQ: Phred-scaled genotype quality</option>
                 <option value="FORMAT/GP">FORMAT/GP: Phred-scaled genotype posterior probabilities</option>
             </expand>
         </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_file" ftype="vcf" value="mpileup.vcf" />
-            <param name="method" value="multiallelic" />
-            <param name="variants_only" value="true" />
-            <param name="output_type" value="v" />
+            <param name="input_file" ftype="vcf" value="mpileup.vcf"/>
+            <section name="sec_consensus_variant_calling">
+                <conditional name="variant_calling">
+                    <param name="method" value="multiallelic"/>
+                </conditional>
+            </section>
+            <section name="sec_input_output">
+                <param name="variants_only" value="true"/>
+            </section>
+            <param name="output_type" value="v"/>
             <output name="output_file">
                 <assert_contents>
-                    <has_text text="DP4=2,4,8,11;MQ=49" />
+                    <has_text text="DP4=2,4,8,11;MQ=49"/>
+                </assert_contents>
+            </output>
+        </test>
+        <test>
+            <param name="input_file" ftype="vcf" value="mpileup.vcf"/>
+            <section name="sec_consensus_variant_calling">
+                <conditional name="variant_calling">
+                    <param name="method" value="multiallelic"/>
+                    <param name="gvcf" value="0"/>
+                </conditional>
+            </section>
+            <param name="output_type" value="v"/>
+            <output name="output_file">
+                <assert_contents>
+                    <has_text text="MIN_DP"/>
+                    <has_text text="DP4=2,4,8,11;MQ=49"/>
                 </assert_contents>
             </output>
         </test>
         <test>
-            <param name="input_file" ftype="vcf" value="mpileup.vcf" />
-            <param name="method" value="multiallelic" />
-            <param name="gvcf" value="0" />
-            <param name="output_type" value="v" />
+            <param name="input_file" ftype="vcf" value="mpileup.X.vcf"/>
+            <section name="sec_consensus_variant_calling">
+                <conditional name="variant_calling">
+                    <param name="method" value="multiallelic"/>
+                </conditional>
+            </section>
+            <section name="sec_file_format">
+                <param name="ploidy_file" value="mpileup.ploidy"/>
+            </section>
+            <section name="sec_restrict">
+                <param name="samples_file" value="mpileup.samples"/>
+            </section>
+            <param name="output_type" value="v"/>
             <output name="output_file">
                 <assert_contents>
-                    <has_text text="MinDP" />
-                    <has_text text="DP4=2,4,8,11;MQ=49" />
+                    <has_text text="DP4=2,4,8,11;MQ=49"/>
                 </assert_contents>
             </output>
         </test>
         <test>
-            <param name="input_file" ftype="vcf" value="mpileup.X.vcf" />
-            <param name="method" value="multiallelic" />
-            <param name="ploidy_file" value="mpileup.ploidy" />
-            <param name="samples_file" value="mpileup.samples" />
-            <param name="output_type" value="v" />
+            <param name="input_file" ftype="vcf" value="mpileup.X.vcf"/>
+            <section name="sec_consensus_variant_calling">
+                <conditional name="variant_calling">
+                    <param name="method" value="consensus"/>
+                </conditional>
+            </section>
+            <param name="output_type" value="v"/>
+            <section name="sec_file_format">
+                <param name="ploidy_file" value="mpileup.ploidy"/>
+            </section>
             <output name="output_file">
                 <assert_contents>
-                    <has_text text="DP4=2,4,8,11;MQ=49" />
-                </assert_contents>
-            </output>
-        </test>
-        <test>
-            <param name="input_file" ftype="vcf" value="mpileup.X.vcf" />
-            <param name="method" value="consensus" />
-            <param name="output_type" value="v" />
-            <param name="ploidy_file" value="mpileup.ploidy" />
-            <output name="output_file">
-                <assert_contents>
-                    <has_text text="DP4=2,4,8,11" />
-                    <has_text text="PV4=1,1,1,1" />
+                    <has_text text="DP4=2,4,8,11"/>
+                    <has_text text="PV4=1,1,1,1"/>
                 </assert_contents>
             </output>
         </test>
         <!-- Test annotate -->
         <test>
-            <param name="input_file" ftype="vcf" value="mpileup.X.vcf" />
-            <param name="method" value="consensus" />
-            <param name="output_type" value="v" />
-            <param name="ploidy_file" value="mpileup.ploidy" />
+            <param name="input_file" ftype="vcf" value="mpileup.X.vcf"/>
+            <section name="sec_consensus_variant_calling">
+                <conditional name="variant_calling">
+                    <param name="method" value="consensus"/>
+                </conditional>
+            </section>
+            <param name="output_type" value="v"/>
+            <section name="sec_file_format">
+                <param name="ploidy_file" value="mpileup.ploidy"/>
+            </section>
             <section name="sec_input_output">
                 <param name="output_tags" value="INFO/PV4"/>
             </section>
             <output name="output_file">
                 <assert_contents>
-                    <has_text text="DP4=2,4,8,11" />
-                    <has_text text="PV4=1,1,1,1" />
+                    <has_text text="DP4=2,4,8,11"/>
+                    <has_text text="PV4=1,1,1,1"/>
                 </assert_contents>
             </output>
             <assert_command>
-                <has_text text="--annotate" />
+                <has_text text="--annotate"/>
             </assert_command>
         </test>
         <!-- Test region overlap-->
         <test>
-            <param name="input_file" ftype="vcf" value="mpileup.vcf" />
-            <param name="method" value="multiallelic" />
-            <param name="variants_only" value="true" />
-            <param name="output_type" value="v" />
+            <param name="input_file" ftype="vcf" value="mpileup.vcf"/>
+            <section name="sec_consensus_variant_calling">
+                <conditional name="variant_calling">
+                    <param name="method" value="multiallelic"/>
+                </conditional>
+            </section>
+            <section name="sec_input_output">
+                <param name="variants_only" value="true"/>
+            </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="17" />
+                    </repeat>
+                </conditional>
             </section>
             <output name="output_file">
                 <assert_contents>
-                    <has_text text="DP4=2,4,8,11;MQ=49" />
+                    <has_text text="DP4=2,4,8,11;MQ=49"/>
                 </assert_contents>
             </output>
             <assert_command>
-                <has_text text="--regions-overlap" />
+                <has_text text="--regions-overlap"/>
             </assert_command>
         </test>
         <!-- Test group samples option-->
         <test>
-            <param name="input_file" ftype="vcf" value="mpileup.AD.vcf" />
-            <param name="method" value="multiallelic" />
-            <param name="output_type" value="v" />
+            <param name="input_file" ftype="vcf" value="mpileup.AD.vcf"/>
+            <section name="sec_consensus_variant_calling">
+                <conditional name="variant_calling">
+                    <param name="method" value="multiallelic"/>
+                </conditional>
+            </section>
+            <param name="output_type" value="v"/>
             <section name="sec_input_output">
-                <param name="group_samples" value="true" />
+                <param name="group_samples" value="true"/>
             </section>
             <output name="output_file">
                 <assert_contents>
-                    <has_text text="bcftools_callCommand=call -m --prior 0.0011 --group-samples - " />
-                    <has_text text="DP=1;ADF=1;ADR=0;DPR=1;MQ0F=0;AN=2;DP4=1,0,0,0;MQ=37" />
+                    <has_text text="bcftools_callCommand=call -m --prior 0.0011 --group-samples - "/>
+                    <has_text text="DP=1;ADF=1;ADR=0;DPR=1;MQ0F=0;AN=2;DP4=1,0,0,0;MQ=37"/>
                 </assert_contents>
             </output>
         </test>
         <test>
             <!-- Test targets-file option-->
-            <param name="input_file" ftype="vcf" value="mpileup.AD.vcf" />
-            <param name="method" value="multiallelic" />
-            <param name="output_type" value="v" />
+            <param name="input_file" ftype="vcf" value="mpileup.AD.vcf"/>
+            <section name="sec_consensus_variant_calling">
+                <conditional name="variant_calling">
+                    <param name="method" value="multiallelic"/>
+                </conditional>
+            </section>
+            <param name="output_type" value="v"/>
             <section name="sec_consensus_variant_calling">
                 <conditional name="variant_calling">
                     <conditional name="genotypes">
@@ -335,8 +373,8 @@
             </section>
             <output name="output_file">
                 <assert_contents>
-                    <has_text text="--targets-file" />
-                    <not_has_text text="DP=1;ADF=1;ADR=0;DPR=1;MQ0F=0;AN=2;DP4=1,0,0,0;MQ=37" />
+                    <has_text text="--targets-file"/>
+                    <not_has_text text="DP=1;ADF=1;ADR=0;DPR=1;MQ0F=0;AN=2;DP4=1,0,0,0;MQ=37"/>
                 </assert_contents>
             </output>
         </test>
@@ -360,8 +398,8 @@
 
 @BCFTOOLS_MANPAGE@#@EXECUTABLE@
 
-@BCFTOOLS_WIKI@
+@BCFTOOLS_HOWTOS@
 ]]>
     </help>
-    <expand macro="citations" />
+    <expand macro="citations"/>
 </tool>