diff bcftools_cnv.xml @ 25:9a099033525d 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:52:52 +0000
parents 4904c06618a9
children
line wrap: on
line diff
--- a/bcftools_cnv.xml	Sun Aug 18 09:44:32 2024 +0000
+++ b/bcftools_cnv.xml	Tue Dec 02 07:52:52 2025 +0000
@@ -4,13 +4,12 @@
         <token name="@EXECUTABLE@">cnv</token>
         <import>macros.xml</import>
     </macros>
-    <expand macro="bio_tools" />
+    <expand macro="bio_tools"/>
     <expand macro="requirements">
-        <expand macro="matplotlib_requirement" />
+        <expand macro="matplotlib_requirement"/>
     </expand>
-    <expand macro="version_command" />
+    <expand macro="version_command"/>
     <command detect_errors="aggressive"><![CDATA[
-@PREPARE_ENV@
 @PREPARE_INPUT_FILE@
 #set $section = $sec_restrict
 @PREPARE_TARGETS_FILE@
@@ -94,10 +93,10 @@
 ]]>
     </command>
     <inputs>
-        <expand macro="macro_input" />
-        <param argument="-s" name="query_sample" type="text" label="Query Sample" optional="True" help="The name (as used in the input) of the query sample in the input. Can be ommitted if, and only if, there is only one sample in the input." />
-        <param argument="-c" name="control_sample" type="text" label="Control Sample" optional="True" help="The name (as used in the input) of an optional control sample to compare against. Note: The pairwise calling mode represents the real strength of the tool as it helps to reduce the number of false calls and also allows one to distinguish between normal and novel copy number variation." />
-        <expand macro="macro_AF_file" />
+        <expand macro="macro_input"/>
+        <param argument="-s" name="query_sample" type="text" label="Query Sample" optional="True" help="The name (as used in the input) of the query sample in the input. Can be ommitted if, and only if, there is only one sample in the input."/>
+        <param argument="-c" name="control_sample" type="text" label="Control Sample" optional="True" help="The name (as used in the input) of an optional control sample to compare against. Note: The pairwise calling mode represents the real strength of the tool as it helps to reduce the number of false calls and also allows one to distinguish between normal and novel copy number variation."/>
+        <expand macro="macro_AF_file"/>
         <conditional name="plotting">
             <param name="generate_plots" type="select" label="Plot results?">
                 <option value="all">Yes, plot results for all chromosomes</option>
@@ -105,82 +104,52 @@
                 <option value="none">No, do not generate plots</option>
             </param>
             <when value="all">
-                <param name="plot_threshold" type="hidden" value="0" />
+                <param name="plot_threshold" type="hidden" value="0"/>
             </when>
             <when value="some">
-                <param argument="-p" name="plot_threshold" type="float" value="0"
-                label="Plot Threshold"
-                help="Plot aberrant chromosomes with quality at least 'float'" />
+                <param argument="-p" name="plot_threshold" type="float" value="0" label="Plot Threshold" help="Plot aberrant chromosomes with quality at least 'float'"/>
             </when>
-            <when value="none" />
+            <when value="none"/>
         </conditional>
         <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_region_restrict"/>
+            <expand macro="macro_target_restrict"/>
         </section>
         <section name="sec_hmm" expanded="false" title="HMM Options">
-            <param argument="--aberrant" name="aberrant_query" type="float" value="1" min="0" max="1"
-            label="Estimated purity of the query sample"
-            help="Estimate of the fractional contribution of the desired query tissue to the (possibly control-contaminated) query sample (default: 1 = no contamination with control tissue)" />
-            <param argument="--aberrant" name="aberrant_control" type="float" value="1" min="0" max="1"
-            label="Estimated purity of the control sample"
-            help="Estimate of the fractional contribution of the desired control tissue to the (possibly query-contaminated) control sample (default: 1 = no contamination with query tissue)" />
+            <param argument="--aberrant" name="aberrant_query" type="float" value="1" min="0" max="1" label="Estimated purity of the query sample" help="Estimate of the fractional contribution of the desired query tissue to the (possibly control-contaminated) query sample (default: 1 = no contamination with control tissue)"/>
+            <param argument="--aberrant" name="aberrant_control" type="float" value="1" min="0" max="1" label="Estimated purity of the control sample" help="Estimate of the fractional contribution of the desired control tissue to the (possibly query-contaminated) control sample (default: 1 = no contamination with query tissue)"/>
             <conditional name="aberrant_optimization">
-                <param name="do_optimize" type="select"
-                label="Adjust sample purity estimates based on data?"
-                help="Instead of treating your specified estimates of the sample purities as fixed values, the tool can use them as starting values for an iterative optimization that tries to estimate the sample purities from the data. Note: With estimate optimization enabled the final estimates will be reported as cell fraction (CF) estimates in the summary report.">
+                <param name="do_optimize" type="select" label="Adjust sample purity estimates based on data?" help="Instead of treating your specified estimates of the sample purities as fixed values, the tool can use them as starting values for an iterative optimization that tries to estimate the sample purities from the data. Note: With estimate optimization enabled the final estimates will be reported as cell fraction (CF) estimates in the summary report.">
                     <option value="no">No, leave sample purities as specified</option>
                     <option value="yes">Yes, adjust purity estimates</option>
                 </param>
