diff macros.xml @ 34:dde39ba9c031 draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit b68002321ade5e160c556517a98ffb70f068be95
author iuc
date Mon, 29 Apr 2019 05:55:48 -0400
parents 4f7a5ccd2ae9
children b28e0cfa7ba1
line wrap: on
line diff
--- a/macros.xml	Mon Dec 17 14:23:31 2018 -0500
+++ b/macros.xml	Mon Apr 29 05:55:48 2019 -0400
@@ -1,14 +1,14 @@
 <macros>
     <xml name="requirements">
         <requirements>
-            <requirement type="package" version="@WRAPPER_VERSION@">bedtools</requirement>
+            <requirement type="package" version="@TOOL_VERSION@">bedtools</requirement>
             <yield/>
         </requirements>
     </xml>
-    <token name="@WRAPPER_VERSION@">2.27.1</token>
+    <token name="@TOOL_VERSION@">2.27.1</token>
     <token name="@SAMTOOLS_VERSION@">1.9</token>
     <token name="@STD_BEDTOOLS_INPUTS@">bed,bedgraph,gff,vcf</token>
-    <token name="@STD_BEDTOOLS_INPUT_LABEL@">bed,bedgraph,gff,vcf</token>
+    <token name="@STD_BEDTOOLS_INPUT_LABEL@">BED/bedGraph/GFF/VCF</token>
     <xml name="stdio">
         <stdio>
             <!-- Anything other than zero is an error -->
@@ -22,44 +22,49 @@
     </xml>
     <xml name="reciprocal">
         <param name="reciprocal" argument="-r" type="select" label="Require that the fraction of overlap be reciprocal for A and B" help="In other words, if -f is 0.90 and -r is used, this requires that B overlap at least 90% of A and that A also overlaps at least 90% of B.">
-            <option value="" selected="True">No</option>
+            <option value="" selected="true">No</option>
             <option value="-r">Yes</option>
         </param>
     </xml>
-    <xml name="overlap">
-        <param name="overlap" argument="-f" type="float" value="0.000000001" label="Minimum overlap required as a fraction of A" help="Default is 1E-9, i.e. 1bp."/>
+    <xml name="fraction" token_name="" token_argument="" token_label="" token_help="" >
+        <param name="@NAME@" argument="@ARGUMENT@" type="float" min="0" max="1" optional="true" label="@LABEL@" help="@HELP@" />
+    </xml>
+    <xml name="overlap" token_name="overlap" token_argument="-f" token_fracof="A">
+        <expand macro="fraction" name="@NAME@" argument="@ARGUMENT@" label="Minimum overlap required as a fraction of @FRACOF@" help="Default is 1E-9, i.e. 1bp."/>
     </xml>
-    <xml name="overlapB">
-        <param name="overlapB" argument="-F" type="float" value="0.000000001" label="Minimum overlap required as a fraction of A" help="Default is 1E-9, i.e. 1bp."/>
-    </xml>
+    <token name="@OVERLAP@"><![CDATA[
+        #if str($overlap):
+            -f $overlap
+        #end if
+    ]]></token>
     <xml name="strand2">
         <param name="strand" type="select" label="Calculation based on strandedness?">
-            <option value="" selected="True">Overlaps on either strand</option>
+            <option value="" selected="true">Overlaps on either strand</option>
             <option value="-s">Only overlaps occurring on the **same** strand.</option>
             <option value="-S">Only overlaps occurring on the **opposite** strand.</option>
         </param>
     </xml>
     <xml name="seed">
         <conditional name="seed">
-            <param name="seed_choose" type="select" label="Choose Seed?" help="(-seed)">
-                <option value="False" selected="True">Random Shuffling</option>
+            <param name="seed_choose" type="select" label="Choose Seed?">
+                <option value="False" selected="true">Random Shuffling</option>
                 <option value="True">Choose fixed seed</option>
             </param>
             <when value="True">
-                <param name="seed" type="integer" value="12345" label="Enter Seed" />
+                <param argument="-seed" type="integer" value="12345" label="Enter Seed" />
             </when>
             <when value="False" />
         </conditional>
     </xml>
     <xml name="split">
-        <param name="split" type="boolean" checked="false" truevalue="-split" falsevalue=""
+        <param argument="-split" type="boolean" truevalue="-split" falsevalue="" checked="false"
             label="Treat split/spliced BAM or BED12 entries as distinct BED intervals when computing coverage."
-            help="If set, the coverage will be calculated based the spliced intervals only. For BAM files, this inspects the CIGAR N operation to infer the blocks for computing coverage. For BED12 files, this inspects the BlockCount, BlockStarts, and BlockEnds fields (i.e., columns 10,11,12). If this option is not set, coverage will be calculated based on the interval's START/END coordinates, and would include introns in the case of RNAseq data. (-split)" />
+            help="If set, the coverage will be calculated based the spliced intervals only. For BAM files, this inspects the CIGAR N operation to infer the blocks for computing coverage. For BED12 files, this inspects the BlockCount, BlockStarts, and BlockEnds fields (i.e., columns 10,11,12). If this option is not set, coverage will be calculated based on the interval's START/END coordinates, and would include introns in the case of RNAseq data." />
     </xml>
     <xml name="input_conditional_genome_file">
         <conditional name="genome_file_opts">
             <param name="genome_file_opts_selector" type="select" label="Genome file">
