diff bcftools_csq.xml @ 20:0ab4bbd0f9b5 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:49:22 +0000
parents 10da4a86ee5c
children
line wrap: on
line diff
--- a/bcftools_csq.xml	Sun Aug 18 09:39:01 2024 +0000
+++ b/bcftools_csq.xml	Tue Dec 02 07:49:22 2025 +0000
@@ -4,13 +4,12 @@
         <token name="@EXECUTABLE@">csq</token>
         <import>macros.xml</import>
     </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[
-@PREPARE_ENV@
 @PREPARE_INPUT_FILE@
 #set $section = $sec_required.reference_source
 @PREPARE_FASTA_REF@
@@ -40,6 +39,9 @@
 #if str($sec_csq_opts.trim_protein_seq)
     --trim-protein-seq $sec_csq_opts.trim_protein_seq
 #end if
+#if $sec_csq_opts.genetic_code
+    --genetic-code '$sec_csq_opts.genetic_code'
+#end if
 
 ## Subset section
 #set $section = $sec_subset
@@ -61,104 +63,149 @@
 ]]>
     </command>
     <inputs>
-        <expand macro="macro_input" />
+        <expand macro="macro_input"/>
         <section name="sec_required" expanded="true" title="Required References">
-            <expand macro="macro_fasta_ref" />
-            <param name="gff_annot" type="data" format="gff3" label="GFF3 annotation file" 
-                 help="From Ensembl:  ftp://ftp.ensembl.org/pub/current_gff3/"/>
+            <expand macro="macro_fasta_ref"/>
+            <param name="gff_annot" type="data" format="gff3" label="GFF3 annotation file" help="From Ensembl:  ftp://ftp.ensembl.org/pub/current_gff3/"/>
         </section>
         <section name="sec_csq_opts" expanded="true" title="CSQ Options">
-            <param name="ncsq" type="integer" value="16" min="1" max="50" label="maximum number of consequences to consider per site"
-                help="-ncsq 16"/>
-            <param name="local_csq" type="boolean" truevalue="--local-csq" falsevalue="" checked="false" label="run localized predictions considering only one VCF record at a time"
-                 help="--local-csq switch off haplotype-aware calling, run localized predictions considering only one VCF record at a time"/>
-            <param name="phase" type="select" optional="true" label="phase" 
-                 help="how to construct haplotypes and how to deal with unphased data">
-                <option value="a">take GTs as is, create haplotypes regardless of phase (0/1 -> 0|1)</option>
-                <option value="m">merge *all* GTs into a single haplotype (0/1 -> 1, 1/2 -> 1)</option>
+            <param name="ncsq" type="integer" value="16" min="1" max="50" label="maximum number of consequences to consider per site" help="-ncsq 16"/>
+            <param name="local_csq" type="boolean" truevalue="--local-csq" falsevalue="" checked="false" label="run localized predictions considering only one VCF record at a time" help="--local-csq switch off haplotype-aware calling, run localized predictions considering only one VCF record at a time"/>
+            <param name="phase" type="select" optional="true" label="phase" help="how to construct haplotypes and how to deal with unphased data">
+                <option value="a">take GTs as is, create haplotypes regardless of phase (0/1 -&gt; 0|1)</option>
+                <option value="m">merge *all* GTs into a single haplotype (0/1 -&gt; 1, 1/2 -&gt; 1)</option>
                 <option value="r">require phased GTs, throw an error on unphased het GTs</option>
-                <option value="R">create non-reference haplotypes if possible (0/1 -> 1|1, 1/2 -> 1|2)</option>
+                <option value="R">create non-reference haplotypes if possible (0/1 -&gt; 1|1, 1/2 -&gt; 1|2)</option>
                 <option value="s">skip unphased GTs</option>
             </param>
-            <param name="custom_tag" type="text" value="" optional="true" 
-                 label="use this custom tag to store consequences rather than the default BCSQ tag">
-                 <validator type="regex" message="">^(\w+)?$</validator>
+            <param name="custom_tag" type="text" value="" optional="true" label="use this custom tag to store consequences rather than the default BCSQ tag">
+                <validator type="regex" message="">^(\w+)?$</validator>
             </param>
-            <param argument="--trim-protein-seq" type="integer" min="0" value="" optional="true" label="Abbreviate protein-changing predictions" 
-                help="Abbreviate protein-changing predictions to max INT aminoacids" />
+            <param argument="--trim-protein-seq" type="integer" min="0" value="" optional="true" label="Abbreviate protein-changing predictions" help="Abbreviate protein-changing predictions to max INT aminoacids"/>
+            <param argument="--genetic-code" type="select" optional="true" label="Genetic code table" help="Choose a predefined genetic code table used to translate coding sequences. Leave unset for the default bcftools behaviour.">
+                <option value="0">0: Standard simplified</option>
+                <option value="1">1: Standard</option>
+                <option value="2">2: Vertebrate mitochondrial</option>
+                <option value="3">3: Yeast mitochondrial</option>
+                <option value="4">4: Mold, Protozoan, Coelenterate mitochondrial; Mycoplasma; Spiroplasma</option>
+                <option value="5">5: Invertebrate mitochondrial</option>
+                <option value="6">6: Ciliate, Dasycladacean and Hexamita nuclear</option>
+                <option value="9">9: Echinoderm and Flatworm mitochondrial</option>
+                <option value="10">10: Euplotid nuclear</option>
+                <option value="11">11: Bacterial, Archaeal and Plant plastid</option>
+                <option value="12">12: Alternative yeast nuclear</option>
+                <option value="13">13: Ascidian mitochondrial</option>
+                <option value="14">14: Alternative flatworm mitochondrial</option>
+                <option value="15">15: Blepharisma nuclear</option>
+                <option value="16">16: Chlorophycean mitochondrial</option>
+                <option value="21">21: Trematode mitochondrial</option>
+                <option value="22">22: Scenedesmus obliquus mitochondrial</option>
+                <option value="23">23: Thraustochytrium mitochondrial</option>
+                <option value="24">24: Pterobranchia mitochondrial</option>
+                <option value="25">25: Candidate Division SR1 and Gracilibacteria</option>
+                <option value="26">26: Pachysolen tannophilus nuclear</option>
+                <option value="27">27: Karyorelict nuclear</option>
+                <option value="28">28: Condylostoma nuclear</option>
+                <option value="29">29: Mesodinium nuclear</option>
+                <option value="30">30: Peritrich nuclear</option>
+                <option value="31">31: Blastocrithidia nuclear</option>
+                <option value="33">33: Cephalodiscidae mitochondrial UAA-Tyr</option>
+            </param>
         </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_include" />