-                <when value="no" />
+                <when value="no"/>
                 <when value="yes">
-                    <param argument="--optimize" name="lower_bound" type="float" value="0.3" min="1e-9" max="1"
-                    label="Lower bound for adjusted estimate"
-                    help="Constrains the final adjusted purity estimates not to be smaller than this value." />
+                    <param argument="--optimize" name="lower_bound" type="float" value="0.3" min="1e-9" max="1" label="Lower bound for adjusted estimate" help="Constrains the final adjusted purity estimates not to be smaller than this value."/>
                 </when>
             </conditional>
             <conditional name="score_usage">
-                <param name="compute_on" type="select" label="Use BAF and LRR annotations to call CNVs?"
-                help="Using LRR information in addition to BAF values is the default and helps in dealing with random noise in the data. However, the tool is also able to call CNVs from BAF values alone in case your input does not feature LRR information.">
+                <param name="compute_on" type="select" label="Use BAF and LRR annotations to call CNVs?" help="Using LRR information in addition to BAF values is the default and helps in dealing with random noise in the data. However, the tool is also able to call CNVs from BAF values alone in case your input does not feature LRR information.">
                     <option value="baf+lrr">Yes (requires input with both BAF and LRR subfields)</option>
                     <option value="baf">No, use BAF values exclusively</option>
                 </param>
                 <when value="baf+lrr">
-                    <param argument="--BAF-weight" name="baf_weight" type="float" value="1" min="0" max="1"
-                    label="Baf Weight" help="relative contribution from BAF" />
-
-                    <param argument="--BAF-dev" name="baf_dev_query" type="float" value="0.04" min="0" max="1"
-                    label="Query sample BAF deviation"
-                    help="Expected BAF deviation in the query sample (default: 0.04)" />
-                    <param argument="--BAF-dev" name="baf_dev_control" type="float" value="0.04" min="0" max="1"
-                    label="Control sample BAF deviation"
-                    help="Expected BAF deviation in the control sample (default: 0.04)" />
-
-                    <param argument="--LRR-weight" name="lrr_weight" type="float" value="0.2" min="0" max="1"
-                    label="LRR Weight"
-                    help="Relative contribution from LRR. This option can have a big effect on the number of calls produced. With truly random noise (such as in simulated data), the value should be set high (1.0), but in the presence of systematic noise when LRR values are not informative, lower values result in cleaner calls (default: 0.2)." />
-                    <param argument="--LRR-dev" name="lrr_dev_query" type="float" value="0.2" min="0" max="1"
-                    label="Query sample LRR Deviation"
-                    help="Expected LRR deviation in the query sample (default: 0.2)" />
-                    <param argument="--LRR-dev" name="lrr_dev_control" type="float" value="0.2" min="0" max="1"
-                    label="Control sample LRR Deviation"
-                    help="Expected LRR deviation in the control sample (default: 0.2)" />
-                    <param argument="--LRR-smooth-win" name="lrr_smooth_win" type="integer" value="10"
-                    label="LRR Smoothing Window"
-                    help="Window of LRR moving average smoothing (default: 10)" />
+                    <param argument="--BAF-weight" name="baf_weight" type="float" value="1" min="0" max="1" label="Baf Weight" help="relative contribution from BAF"/>
+                    <param argument="--BAF-dev" name="baf_dev_query" type="float" value="0.04" min="0" max="1" label="Query sample BAF deviation" help="Expected BAF deviation in the query sample (default: 0.04)"/>
+                    <param argument="--BAF-dev" name="baf_dev_control" type="float" value="0.04" min="0" max="1" label="Control sample BAF deviation" help="Expected BAF deviation in the control sample (default: 0.04)"/>
+                    <param argument="--LRR-weight" name="lrr_weight" type="float" value="0.2" min="0" max="1" label="LRR Weight" help="Relative contribution from LRR. This option can have a big effect on the number of calls produced. With truly random noise (such as in simulated data), the value should be set high (1.0), but in the presence of systematic noise when LRR values are not informative, lower values result in cleaner calls (default: 0.2)."/>
+                    <param argument="--LRR-dev" name="lrr_dev_query" type="float" value="0.2" min="0" max="1" label="Query sample LRR Deviation" help="Expected LRR deviation in the query sample (default: 0.2)"/>
+                    <param argument="--LRR-dev" name="lrr_dev_control" type="float" value="0.2" min="0" max="1" label="Control sample LRR Deviation" help="Expected LRR deviation in the control sample (default: 0.2)"/>
+                    <param argument="--LRR-smooth-win" name="lrr_smooth_win" type="integer" value="10" label="LRR Smoothing Window" help="Window of LRR moving average smoothing (default: 10)"/>
                 </when>
                 <when value="baf">
