changeset 2:67c573d9c1ec draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bcftools commit 5725fea947162618d77de7b8011d18b2f16c7094
author iuc
date Sat, 21 Jan 2017 06:51:02 -0500
parents e051a63ca6b0
children 5506fae275f6
files bcftools_annotate.xml macros.xml
diffstat 2 files changed, 38 insertions(+), 39 deletions(-) [+]
line wrap: on
line diff
--- a/bcftools_annotate.xml	Wed Jul 13 10:49:12 2016 -0400
+++ b/bcftools_annotate.xml	Sat Jan 21 06:51:02 2017 -0500
@@ -13,12 +13,12 @@
 #set $annotation_file = None
 #set $annotation_hdr = None
 #set $section = $sec_annofile
-#if $section.annofile.anno_fmt == 'vcf': 
+#if $section.annofile.anno_fmt == 'vcf':
   #set $annotation_file = 'annotations.vcf.gz'
   bgzip -c "$section.annofile.annotations" > $annotation_file &&
   bcftools index $annotation_file &&
 #elif $section.annofile.anno_fmt == 'tab':
-  #if $section.annofile.annotations.ext == 'bed'
+  #if $section.annofile.annotations.is_of_type('bed')
     #set $annotation_file = 'annotations.bed.gz'
     bgzip -c "$section.annofile.annotations" > $annotation_file &&
     tabix -s 1 -b 2 -e 3 $annotation_file &&
@@ -87,7 +87,7 @@
         <section name="sec_annofile" expanded="false" title="Add Annotations">
             <expand macro="macro_columns" />
             <conditional name="annofile">
-                <param name="anno_fmt" type="select" label="Annotations File"> 
+                <param name="anno_fmt" type="select" label="Annotations File">
                     <option value="none">None</option>
                     <option value="vcf">From a VCF/BCF file</option>
                     <option value="tab">From a BED or tab-delimited file</option>
@@ -99,9 +99,9 @@
                 <when value="tab">
                     <param name="annotations" type="data" format="tabular,bed" label="Annotations">
                         <help><![CDATA[
-                        BED, or a tab-delimited file with mandatory columns CHROM, POS (or, alternatively, FROM and TO), 
-                        optional columns REF and ALT, and arbitrary number of annotation columns. 
-                        Note that in case of tab-delimited file, the coordinates POS, FROM and TO are one-based and inclusive. 
+                        BED, or a tab-delimited file with mandatory columns CHROM, POS (or, alternatively, FROM and TO),
+                        optional columns REF and ALT, and arbitrary number of annotation columns.
+                        Note that in case of tab-delimited file, the coordinates POS, FROM and TO are one-based and inclusive.
                         ]]></help>
                     </param>
                     <param name="header_file" type="data" format="txt" label="Header Lines File" optional="True" help="lines which should be appended to the VCF header" />
@@ -114,12 +114,12 @@
                     </param>
                 </when>
             </conditional>
-            <param name="mark_sites" type="text" value="" label="Mark Sites TAG" 
+            <param name="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 name="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. 
-                If the format string is preceded by "+", only missing IDs will be set. 
+                By default all existing IDs are replaced.
+                If the format string is preceded by "+", only missing IDs will be set.
                 For example: '%CHROM\_%POS\_%REF\_%FIRST_ALT'
                 </help>
                 <sanitizer sanitize="False"/>
@@ -127,17 +127,17 @@
             </param>
         </section>
         <section name="sec_annotate" expanded="false" title="Change Annotations">
-            <param name="remove" type="text" value="" label="Remove annotations" optional="true"> 
+            <param name="remove" type="text" value="" label="Remove annotations" optional="true">
                 <help><![CDATA[
-                 List of annotations to remove. 
-                 Use "FILTER" to remove all filters or "FILTER/SomeFilter" to remove a specific filter. 
-                 Similarly, "INFO" can be used to remove all INFO tags and "FORMAT" to remove all FORMAT tags except GT. 
-                 To remove all INFO tags except "FOO" and "BAR", use "^INFO/FOO,INFO/BAR" (and similarly for FORMAT and FILTER). 
-                 "INFO" can be abbreviated to "INF" and "FORMAT" to "FMT". 
+                 List of annotations to remove.
+                 Use "FILTER" to remove all filters or "FILTER/SomeFilter" to remove a specific filter.
+                 Similarly, "INFO" can be used to remove all INFO tags and "FORMAT" to remove all FORMAT tags except GT.
+                 To remove all INFO tags except "FOO" and "BAR", use "^INFO/FOO,INFO/BAR" (and similarly for FORMAT and FILTER).
+                 "INFO" can be abbreviated to "INF" and "FORMAT" to "FMT".
                 ]]></help>
                 <validator type="regex" message="">^(\^?[A-Z]+(/\w+)?(,\^?[A-Z]+(/\w+)?)*)?$</validator>
             </param>
