diff bcftools_norm.xml @ 17:48291658fdf6 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:51:07 +0000
parents 481476814acc
children 271965b55437
line wrap: on
line diff
--- a/bcftools_norm.xml	Sat Jul 23 13:45:37 2022 +0000
+++ b/bcftools_norm.xml	Tue Sep 20 12:51:07 2022 +0000
@@ -1,5 +1,5 @@
 <?xml version='1.0' encoding='utf-8'?>
-<tool name="bcftools @EXECUTABLE@" id="bcftools_@EXECUTABLE@" version="@TOOL_VERSION@">
+<tool name="bcftools @EXECUTABLE@" id="bcftools_@EXECUTABLE@" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
     <description>Left-align and normalize indels; check if REF alleles match the reference; split multiallelic sites into multiple rows; recover multiallelics from multiple rows</description>
     <macros>
         <token name="@EXECUTABLE@">norm</token>
@@ -42,12 +42,17 @@
 #if $rm_dup:
   --rm-dup "$rm_dup"
 #end if
+$atomize
+#if $old_rec_tag
+  --old-rec-tag '$old_rec_tag'
+#end if
 #if $multiallelics.mode:
   --multiallelics '${multiallelics.mode}${multiallelics.multiallelic_types}'
 #end if
 #if $multiallelics.mode == '+':
   ${multiallelics.strict_filter}
 #end if
+
 #if $sec_default.site_win:
   --site-win ${sec_default.site_win}
 #end if
@@ -78,8 +83,19 @@
             <option value="ws">fix the variant record using the reference genome information (-ws)</option>
             <option value="e">exit with an error (-e)</option>
         </param>
+        <param argument="--atomize" type="boolean" truevalue="--atomize" falsevalue="" checked="false" 
+            label="Atomize" help="Decompose complex variants (e.g. MNVs become consecutive SNVs)" />
         <param argument="--do-not-normalize" name="normalize_indels" type="boolean" truevalue="" falsevalue="--do-not-normalize" checked="false"
         label="Left-align and normalize indels?" />
+        <param argument="--old-rec-tag" type="text" value="" optional="true" label="Annotate modified records with INFO/STR indicating the original variant">
+            <sanitizer invalid_char="">
+                <valid initial="string.letters,string.digits">
+                    <add value="_" />
+                    <add value="/" />
+                </valid>
+            </sanitizer>
+            <validator type="regex">[0-9a-zA-Z_/]+</validator>
+        </param>
         <param name="rm_dup" type="select" display="radio"
         label="Perform deduplication for the folowing types of variant records">
             <option value="">do not deduplicate any records</option>
@@ -119,7 +135,7 @@
         <section name="sec_restrict" expanded="false" title="Restrict all operations to">
             <expand macro="macro_restrict" type="region" label_type="Region" />
             <expand macro="macro_restrict" type="target" label_type="Target">
-              <expand macro="macro_invert_targets" />
+                <expand macro="macro_invert_targets" />
             </expand>
         </section>
 
@@ -234,7 +250,47 @@
                 </assert_contents>
             </output>
         </test>
-
+        
+        <!-- Test atomize option -->
+        <test>
+            <param name="input_file" ftype="vcf" value="norm.split.vcf" />
+            <expand macro="test_using_reference" ref="norm.fa" />
+            <param name="normalize_indels" value="true" />
+            <conditional name="multiallelics">
+                <param name="mode" value="-" />
+            </conditional>
+            <param name="atomize" value="true"/>
+            <param name="output_type" value="v" />
+            <output name="output_file">
+                <assert_contents>
+                    <not_has_text text="TAA,TAACCCTAAA" />
+                    <has_text_matching expression="1\t105\t.\tTAAACCCTA\tT\t"/>
+                    <has_text_matching expression="1\t105\t.\tTA\tT\t"/>
+                </assert_contents>
+            </output>
+            <assert_command>
+                <has_text text="--atomize" />
+            </assert_command>
+        </test>
+        <!-- Test region overlap options -->
+        <test>
+            <param name="input_file" ftype="vcf" dbkey="?" value="norm.vcf" />
+            <expand macro="test_using_reference" select_from="cached" ref="norm" />
+            <param name="normalize_indels" value="true" />
+            <param name="output_type" value="v" />
+            <section name="sec_restrict">
+                <param name="regions_overlap" value="1"/>
+            </section>
+            <output name="output_file">
+                <assert_contents>
+                    <has_text text="T,TAACCCTA" />
+                    <not_has_text text="TAA,TAACCCTAAA" />
+                </assert_contents>
+            </output>
+            <assert_command>
+                <has_text text="--regions-overlap" />
+            </assert_command>
+        </test>
     </tests>
     <help><![CDATA[
 =====================================