-                    <param argument="--BAF-dev" name="baf_dev_query" type="float" value="0.04" min="0" max="1"
-                    label="Query sample BAF deviation"
-                    help="Expected BAF deviation in the query sample (default: 0.04)" />
-                    <param argument="--BAF-dev" name="baf_dev_control" type="float" value="0.04" min="0" max="1"
-                    label="Control sample BAF deviation"
-                    help="Expected BAF deviation in the control sample (default: 0.04)" />
-                    <param name="baf_weight" type="hidden" value="1" />
-                    <param name="lrr_weight" type="hidden" value="0" />
+                    <param argument="--BAF-dev" name="baf_dev_query" type="float" value="0.04" min="0" max="1" label="Query sample BAF deviation" help="Expected BAF deviation in the query sample (default: 0.04)"/>
+                    <param argument="--BAF-dev" name="baf_dev_control" type="float" value="0.04" min="0" max="1" label="Control sample BAF deviation" help="Expected BAF deviation in the control sample (default: 0.04)"/>
+                    <param name="baf_weight" type="hidden" value="1"/>
+                    <param name="lrr_weight" type="hidden" value="0"/>
                 </when>
             </conditional>
-            <param argument="--err-prob" type="float" value="1e-4" label="Err Prob" help="Uniform error probability" />
+            <param argument="--err-prob" type="float" value="1e-4" label="Err Prob" help="Uniform error probability"/>
             <param argument="--same-prob" type="float" value="0.5" min="0" max="1" label="Same Prob">
                 <help>
                     The prior probability of the query and the control sample being the same. 
@@ -204,41 +173,51 @@
     </outputs>
     <tests>
         <test expect_num_outputs="3">
-            <param name="input_file" ftype="vcf" value="cnv.vcf" />
-            <output name="output_summary" file="cnv_summary.tab" compare="re_match" />
+            <param name="input_file" ftype="vcf" value="cnv.vcf"/>
+            <output name="output_summary" file="cnv_summary.tab" compare="re_match"/>
         </test>
         <test expect_num_outputs="2">
-            <param name="input_file" ftype="vcf" value="cnv.vcf" />
+            <param name="input_file" ftype="vcf" value="cnv.vcf"/>
             <conditional name="plotting">
-                <param name="generate_plots" value="none" />
+                <param name="generate_plots" value="none"/>
             </conditional>
-            <output name="output_summary" file="cnv_summary.tab" compare="re_match" />
+            <output name="output_summary" file="cnv_summary.tab" compare="re_match"/>
         </test>
         <test expect_num_outputs="3">
-            <param name="input_file" ftype="vcf" value="cnv.vcf" />
-            <param name="query_sample" value="test" />
-            <param name="control_sample" value="test" />
-            <output name="output_summary" file="cnv_pairwise_summary.tab" compare="re_match" />
+            <param name="input_file" ftype="vcf" value="cnv.vcf"/>
+            <param name="query_sample" value="test"/>
+            <param name="control_sample" value="test"/>
+            <output name="output_summary" file="cnv_pairwise_summary.tab" compare="re_match"/>
         </test>
         <test expect_num_outputs="2">
-            <param name="input_file" ftype="vcf" value="cnv_baf_only.vcf" />
+            <param name="input_file" ftype="vcf" value="cnv_baf_only.vcf"/>
             <conditional name="plotting">
-                <param name="generate_plots" value="none" />
+                <param name="generate_plots" value="none"/>
             </conditional>
-            <conditional name="score_usage">
-                <param name="compute_on" value="baf" />
-            </conditional>
-            <output name="output_summary" file="cnv_summary.tab" compare="re_match" />
+            <section name="sec_hmm">
+                <conditional name="score_usage">
+                    <param name="compute_on" value="baf"/>
+                </conditional>
+            </section>
+            <output name="output_summary" file="cnv_summary.tab" compare="re_match"/>
         </test>
         <!-- Test region overlap option -->
         <test expect_num_outputs="3">
-            <param name="input_file" ftype="vcf" value="cnv.vcf" />
+            <param name="input_file" ftype="vcf" value="cnv.vcf"/>
             <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="10" />
+                    </repeat>
+                    <repeat name="region_specs">
+                        <param name="chrom" value="11" />
+                    </repeat>
+                </conditional>
             </section>
-            <output name="output_summary" file="cnv_summary.tab" compare="re_match" />
+            <output name="output_summary" file="cnv_summary.tab" compare="re_match"/>
             <assert_command>
-                <has_text text="--regions-overlap" />
+                <has_text text="--regions-overlap"/>
             </assert_command>
         </test>
     </tests>
@@ -255,8 +234,8 @@
 
 @BCFTOOLS_MANPAGE@#@EXECUTABLE@
 
-@BCFTOOLS_WIKI@
+@BCFTOOLS_HOWTOS@
 ]]>
     </help>
-    <expand macro="citations" />
+    <expand macro="citations"/>
 </tool>