diff bcftools_annotate.xml @ 17:8a2e296c07ef draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bcftools commit db275932cbb485cb44ae91e0b421d6f57698db49
author iuc
date Tue, 20 Sep 2022 12:53:07 +0000
parents 2958e3b49ad4
children
line wrap: on
line diff
--- a/bcftools_annotate.xml	Sat Jul 23 13:36:16 2022 +0000
+++ b/bcftools_annotate.xml	Tue Sep 20 12:53:07 2022 +0000
@@ -1,5 +1,5 @@
 <?xml version='1.0' encoding='utf-8'?>
-<tool name="bcftools @EXECUTABLE@" id="bcftools_@EXECUTABLE@" version="@TOOL_VERSION@+galaxy1">
+<tool name="bcftools @EXECUTABLE@" id="bcftools_@EXECUTABLE@" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
     <description>Annotate and edit VCF/BCF files</description>
     <macros>
         <token name="@EXECUTABLE@">annotate</token>
@@ -65,6 +65,9 @@
 #if $section.mark_sites:
   --mark-sites '${section.mark_sites}'
 #end if
+#if $section.min_overlap
+    --min-overlap '$section.min_overlap'
+#end if
 
 #set $section = $sec_annotate
 #if $section.rename_chrs:
@@ -73,6 +76,10 @@
 #if $section.remove:
   --remove '${section.remove}'
 #end if
+#if $section.rename_annots
+    --rename-annots '$section.rename_annots'
+#end if
+
 
 ## Default section
 #set $section = $sec_restrict
@@ -130,6 +137,15 @@
             </conditional>
             <param argument="--mark-sites" type="text" value="" label="Mark Sites TAG"
                 help="add INFO/TAG flag to sites which are (&quot;+&quot;) or are not (&quot;-&quot;) listed in the annotations file" />
+            <param argument="--min-overlap" type="text" value="" label="Minimum required overlap of intersecting regions" optional="true" help="Minimum overlap required as a fraction of the variant in the annotation -a file (ANN), in the target VCF file (:VCF), or both for reciprocal overlap (ANN:VCF). By default overlaps of arbitrary length are sufficient.">
+                <sanitizer invalid_char="">
+                    <valid initial="string.digits">
+                        <add value=":" />
+                        <add value="." />
+                    </valid>
+                </sanitizer>
+                <validator type="regex">[0-9.:]+</validator>
+            </param>
             <param argument="--set-id" type="text" value="" optional="true" label="Set Id">
                 <help>Assign ID on the fly using the given format.
                 By default all existing IDs are replaced.
@@ -153,6 +169,7 @@
             </param>
             <param argument="--rename-chrs" type="data" format="tabular" label="Rename CHROM" optional="true"
                    help="rename chromosomes according to the map in file, with old_name new_name pairs separated by whitespaces, each on a separate line." />
+            <param argument="--rename-annots" type="data" format="tabular" optional="true" label="Rename annotations" help="TYPE/old\tnew, where TYPE is one of FILTER,INFO,FORMAT" />
         </section>
         <section name="sec_restrict" expanded="false" title="Restrict to">
             <expand macro="macro_include" />
@@ -274,7 +291,42 @@
                 </assert_contents>
             </output>
         </test>
-
+        <!-- Test region overlap option -->
+        <test>
+            <param name="input_file" ftype="vcf" value="annotate3.vcf" />
+            <param name="anno_fmt" value="none" />
+            <param name="remove" value="FORMAT" />
+            <param name="output_type" value="v" />
+            <section name="sec_restrict">
+                <param name="regions_overlap" value="1"/>
+            </section>
+            <output name="output_file">
+                <assert_contents>
+                    <not_has_text text="GT:X:PL:Y:AA" />
+                </assert_contents>
+            </output>
+            <assert_command>
+                <has_text text="--regions-overlap" />
+            </assert_command>
+        </test>
+        <!-- Test min overlap option -->
+        <test>
+            <param name="input_file" ftype="vcf" value="annotate3.vcf" />
+            <param name="anno_fmt" value="none" />
+            <param name="remove" value="FORMAT" />
+            <param name="output_type" value="v" />
+            <section name="sec_annofile">
+                <param name="min_overlap" value="0.5"/>
+            </section>
+            <output name="output_file">
+                <assert_contents>
+                    <not_has_text text="GT:X:PL:Y:AA" />
+                </assert_contents>
+            </output>
+            <assert_command>
+                <has_text text="--min-overlap" />
+            </assert_command>
+        </test>
     </tests>
     <help><![CDATA[
 ==================================