-            <param name="rename_chrs" type="data" format="tabular" label="Rename CHROM" optional="True" 
+            <param name="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." />
         </section>
         <section name="sec_restrict" expanded="false" title="Restrict to">
--- a/macros.xml	Wed Jul 13 10:49:12 2016 -0400
+++ b/macros.xml	Sat Jan 21 06:51:02 2017 -0500
@@ -21,7 +21,7 @@
   <xml name="version_command">
     <version_command>bcftools 2&gt;&amp;1 | grep 'Version:'</version_command>
   </xml>
-  
+
   <xml name="citations">
     <citations>
       <citation type="doi">10.1093/bioinformatics/btp352</citation>
@@ -45,20 +45,20 @@
 <![CDATA[
 ## May need to symlink input if there is an associated
 #set $input_vcf = 'input.vcf.gz'
-#if $input_file.datatype.file_ext == 'vcf'
+#if $input_file.is_of_type('vcf')
   bgzip -c "$input_file" > $input_vcf &&
   bcftools index $input_vcf &&
-#elif $input_file.datatype.file_ext == 'vcf_bgzip'
+#elif $input_file.is_of_type('vcf_bgzip')
   ln -s "$input_file" $input_vcf
-#elif $input_file.datatype.file_ext == 'bcf'
+#elif $input_file.is_of_type('bcf')
   #set $input_vcf = 'input.bcf'
-  ln -s "$input_file" $input_vcf && 
+  ln -s "$input_file" $input_vcf &&
   #if $input_file.metadata.bcf_index:
     ln -s $input_file.metadata.bcf_index ${input_vcf}.csi &&
-  #else 
+  #else
     bcftools index $input_vcf &&
   #end if
-#elif $input_file.datatype.file_ext == 'bcf_bgzip'
+#elif $input_file.is_of_type('bcf_bgzip')
   ln -s "$input_file" $input_vcf
 #end if
 ]]>
@@ -77,21 +77,21 @@
 #set $vcfs_list_file = 'vcfs_list'
 #for (i,input_file) in enumerate($input_files):
   #set $input_vcf = 'input' + str($i) + '.vcf.gz'
-  #if $input_file.datatype.file_ext == 'vcf'
+  #if $input_file.is_of_type('vcf')
     bgzip -c "$input_file" > $input_vcf &&
     bcftools index $input_vcf &&
-  #elif $input_file.datatype.file_ext == 'vcf_bgz'
+  #elif $input_file.is_of_type('vcf_bgz')
     ln -s "$input_file" $input_vcf
-  #elif $input_file.datatype.file_ext == 'bcf'
+  #elif $input_file.is_of_type('bcf')
     #set $input_vcf = 'input' + str($i) + '.bcf.gz'
     ## bgzip -c "$input_file" > $input_vcf &&
     ln -s "$input_file" $input_vcf &&
     #if $input_file.metadata.bcf_index:
       ln -s $input_file.metadata.bcf_index ${input_vcf}.csi &&
-    #else 
+    #else
       bcftools index $input_vcf &&
     #end if
-  #elif $input_file.datatype.file_ext == 'bcfvcf_bgz'
+  #elif $input_file.is_of_type('bcfvcf_bgz')
     ln -s "$input_file" $input_vcf &&
   #end if
   echo '$input_vcf' >> $vcfs_list_file &&
@@ -225,7 +225,7 @@
   </token>
 
   <xml name="macro_apply_filters">