-            <expand macro="macro_exclude" />
+            <expand macro="macro_region_restrict"/>
+            <expand macro="macro_target_restrict"/>
+            <expand macro="macro_include"/>
+            <expand macro="macro_exclude"/>
         </section>
         <section name="sec_subset" expanded="false" title="Subset Options">
-            <expand macro="macro_samples" />
+            <expand macro="macro_samples"/>
         </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_file" ftype="vcf" value="csq.vcf" />
-            <expand macro="test_using_reference" ref="csq.fa" />
-            <param name="gff_annot" ftype="gff3" value="csq.gff3" />
-            <param name="output_type" value="v" />
+            <param name="input_file" ftype="vcf" value="csq.vcf"/>
+            <section name="sec_required">
+                <expand macro="test_using_reference" ref="csq.fa"/>
+            </section>
+            <section name="sec_required">
+                <param name="gff_annot" ftype="gff3" value="csq.gff3"/>
+            </section>
+            <param name="output_type" value="v"/>
             <output name="output_file">
                 <assert_contents>
-                    <has_text text="BCSQ" />
+                    <has_text text="BCSQ"/>
                 </assert_contents>
             </output>
         </test>
         <test>
-            <param name="input_file" ftype="vcf" value="csq.vcf" />
-            <expand macro="test_using_reference" select_from="cached" ref="csq" />
-            <param name="gff_annot" ftype="gff3" value="csq.gff3" />
-            <param name="output_type" value="v" />
+            <param name="input_file" ftype="vcf" value="csq.vcf"/>
+            <section name="sec_required">
+                <expand macro="test_using_reference" select_from="cached" ref="csq"/>
+            </section>
+            <section name="sec_required">
+                <param name="gff_annot" ftype="gff3" value="csq.gff3"/>
+            </section>
+            <param name="output_type" value="v"/>
             <output name="output_file">
                 <assert_contents>
-                    <has_text text="BCSQ" />
+                    <has_text text="BCSQ"/>
                 </assert_contents>
             </output>
         </test>
         <!-- Test protein seq prediction-->
         <test>
-            <param name="input_file" ftype="vcf" value="csq.vcf" />
-            <expand macro="test_using_reference" select_from="cached" ref="csq" />
-            <param name="gff_annot" ftype="gff3" value="csq.gff3" />
-            <param name="output_type" value="v" />
+            <param name="input_file" ftype="vcf" value="csq.vcf"/>
+            <section name="sec_required">
+                <expand macro="test_using_reference" select_from="cached" ref="csq"/>
+            </section>
+            <section name="sec_required">
+                <param name="gff_annot" ftype="gff3" value="csq.gff3"/>
+            </section>
+            <param name="output_type" value="v"/>
             <section name="sec_csq_opts">
                 <param name="trim_protein_seq" value="10"/>
+                <param name="genetic_code" value="1"/>
             </section>
             <output name="output_file">
                 <assert_contents>
-                    <has_text text="BCSQ" />
+                    <has_text text="BCSQ"/>
                 </assert_contents>
             </output>
             <assert_command>
-                <has_text text="--trim-protein-seq" />
+                <has_text text="--trim-protein-seq"/>
+                <has_text text="--genetic-code '1'"/>
             </assert_command>
         </test>
         <!-- Test region overlap-->
         <test>
-            <param name="input_file" ftype="vcf" value="csq.vcf" />
-            <expand macro="test_using_reference" select_from="cached" ref="csq" />
-            <param name="gff_annot" ftype="gff3" value="csq.gff3" />
-            <param name="output_type" value="v" />
+            <param name="input_file" ftype="vcf" value="csq.vcf"/>
+            <section name="sec_required">
+                <expand macro="test_using_reference" select_from="cached" ref="csq"/>
+            </section>
+            <section name="sec_required">
+                <param name="gff_annot" ftype="gff3" value="csq.gff3"/>
+            </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>
-                    <has_text text="BCSQ" />
+                    <has_text text="BCSQ"/>
                 </assert_contents>
             </output>
             <assert_command>
-                <has_text text="--regions-overlap" />
+                <has_text text="--regions-overlap"/>
             </assert_command>
         </test>
     </tests>
@@ -197,8 +244,8 @@
 
 @BCFTOOLS_MANPAGE@#@EXECUTABLE@
 
-@BCFTOOLS_WIKI@
+@BCFTOOLS_HOWTOS@
 ]]>
     </help>
-    <expand macro="citations" />
+    <expand macro="citations"/>
 </tool>