-                <option value="loc" selected="True">Locally installed Genome file</option>
+                <option value="loc" selected="true">Locally installed Genome file</option>
                 <option value="hist">Genome file from your history</option>
             </param>
             <when value="loc">
@@ -107,38 +112,38 @@
 #end if
     </token>
     <token name="@GENOME_FILE_COVERAGE@">
-#if $input_type.input_type_select == "bed":
+#if $input_type.input_type_select == "bam":
+    -ibam '$input_type.input'
+#else:
     -i '$input_type.input'
     #if $input_type.genome_file_opts.genome_file_opts_selector == "loc":
         -g '$input_type.genome_file_opts.genome.fields.len_path'
     #elif $input_type.genome_file_opts.genome_file_opts_selector == "hist":
         -g '$input_type.genome_file_opts.genome'
     #end if
-#elif $input_type.input_type_select == "bam":
-    -ibam '$input_type.input'
 #end if
     </token>
     <xml name="closest_D_option">
-        <param name="iu" type="boolean" checked="false" truevalue="-iu" falsevalue=""
+        <param argument="-iu" type="boolean" truevalue="-iu" falsevalue="" checked="false"
             label="Ignore features in B that are upstream of features in A"
-            help="This option requires -D and follows its orientation rules for determining what is 'upstream'. (-iu)" />
+            help="This option requires -D and follows its orientation rules for determining what is 'upstream'" />
 
-        <param name="id" type="boolean" checked="false" truevalue="-id" falsevalue=""
+        <param argument="-id" type="boolean" truevalue="-id" falsevalue="" checked="false"
             label="Ignore features in B that are downstream of features in A"
-            help="This option requires -D and follows its orientation rules for determining what is 'downstream'. (-id)" />
+            help="This option requires -D and follows its orientation rules for determining what is 'downstream'" />
 
-        <param name="fu" type="boolean" checked="false" truevalue="-fu" falsevalue=""
+        <param argument="-fu" type="boolean" truevalue="-fu" falsevalue="" checked="false"
             label="Choose first from features in B that are upstream of features in A"
-            help="This option requires -D and follows its orientation rules for determining what is 'upstream'. (-fu)" />
+            help="This option requires -D and follows its orientation rules for determining what is 'upstream'" />
 
-        <param name="fd" type="boolean" checked="false" truevalue="-fd" falsevalue=""
+        <param argument="-fd" type="boolean" truevalue="-fd" falsevalue="" checked="false"
             label="Choose first from features in B that are downstream of features in A"
-            help="This option requires -D and follows its orientation rules for determining what is 'downstream'. (-fd)" />
+            help="This option requires -D and follows its orientation rules for determining what is 'downstream'" />
     </xml>
     <xml name="addition">
         <conditional name="addition">
             <param name="addition_select" type="select" label="Choose what you want to do">
-                <option value="b" selected="True">Increase the @STD_BEDTOOLS_INPUT_LABEL@ entry by the same number base pairs in each direction.</option>
+                <option value="b" selected="true">Increase the @STD_BEDTOOLS_INPUT_LABEL@ entry by the same number base pairs in each direction.</option>
                 <option value="lr">Increase by Start Coordinate and End Coordinate</option>
             </param>
             <when value="b">
@@ -151,8 +156,8 @@
         </conditional>
     </xml>
     <xml name="print_header">
-        <param name="header" type="boolean" checked="False" truevalue="-header" falsevalue=""
-            label="Print the header from the A file prior to results" help="(-header)" />
+        <param argument="-header" type="boolean" truevalue="-header" falsevalue="" checked="false"
+            label="Print the header from the A file prior to results" />
     </xml>
     <!-- TODO this is currently not used, but we should make use of it -->
     <xml name="genome_validator">
@@ -162,9 +167,9 @@
 
     <!-- ToDo column_picker -->
     <xml name="choose_columns">
-        <param name="cols" type="text" value=""
+        <param name="cols" argument="-c" type="text" value=""
             label="Specify the column(s) that should be summarized"
-            help="comma separated (-c)">
+            help="Comma separated">
             <sanitizer invalid_char="">
                 <valid initial="string.digits"><add value=","/></valid>
             </sanitizer>
@@ -201,7 +206,7 @@
     </xml>
 
     <xml name="math_options">
-        <option value="sum" selected="True">Sum - numeric only</option>
+        <option value="sum" selected="true">Sum - numeric only</option>
         <option value="min">Min - numeric only</option>
         <option value="max">Max - numeric only</option>
         <option value="absmin">AbsMin - numeric only</option>