diff bcftools_mpileup.xml @ 23:e1c8ab368943 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:00:58 +0000
parents 2f6e26a65721
children
line wrap: on
line diff
--- a/bcftools_mpileup.xml	Sun Aug 18 09:40:13 2024 +0000
+++ b/bcftools_mpileup.xml	Tue Dec 02 08:00:58 2025 +0000
@@ -1,4 +1,4 @@
-<tool name="bcftools @EXECUTABLE@" id="bcftools_@EXECUTABLE@" version="@TOOL_VERSION@+galaxy4" profile="@PROFILE@">
+<tool name="bcftools @EXECUTABLE@" id="bcftools_@EXECUTABLE@" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
     <description>Generate VCF or BCF containing genotype likelihoods for one or multiple alignment (BAM or CRAM) files</description>
     <macros>
         <token name="@EXECUTABLE@">mpileup</token>
@@ -17,11 +17,11 @@
             <option value="1024">The read is a PCR or optical duplicate</option>
         </xml>
     </macros>
-    <expand macro="bio_tools" />
+    <expand macro="bio_tools"/>
     <expand macro="requirements">
         <expand macro="samtools_requirement"/>
     </expand>
-    <expand macro="version_command" />
+    <expand macro="version_command"/>
     <command detect_errors="aggressive"><![CDATA[
 #import re
 #set bam_list = []
@@ -182,20 +182,18 @@
         </configfile>
     </configfiles>
     <inputs>
-
         <conditional name="input">
             <param name="input_number" type="select" label="Alignment Inputs">
-                 <option value="single">Single BAM/CRAM</option>
-                 <option value="multiple">Multiple BAM/CRAMs</option>
+                <option value="single">Single BAM/CRAM</option>
+                <option value="multiple">Multiple BAM/CRAMs</option>
             </param>
             <when value="single">
-                <param name="input_bam" type="data" format="bam,cram" label="Input BAM/CRAM" />
+                <param name="input_bam" type="data" format="bam,cram" label="Input BAM/CRAM"/>
             </when>
             <when value="multiple">
-                <param name="input_bams" type="data" format="bam,cram" multiple="true" label="Input BAM/CRAMs" />
+                <param name="input_bams" type="data" format="bam,cram" multiple="true" label="Input BAM/CRAMs"/>
             </when>
         </conditional>
-
         <conditional name="reference_source">
             <param name="reference_source_selector" type="select" label="Choose the source for the reference genome">
                 <option value="cached">Locally cached</option>
@@ -208,11 +206,10 @@
                 </param>
             </when>
             <when value="history">
-                <param name="ref_file" type="data" format="fasta" label="Genome Reference" />
+                <param name="ref_file" type="data" format="fasta" label="Genome Reference"/>
             </when>
             <when value="none"/>
         </conditional>
-
         <section name="sec_indel" expanded="false" title="Indel Calling">
             <conditional name="perform_indel_calling">
                 <param name="perform_indel_calling_selector" type="select" label="Perform INDEL calling">
@@ -220,7 +217,7 @@
                     <option value="perform_indel_calling">Perform INDEL calling and set advanced options</option>
                     <option value="do_not_perform_indel_calling">Do not perform INDEL calling</option>
                 </param>
-                <when value="perform_indel_calling_def" />
+                <when value="perform_indel_calling_def"/>
                 <when value="perform_indel_calling">
                     <param name="gap_open_sequencing_error_probability" type="integer" value="40" label="Phred-scaled gap open sequencing error probability" help="--open-prob; Reducing this value leads to more indel calls; default=40"/>
                     <param name="gap_extension_sequencing_error_probability" type="integer" value="20" label="Phred-scaled gap extension sequencing error probability" help="--ext-prob;  Reducing this value leads to longer indels. default=20"/>
@@ -234,17 +231,16 @@
                         <param name="platform_entry" type="text" value="" label="Platform to use for INDEL candidates" help="It is recommended to collect indel candidates from sequencing technologies that have low indel error rate such as ILLUMINA"/>
                     </repeat>
                 </when>
-                <when value="do_not_perform_indel_calling" />
+                <when value="do_not_perform_indel_calling"/>
             </conditional>
             <param argument="--ambig-reads" type="select" optional="true" label="Ambiguous indel reads" help="What to do with ambiguous indel reads that do not span an entire short tandem repeat region: discard ambiguous reads from calling and do not increment high-quality AD depth counters (drop), exclude from calling but increment AD counters proportionally (incAD), exclude from calling and increment the first value of the AD counter (incAD0) ">
                 <option value="drop">Drop</option>
                 <option value="incAD">IncAD</option>
                 <option value="incAD0">IncAD0</option>
             </param>
-            <param argument="--indel-bias" type="float" min="0" value="" optional="true" label="Indel bias" help="Skews the indel scores up or down, trading recall (low false-negative) vs precision (low false-positive) [1.0]. In Bcftools 1.12 and earlier this parameter didn’t exist, but had an implied value of 1.0. If you are planning to do heavy filtering of variants, selecting the best quality ones only (favouring precision over recall), it is advisable to set this lower (such as 0.75) while higher depth samples or where you favour recall rates over precision may work better with a higher value such as 2.0" />
-            <param argument="--indel-size" type="integer" min="0" value="" optional="true" label="Indel size" help="Indel window size to use when assessing the quality of candidate indels. Note that although the window size approximately corresponds to the maximum indel size considered, it is not an exact threshold. Default: 110" />
+            <param argument="--indel-bias" type="float" min="0" value="" optional="true" label="Indel bias" help="Skews the indel scores up or down, trading recall (low false-negative) vs precision (low false-positive) [1.0]. In Bcftools 1.12 and earlier this parameter didn’t exist, but had an implied value of 1.0. If you are planning to do heavy filtering of variants, selecting the best quality ones only (favouring precision over recall), it is advisable to set this lower (such as 0.75) while higher depth samples or where you favour recall rates over precision may work better with a higher value such as 2.0"/>
+            <param argument="--indel-size" type="integer" min="0" value="" optional="true" label="Indel size" help="Indel window size to use when assessing the quality of candidate indels. Note that although the window size approximately corresponds to the maximum indel size considered, it is not an exact threshold. Default: 110"/>
         </section>
-
         <section name="sec_filtering" expanded="false" title="Input Filtering Options">
             <param name="max_reads_per_bam" type="integer" value="250" min="1" label="Max reads per BAM" help="--max-depth; default=250"/>
             <param name="ignore_overlaps" type="boolean" truevalue="-x" falsevalue="" checked="False" label="Disable read-pair overlap detection" help="--ignore-overlaps"/>
@@ -256,19 +252,19 @@
                 </param>
                 <when value="filter">
                     <param argument="--skip-all-set" type="select" display="checkboxes" label="Skip reads with all of the FLAG bits set" multiple="True" help="--skip-all-set">
-                        <expand macro="bam_flag_options" />
+                        <expand macro="bam_flag_options"/>
                     </param>
                     <param argument="--skip-any-set" type="select" display="checkboxes" label="Skip reads with any of the FLAG bits set" multiple="True" help="--skip-any-set">
-                        <expand macro="bam_flag_options" />
+                        <expand macro="bam_flag_options"/>
                     </param>
                     <param argument="--skip-all-unset" type="select" display="checkboxes" label="Skip reads with all of the FLAG bits unset" multiple="True" help="--skip-all-unset">
-                        <expand macro="bam_flag_options" />
+                        <expand macro="bam_flag_options"/>
                     </param>
                     <param argument="--skip-any-unset" type="select" display="checkboxes" label="Skip reads with any of the FLAG bits unset" multiple="True" help="--skip-any-unset">
-                        <expand macro="bam_flag_options" />
+                        <expand macro="bam_flag_options"/>
                     </param>
                 </when>
-                <when value="nofilter" />
+                <when value="nofilter"/>
             </conditional>
             <conditional name="quality">
                 <param label="Quality Options" name="quality_settings" type="select">
@@ -291,7 +287,6 @@
                 </when>
                 <when value="none"/>
             </conditional>
-
             <conditional name="read_groups">
                 <param name="read_groups_selector" type="select" label="Select read groups to include or exclude" help="--read-groups">
                     <option value="no_limit" selected="True">use defaults</option>
@@ -301,7 +296,7 @@
                 </param>
                 <when value="history">
                     <param name="read_groups" format="txt" label="Text file" type="data">
-                        <validator type="dataset_ok_validator" />
+                        <validator type="dataset_ok_validator"/>
                     </param>
                     <param name="rg_action" type="select" label="Include or Exclude these Read Groups">
                         <option value="" selected="true">Include</option>
@@ -309,27 +304,23 @@
                     </param>
                 </when>
                 <when value="paste">
-                    <param name="group_paste" type="text" size="10x35" area="true" label="Read groups" help="Paste a list of read groups" />
+                    <param name="group_paste" type="text" size="10x35" area="true" label="Read groups" help="Paste a list of read groups"/>
                     <param name="rg_action" type="select" label="Include or Exclude these Read Groups">
                         <option value="" selected="true">Include</option>
                         <option value="^">Exclude</option>
                     </param>
                 </when>
-                <when value="ignore_rg" />
-                <when value="no_limit" />
+                <when value="ignore_rg"/>
+                <when value="no_limit"/>
             </conditional>
         </section>
-
         <section name="sec_restrict" expanded="false" title="Restrict to">
-            <expand macro="macro_restrict" />
-            <expand macro="macro_restrict" type="target" label_type="Target">
-                <expand macro="macro_invert_targets" />
-            </expand>
+            <expand macro="macro_region_restrict_simple"/>
+            <expand macro="macro_target_restrict_simple"/>
         </section>
         <section name="sec_subset" expanded="false" title="Subset Options">
-            <expand macro="macro_samples" />
+            <expand macro="macro_samples"/>
         </section>
-
         <section name="sec_output_options" expanded="false" title="Output options">
             <expand macro="macro_output_tags">
                 <option value="DP">DP (Number of high-quality bases)</option>
@@ -353,172 +344,209 @@
                 <validator type="regex" message="integers separated by commas">^(\d+(,\d+)*)?$</validator>
             </param>
         </section>
-
-        <expand macro="macro_select_output_type" />
-
+        <expand macro="macro_select_output_type"/>
     </inputs>
     <outputs>
-        <expand macro="macro_vcf_output" />
+        <expand macro="macro_vcf_output"/>
     </outputs>
     <tests>
         <test>
-            <param name="input_number" value="single" />
-            <param name="input_bam" ftype="bam" value="mpileup.1.bam" />
-            <param name="reference_source_selector" value="history" />
-            <param name="ref_file" ftype="fasta" value="mpileup.ref.fa" />
-            <param name="output_type" value="v" />
+            <conditional name="input">
+                <param name="input_number" value="single"/>
+                <param name="input_bam" ftype="bam" value="mpileup.1.bam"/>
+            </conditional>
+            <conditional name="reference_source">
+                <param name="reference_source_selector" value="history"/>
+                <param name="ref_file" ftype="fasta" value="mpileup.ref.fa"/>
+            </conditional>
+            <param name="output_type" value="v"/>
             <output name="output_file">
                 <assert_contents>
-                    <has_text text="mpileup" />
-                    <has_text text="HG00100" />
-                    <has_text_matching expression="17\t1\t.\tA\t...\t0\t.\tDP=5;" />
-                    <has_text_matching expression="17\t100\t.\tC\t...\t0\t.\tDP=9;" />
+                    <has_text text="mpileup"/>
+                    <has_text text="HG00100"/>
+                    <has_text_matching expression="17\t1\t.\tA\t...\t0\t.\tDP=5;"/>
+                    <has_text_matching expression="17\t100\t.\tC\t...\t0\t.\tDP=9;"/>
                 </assert_contents>
             </output>
         </test>
         <test>
-            <param name="input_number" value="single" />
-            <param name="input_bam" ftype="bam" value="mpileup.1.bam" />
-            <param name="reference_source_selector" value="cached" />
-            <param name="ref_file" value="mpileup" />
-            <param name="quality_settings" value="adjust" />
-            <param name="output_type" value="v" />
+            <conditional name="input">
+                <param name="input_number" value="single"/>
+                <param name="input_bam" ftype="bam" value="mpileup.1.bam"/>
+            </conditional>
+            <conditional name="reference_source">
+                <param name="reference_source_selector" value="cached"/>
+                <param name="ref_file" value="mpileup"/>
+            </conditional>
+            <section name="sec_filtering">
+                <conditional name="quality">
+                    <param name="quality_settings" value="adjust"/>
+                </conditional>
+            </section>
+            <param name="output_type" value="v"/>
             <output name="output_file">
                 <assert_contents>
-                    <has_text text="mpileup" />
-                    <has_text text="HG00100" />
-                    <has_text_matching expression="17\t1\t.\tA\t...\t0\t.\tDP=5;" />
-                    <has_text_matching expression="17\t100\t.\tC\t...\t0\t.\tDP=9;" />
+                    <has_text text="mpileup"/>
+                    <has_text text="HG00100"/>
+                    <has_text_matching expression="17\t1\t.\tA\t...\t0\t.\tDP=5;"/>
+                    <has_text_matching expression="17\t100\t.\tC\t...\t0\t.\tDP=9;"/>
                 </assert_contents>
             </output>
         </test>
         <test>
-            <param name="input_number" value="single" />
-            <param name="input_bam" ftype="cram" value="mpileup.3.cram" />
-            <param name="reference_source_selector" value="history" />
-            <param name="ref_file" ftype="fasta" value="mpileup.ref.fa" />
-            <param name="output_type" value="v" />
+            <conditional name="input">
+                <param name="input_number" value="single"/>
+                <param name="input_bam" ftype="cram" value="mpileup.3.cram"/>
+            </conditional>
+            <conditional name="reference_source">
+                <param name="reference_source_selector" value="history"/>
+                <param name="ref_file" ftype="fasta" value="mpileup.ref.fa"/>
+            </conditional>
+            <param name="output_type" value="v"/>
             <output name="output_file">
                 <assert_contents>
-                    <has_text text="mpileup" />
-                    <has_text text="HG00102" />
-                    <has_text_matching expression="17\t100\t.\tC\t...\t0\t.\tDP=5;" />
+                    <has_text text="mpileup"/>
+                    <has_text text="HG00102"/>
+                    <has_text_matching expression="17\t100\t.\tC\t...\t0\t.\tDP=5;"/>
                 </assert_contents>
             </output>
         </test>
         <test>
-            <param name="input_number" value="multiple" />
-            <param name="input_bams" ftype="bam" value="mpileup.1.bam,mpileup.2.bam,mpileup.3.bam" />
-            <param name="reference_source_selector" value="history" />
-            <param name="ref_file" ftype="fasta" value="mpileup.ref.fa" />
+            <conditional name="input">
+                <param name="input_number" value="multiple"/>
+                <param name="input_bams" ftype="bam" value="mpileup.1.bam,mpileup.2.bam,mpileup.3.bam"/>
+            </conditional>
+            <conditional name="reference_source">
+                <param name="reference_source_selector" value="history"/>
+                <param name="ref_file" ftype="fasta" value="mpileup.ref.fa"/>
+            </conditional>
             <section name="sec_restrict">
                 <conditional name="regions">
-                    <param name="regions_src" value="regions" />
-                    <repeat name="regions">
-                        <param name="chrom" value="17" />
-                        <param name="start" value="100" />
-                        <param name="stop" value="110" />
+                    <param name="regions_src" value="regions"/>
+                    <repeat name="region_specs">
+                        <param name="chrom" value="17"/>
+                        <param name="start" value="100"/>
+                        <param name="stop" value="110"/>
                     </repeat>
                 </conditional>
             </section>
-            <param name="output_tags" value="DP,INFO/AD,DV" />
-            <param name="output_type" value="v" />
+            <section name="sec_output_options">
+                <param name="output_tags" value="DP,INFO/AD,DV"/>
+            </section>
+            <param name="output_type" value="v"/>
             <output name="output_file">
                 <assert_contents>
-                    <has_text text="mpileup" />
-                    <has_text text="HG00100" />
-                    <has_text text="HG00101" />
-                    <has_text text="HG00102" />
-                    <has_text text="ID=DP," />
-                    <not_has_text text="17\t111" />
-                    <has_text_matching expression="17\t100\t.\tC\t...\t0\t.\tDP=18;AD=17,0;" />
+                    <has_text text="mpileup"/>
+                    <has_text text="HG00100"/>
+                    <has_text text="HG00101"/>
+                    <has_text text="HG00102"/>
+                    <has_text text="ID=DP,"/>
+                    <not_has_text text="17\t111"/>
+                    <has_text_matching expression="17\t100\t.\tC\t...\t0\t.\tDP=18;AD=17,0;"/>
                 </assert_contents>
             </output>
         </test>
         <test>
-            <param name="input_number" value="multiple" />
-            <param name="input_bams" ftype="bam" value="mpileup.1.bam,mpileup.2.bam,mpileup.3.bam" />
-            <param name="reference_source_selector" value="history" />
-            <param name="ref_file" ftype="fasta" value="mpileup.ref.fa" />
+            <conditional name="input">
+                <param name="input_number" value="multiple"/>
+                <param name="input_bams" ftype="bam" value="mpileup.1.bam,mpileup.2.bam,mpileup.3.bam"/>
+            </conditional>
+            <conditional name="reference_source">
+                <param name="reference_source_selector" value="history"/>
+                <param name="ref_file" ftype="fasta" value="mpileup.ref.fa"/>
+            </conditional>
             <section name="sec_restrict">
                 <conditional name="targets">
-                    <param name="targets_src" value="targets" />
-                    <repeat name="targets">
-                        <param name="chrom" value="17" />
-                        <param name="start" value="100" />
-                        <param name="stop" value="104" />
+                    <param name="targets_src" value="targets"/>
+                    <repeat name="target_specs">
+                        <param name="chrom" value="17"/>
+                        <param name="start" value="100"/>
+                        <param name="stop" value="104"/>
                     </repeat>
                 </conditional>
             </section>
-            <param name="output_tags" value="DP,INFO/AD,DV" />
-            <param name="output_type" value="v" />
+            <section name="sec_output_options">
+                <param name="output_tags" value="DP,INFO/AD,DV"/>
+            </section>
+            <param name="output_type" value="v"/>
             <output name="output_file">
                 <assert_contents>
-                    <has_text text="mpileup" />
-                    <has_text text="HG00100" />
-                    <has_text text="HG00101" />
-                    <has_text text="HG00102" />
-                    <has_text text="ID=DP," />
-                    <not_has_text text="17\t105" />
-                    <has_text_matching expression="17\t100\t.\tC\t...\t0\t.\tDP=18;AD=17,0;" />
+                    <has_text text="mpileup"/>
+                    <has_text text="HG00100"/>
+                    <has_text text="HG00101"/>
+                    <has_text text="HG00102"/>
+                    <has_text text="ID=DP,"/>
+                    <not_has_text text="17\t105"/>
+                    <has_text_matching expression="17\t100\t.\tC\t...\t0\t.\tDP=18;AD=17,0;"/>
                 </assert_contents>
             </output>
         </test>
         <test>
-            <param name="input_number" value="multiple" />
-            <param name="input_bams" ftype="bam" value="mpileup.1.bam,mpileup.2.bam,mpileup.3.bam" />
-            <param name="reference_source_selector" value="history" />
-            <param name="ref_file" ftype="fasta" value="mpileup.ref.fa" />
+            <conditional name="input">
+                <param name="input_number" value="multiple"/>
+                <param name="input_bams" ftype="bam" value="mpileup.1.bam,mpileup.2.bam,mpileup.3.bam"/>
+            </conditional>
+            <conditional name="reference_source">
+                <param name="reference_source_selector" value="history"/>
+                <param name="ref_file" ftype="fasta" value="mpileup.ref.fa"/>
+            </conditional>
             <section name="sec_restrict">
                 <conditional name="regions">
-                    <param name="regions_src" value="regions" />
-                    <repeat name="regions">
-                        <param name="chrom" value="17" />
-                        <param name="start" value="1050" />
-                        <param name="stop" value="1060" />
+                    <param name="regions_src" value="regions"/>
+                    <repeat name="region_specs">
+                        <param name="chrom" value="17"/>
+                        <param name="start" value="1050"/>
+                        <param name="stop" value="1060"/>
                     </repeat>
                 </conditional>
             </section>
-            <param name="filter_flags" value="filter" />
-            <param name="skip_all_set" value="4,16" /> 
-            <param name="output_type" value="v" />
+            <section name="sec_filtering">
+                <conditional name="filter_by_flags">
+                    <param name="filter_flags" value="filter"/>
+                    <param name="skip_all_set" value="4,16"/>
+                </conditional>
+            </section>
+            <param name="output_type" value="v"/>
             <output name="output_file">
                 <assert_contents>
-                    <has_text text="mpileup" />
-                    <has_text text="HG00100" />
-                    <has_text_matching expression="17\t1050\t.\tA\t" />
+                    <has_text text="mpileup"/>
+                    <has_text text="HG00100"/>
+                    <has_text_matching expression="17\t1050\t.\tA\t"/>
                 </assert_contents>
             </output>
             <assert_command>
-                <has_text text="--skip-all-set" />
+                <has_text text="--skip-all-set"/>
             </assert_command>
         </test>
         <!-- Test indel options-->
         <test>
-            <param name="input_number" value="single" />
-            <param name="input_bam" ftype="bam" value="mpileup.1.bam" />
-            <param name="reference_source_selector" value="history" />
-            <param name="ref_file" ftype="fasta" value="mpileup.ref.fa" />
+            <conditional name="input">
+                <param name="input_number" value="single"/>
+                <param name="input_bam" ftype="bam" value="mpileup.1.bam"/>
+            </conditional>
+            <conditional name="reference_source">
+                <param name="reference_source_selector" value="history"/>
+                <param name="ref_file" ftype="fasta" value="mpileup.ref.fa"/>
+            </conditional>
             <section name="sec_indel">
                 <param name="ambig_reads" value="drop"/>
                 <param name="indel_bias" value="1"/>
                 <param name="indel_size" value="110"/>
             </section>
-            <param name="output_type" value="v" />
+            <param name="output_type" value="v"/>
             <output name="output_file">
                 <assert_contents>
-                    <has_text text="mpileup" />
-                    <has_text text="HG00100" />
-                    <has_text_matching expression="17\t1\t.\tA\t...\t0\t.\tDP=5;" />
-                    <has_text_matching expression="17\t100\t.\tC\t...\t0\t.\tDP=9;" />
+                    <has_text text="mpileup"/>
+                    <has_text text="HG00100"/>
+                    <has_text_matching expression="17\t1\t.\tA\t...\t0\t.\tDP=5;"/>
+                    <has_text_matching expression="17\t100\t.\tC\t...\t0\t.\tDP=9;"/>
                 </assert_contents>
             </output>
             <assert_command>
-                <has_text text="--ambig-reads" />
-                <has_text text="--indel-bias" />
-                <has_text text="--indel-size" />
+                <has_text text="--ambig-reads"/>
+                <has_text text="--indel-bias"/>
+                <has_text text="--indel-size"/>
             </assert_command>
-            
         </test>
     </tests>
     <help><![CDATA[
@@ -544,7 +572,7 @@
 
 @BCFTOOLS_MANPAGE@#@EXECUTABLE@
 
-@BCFTOOLS_WIKI@
+@BCFTOOLS_HOWTOS@
     ]]></help>
-    <expand macro="citations" />
+    <expand macro="citations"/>
 </tool>