changeset 10:365022dae1c9 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bcftools commit 942ca2971ae6a72e548fde6186c6408a1e236653
author iuc
date Mon, 29 Jul 2019 17:52:55 -0400
parents 9f281310c048
children 0ba50f5955b6
files bcftools_annotate.xml test-data/annots.bcf
diffstat 2 files changed, 28 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/bcftools_annotate.xml	Wed Jun 05 12:45:20 2019 -0400
+++ b/bcftools_annotate.xml	Mon Jul 29 17:52:55 2019 -0400
@@ -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@+galaxy2">
     <description>Annotate and edit VCF/BCF files</description>
     <macros>
         <token name="@EXECUTABLE@">annotate</token>
@@ -14,9 +14,19 @@
 #set $annotation_hdr = None
 #set $section = $sec_annofile
 #if $section.annofile.anno_fmt == 'vcf':
-  #set $annotation_file = 'annotations.vcf.gz'
-  bgzip -c "$section.annofile.annotations" > $annotation_file &&
-  bcftools index $annotation_file &&
+  #if $section.annofile.annotations.is_of_type('vcf')
+    #set $annotation_file = 'annotations.vcf.gz'
+    bgzip -c "$section.annofile.annotations" > $annotation_file &&
+    bcftools index $annotation_file &&
+  #elif $section.annofile.annotations.is_of_type('bcf')
+    #set $annotation_file = 'annotations.bcf'
+    ln -s '$section.annofile.annotations' $annotation_file &&
+    #if $section.annofile.annotations.metadata.bcf_index:
+      ln -s '${section.annofile.annotations.metadata.bcf_index}' ${annotation_file}.csi &&
+    #else
+      bcftools index $annotation_file &&
+    #end if
+  #end if
 #elif $section.annofile.anno_fmt == 'tab':
   #if $section.annofile.annotations.is_of_type('bed')
     #set $annotation_file = 'annotations.bed.gz'
@@ -97,7 +107,7 @@
                 </param>
                 <when value="none"/>
                 <when value="vcf">
-                    <param name="annotations" type="data" format="vcf" label="Annotations VCF"/>
+                    <param name="annotations" type="data" format="vcf,bcf" label="Annotations VCF"/>
                 </when>
                 <when value="tab">
                     <param name="annotations" type="data" format="tabular,bed" label="Annotations">
@@ -196,6 +206,19 @@
             </output>
         </test>
         <test>
+            <param name="input_file" ftype="vcf" value="annotate.vcf" />
+            <param name="anno_fmt" value="vcf" />
+            <param name="annotations" value="annots.bcf" />
+            <param name="columns" value="STR,ID,QUAL,FILTER" />
+            <param name="output_type" value="v" />
+            <output name="output_file">
+                <assert_contents>
+                    <has_text text="idIndel" />
+                    <has_text text="STR=testSNP" />
+                </assert_contents>
+            </output>
+        </test>
+        <test>
             <param name="input_file" ftype="vcf" value="annotate2.vcf" />
             <param name="anno_fmt" value="vcf" />
             <param name="annotations" value="annots2.vcf" />
Binary file test-data/annots.bcf has changed