-    <param name="apply_filters" type="text" value="" label="Apply Filters" optional="true" 
+    <param name="apply_filters" type="text" value="" label="Apply Filters" optional="true"
            help="(-f --apply-filters) Skip sites where FILTER column does not contain any of the strings listed (e.g. &quot;PASS,.&quot;)">
       <validator type="regex" message="FILTER terms separated by commas">^([^ \t\n\r\f\v,]+(,[^ \t\n\r\f\v,]+)*)?$</validator>
     </param>
@@ -272,7 +272,7 @@
         </param>
         <when value="__none__"/>
         <when value="regions">
-            <param name="regions" type="text" value="" label="restrict to comma-separated list of regions" optional="true" 
+            <param name="regions" type="text" value="" label="restrict to comma-separated list of regions" optional="true"
                    help="Each region is specifed as: chr or chr:pos or chr:from-to">
                  <validator type="regex" message="">^(\w+(:\d+(-\d+)?)?(,\w+(:\d+(-\d+)?)?)*)?$</validator>
             </param>
@@ -299,7 +299,7 @@
   <token name="@PREPARE_TARGETS_FILE@">
 <![CDATA[
 #set $targets_path = None
-#if 'targets' in $section 
+#if 'targets' in $section
   #if $section.targets.targets_src == 'targets_file':
     #set $targets_path = 'targets_file.tab.gz'
     bgzip -c "$section.targets.targets_file" > $targets_path &&
@@ -331,7 +331,7 @@
         </param>
         <when value="__none__"/>
         <when value="targets">
-            <param name="targets" type="text" value="" label="Restrict to comma-separated list of targets" optional="true" 
+            <param name="targets" type="text" value="" label="Restrict to comma-separated list of targets" optional="true"
                    help="Each target is specifed as: chr or chr:pos or chr:from-to">
                  <validator type="regex" message="">^(\w+(:\d+(-\d+)?)?(,\w+(:\d+(-\d+)?)?)*)?$</validator>
             </param>
@@ -339,7 +339,6 @@
         </when>
         <when value="targets_file">
             <expand macro="macro_targets_file">
-               <optional>true</optional>
             </expand>
         </when>
     </conditional>
@@ -359,15 +358,15 @@
   </token>
 
   <xml name="macro_samples">
-      <param name="samples" type="text" value="" label="Samples" optional="true" 
+      <param name="samples" type="text" value="" label="Samples" optional="true"
              help="(-s) comma separated list of samples to annotate (or exclude with &quot;^&quot; prefix)">
           <validator type="regex" message="">^(\w+(,\w+)*)?$</validator>
       </param>
-      <param name="invert_samples" type="boolean" truevalue="^" falsevalue="" checked="false" label="Invert Samples" 
+      <param name="invert_samples" type="boolean" truevalue="^" falsevalue="" checked="false" label="Invert Samples"
              help="inverts the query/filtering applied by Samples" />
-      <param name="samples_file" type="data" format="tabular" label="Samples File" optional="True" 
+      <param name="samples_file" type="data" format="tabular" label="Samples File" optional="True"
              help="(-S) file of samples to include" />
-      <param name="invert_samples_file" type="boolean" truevalue="^" falsevalue="" checked="false" label="Invert Samples File" 
+      <param name="invert_samples_file" type="boolean" truevalue="^" falsevalue="" checked="false" label="Invert Samples File"
              help="inverts the query/filtering applied by Samples File" />
   </xml>
   <token name="@SAMPLES@">
@@ -417,7 +416,7 @@
   </token>
 
   <xml name="macro_columns">
-    <param name="columns" type="text" value="" label="Columns" optional="true" 
+    <param name="columns" type="text" value="" label="Columns" optional="true"
             help="list of columns in the annotation file, e.g. CHROM,POS,REF,ALT,-,INFO/TAG. See man page for details">
         <validator type="regex" message="COLUMN names  separated by commas">^([^,]+(,[^,]+)*)?$</validator>
     </param>
@@ -444,7 +443,7 @@
 Output Type
 -----------
 
-Output compressed BCF (b), or uncompressed VCF (v). 
+Output compressed BCF (b), or uncompressed VCF (v).
 Use the BCF option when piping between bcftools subcommands to speed up
 performance by removing unecessary compression/decompression
 and VCF<->BCF conversion.