diff macros.xml @ 2:014a21767ac4 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/circos commit 076837a2e9c2b6ececcea4aa286ea7a412387a96"
author iuc
date Tue, 17 Sep 2019 16:54:57 -0400
parents ae9994cf526f
children fd59d783248a
line wrap: on
line diff
--- a/macros.xml	Thu Oct 04 06:05:31 2018 -0400
+++ b/macros.xml	Tue Sep 17 16:54:57 2019 -0400
@@ -1,21 +1,69 @@
 <?xml version="1.0"?>
 <macros>
-  <token name="@WRAPPER_VERSION@">0.9-RC2</token>
+  <token name="@CIRCOS_VERSION@">0.69.8</token>
+
+  <token name="@WRAPPER_VERSION@">@CIRCOS_VERSION@+galaxy1</token>
+
   <xml name="requirements">
       <requirements>
-        <requirement type="package" version="0.69.5">circos</requirement>
+        <requirement type="package" version="@CIRCOS_VERSION@">circos</requirement>
         <requirement type="package" version="2.7">python</requirement>
         <requirement type="package" version="0.6.4">bcbiogff</requirement>
         <requirement type="package" version="1.70">biopython</requirement>
+        <requirement type="package" version="0.3.13">pybigwig</requirement>
+        <requirement type="package" version="0.23">circos-tools</requirement>
+        <yield />
       </requirements>
   </xml>
 
+  <token name="@UTILS@">
+#def circosColor($value)
+    #set $value = str($value)
+    #set $r = int($value[1:3], 16)
+    #set $g = int($value[3:5], 16)
+    #set $b = int($value[5:], 16)
+$r, $g, $b
+#end def
+#def circosColorAlpha($value, $alpha)
+    #set $value = str($value)
+    #set $r = int($value[1:3], 16)
+    #set $g = int($value[3:5], 16)
+    #set $b = int($value[5:], 16)
+    #set $a = float($alpha)
+$r, $g, $b, $a
+#end def
+#def chromosomesToOrder($value)
+    #set $q = ','.join([x if ':' not in x else x[x:x.index(':')] for x in str($value).split(';')])
+    $q
+#end def
+  </token>
+
   <xml name="citations">
     <citations>
         <citation type="doi">10.1101/gr.092759.109</citation>
     </citations>
   </xml>
 
+  <xml name="stroke_opts">
+    <expand macro="circos_color_alpha" name="stroke_color" value="#000000" label="Stroke Color"/>
+    <param name="stroke_thickness" type="integer" value="1" label="Stroke Thickness"/>
+  </xml>
+
+  <xml name="minmax">
+    <conditional name="minmax">
+        <param name="minmax_select" type="select" label="Minimum / maximum options">
+            <option value="yes">Supply min/max values</option>
+            <option value="no" selected="true">Plot all values</option>
+        </param>
+        <when value="yes">
+            <param name="min_value" type="float" value="1.0" label="Minimum value" />
+            <param name="max_value" type="float" value="5.0" label="Maximum value" />
+        </when>
+        <when value="no">
+        </when>
+    </conditional>
+  </xml>
+
   <xml name="circos_color"
       token_label="Color"
       token_name="color"
@@ -31,26 +79,20 @@
     </param>
   </xml>
 
-  <xml name="auto_color"
+  <xml name="circos_color_alpha"
+      token_label="Color"
       token_name="color"
-      token_label="Color">
-    <conditional name="@NAME@" label="@LABEL@">
-      <param name="@NAME@_select" type="select" label="@LABEL@">
-        <option value="automatic" selected="true">Automatic Selection</option>
-        <option value="manual">Manual Specification</option>
-      </param>
-      <when value="automatic">
-      </when>
-      <when value="manual">
-        <param name="@NAME@" label="@LABEL@" type="color" value="#000000">
-          <sanitizer>
-            <valid initial="string.letters,string.digits">
-              <add value="#" />
-            </valid>
-          </sanitizer>
-        </param>
-      </when>
-    </conditional>
+      token_value="#000000"
+      token_help=""
+      >
+    <param label="@LABEL@" type="color" name="@NAME@" value="@VALUE@" help="@HELP@">
+      <sanitizer>
+        <valid initial="string.letters,string.digits">
+          <add value="#" />
+        </valid>
+      </sanitizer>
+    </param>
+    <param name="@NAME@_alpha" type="float" label="Transparency" value="1" min="0" max="1" help="1 = fully opaque, 0 = fully transparent"/>
   </xml>
 
   <xml name="brewer_scale"
@@ -89,7 +131,7 @@
 
       <option value="accent-8-qual">Qualitative: Accent</option>
       <option value="dark2-8-qual">Qualitative: Dark2</option>
-      <option value="paired-12-qual">Qualitative: Paired</option>
+      <option value="paired-12-qual" selected="true">Qualitative: Paired</option>
       <option value="pastel1-9-qual">Qualitative: Pastel1</option>
       <option value="pastel2-8-qual">Qualitative: Pastel2</option>
       <option value="set1-9-qual">Qualitative: Set1</option>
@@ -98,11 +140,26 @@
     </param>
   </xml>
 
+  <xml name="font_select"
+      token_normal="true"
+      token_bold="false">
+    <param name="font" type="select" label="Font">
+      <option value="light">light</option>
+      <option value="normal" selected="@NORMAL@">normal</option>
+      <option value="default">default</option>
+      <option value="semibold">semibold</option>
+      <option value="bold" selected="@BOLD@">bold</option>
+      <option value="italic">italic</option>
+      <option value="bolditalic">bolditalic</option>
+      <option value="italicbold">italicbold</option>
+    </param>
+  </xml>
+
   <xml name="axes">
     <section name="sec_axes" title="Axes">
         <repeat name="axes" title="Axis">
-            <param name="y0" type="float" value="0.0" label="Inside Radius (y0)" help="This is relative to the subplot you are currently in."/>
-            <param name="y1" type="float" value="1" label="Outside Radius (y1)" help="This is relative to the subplot you are currently in."/>
+            <param name="y0" type="float" value="0" min="0" max="1" label="Inside Radius" help="Value must be between 1 (outer edge of track) and 0 (inner edge of the track)"/>
+            <param name="y1" type="float" value="1" min="0" max="1" label="Outside Radius" help="Value must be between 1 (outer edge of track) and 0 (inner edge of the track)"/>
 
             <expand macro="circos_color"/>
             <param name="thickness" type="integer" value="1" label="Thickness"/>
@@ -114,8 +171,8 @@
   <xml name="backgrounds">
     <section name="sec_bkgs" title="Backgrounds">
         <repeat name="backgrounds" title="Background">
-            <param name="y0" type="float" value="0.0" label="Inside Radius (y0)" help="This is relative to the subplot you are currently in."/>
-            <param name="y1" type="float" value="1" label="Outside Radius (y1)" help="This is relative to the subplot you are currently in."/>
+            <param name="y0" type="float" value="0" min="0" max="1" label="Inside Radius" help="Value must be between 1 (outer edge of track) and 0 (inner edge of the track)"/>
+            <param name="y1" type="float" value="1" min="0" max="1" label="Outside Radius" help="Value must be between 1 (outer edge of track) and 0 (inner edge of the track)"/>
             <expand macro="circos_color"/>
         </repeat>
     </section>
@@ -130,8 +187,9 @@
                         <option value="1">Apply to Every Point</option>
                         <option value="on">Check for presence/absence per chromosome</option>
                         <option value="pos">Based on numerical position</option>
+                        <option value="random">Randomly</option>
                         <option value="value">Apply based on point value</option>
-                        <option value="var">Apply based on GFF3 qualifier value (when available)</option>
+                        <option value="var">Apply based on qualifier value (when available)</option>
                     </param>
                     <when value="1">
                     </when>
@@ -139,20 +197,38 @@
                         <param name="on_genomes" type="text" label="Comma separated list of contig IDs"/>
                     </when>
                     <when value="pos">
-                        <param name="pos_gt" type="float" label="Greater than this base" value="1000.0" help="Leave as zero to disable this test"/>
-                        <param name="pos_lt" type="float" label="Less than this base" value="0.0" help="Leave as zero to disable this test"/>
+                        <param name="pos_gt" type="float" label="Greater than this base" optional="true"/>
+                        <param name="pos_lt" type="float" label="Less than this base" optional="true"/>
+                        <param name="pos_lt_sub" type="boolean" truevalue="yes" falsevalue="no" label="Count 'Less than this base' from end of chromosome" />
+                    </when>
+                    <when value="random">
+                        <param name="value" type="float" label="Percentage of bins" value="0.5" min="0" max="1" help="Randomly apply with this probability"/>
                     </when>
                     <when value="value">
-                        <param name="pos_gt" type="float" label="Points above this value" value="0.0" help="Leave as zero to disable this test"/>
-                        <param name="pos_lt" type="float" label="Points below this value" value="0.0" help="Leave as zero to disable this test"/>
+                        <param name="pos_gt" type="float" label="Points above this value" optional="true"/>
+                        <param name="pos_lt" type="float" label="Points below this value" optional="true"/>
                     </when>
                     <when value="var">
                         <param name="varname" type="text" label="Qualifier name"
-                            help="Set to the name of the qualifier in the GFF3 file you wish to compare against" />
+                            help="Set to the name of the qualifier in the file you wish to compare against" />
 
                         <param name="cond_select" type="select" label="Condition">
                             <option value="eq">Equal to (string)</option>
+                            <option value="==">Equal to (numeric)</option>
                             <option value="ne">Not equal to (string)</option>
+                            <option value="!=">Not equal to (numeric)</option>
+                            <option value="&lt;">Less than (numeric)</option>
+                            <option value="&gt;">Greater than (numeric)</option>
+                            <option value="%">Modulus (numeric)</option>
+                            <sanitizer>
+                              <valid initial="string.letters">
+                                <add value="&gt;" />
+                                <add value="&lt;" />
+                                <add value="!" />
+                                <add value="=" />
+                                <add value="%" />
+                              </valid>
+                            </sanitizer>
                         </param>
 
                         <param name="varvalue" type="text" label="Qualifier value to compare against"/>
@@ -165,7 +241,7 @@
                         <option value="show">Change Visibility</option>
                         <option value="fill_color">Change Fill Color for all points</option>
                         <option value="fill_color_value">Change Fill Color based on Value</option>
-                        <option value="color">Change Stroke Color</option>
+                        <option value="stroke_color">Change Stroke Color</option>
                         <option value="color_value">Change Stroke Color based on Value</option>
                     </param>
                     <when value="show">
@@ -174,7 +250,7 @@
                     <when value="fill_color">
                         <expand macro="circos_color" name="action_value" label="Fill Color"/>
                     </when>
-                    <when value="color">
+                    <when value="stroke_color">
                         <expand macro="circos_color" name="action_value" label="Stroke Color"/>
                     </when>
                     <when value="fill_color_value">
@@ -203,7 +279,8 @@
             <repeat name="conditions" title="Conditions to Apply" help="Multiple conditions will be combined using AND">
                 <conditional name="application">
                     <param name="application_select" type="select" label="Condition">
-                        <option value="always">True / Always Applied</option>
+                        <option value="always" selected="true">True / Always Applied</option>
+                        <option value="random">Randomly</option>
                         <option value="interchr">Interchromosomal</option>
                         <option value="intrachr">Intrachromosomal</option>
                         <option value="chr">Chromosome</option>
@@ -256,6 +333,9 @@
                     <when value="interchr"/>
                     <when value="intrachr"/>
                     <when value="always"/>
+                    <when value="random">
+                        <param name="value" type="float" label="Percentage" value="0.5" min="0" max="1" help="Randomly apply with this probability"/>
+                    </when>
                 </conditional>
             </repeat>
             <repeat name="actions" title="Actions to Apply">
@@ -276,7 +356,7 @@
                                 <option value="dynamic">Dynamic: Change is sometimes applied</option>
                             </param>
                             <when value="static">
-                                <expand macro="circos_color" label="Link Color" name="action_value"/>
+                                <expand macro="circos_color_alpha" label="Link Color" name="action_value"/>
                             </when>
                             <when value="dynamic">
                                 <expand macro="brewer_scale" label="Fill Color" name="action_value"/>
@@ -339,7 +419,7 @@
         </param>
         <!-- TODO select chromosome from metadata/file column instead of text fields -->
         <when value="on">
-            <param name="compval" value="chr1" type="text" label="Chromosome"/>
+            <param name="compval" value="chr1" type="text" label="Chromosome" help="Comma separated values are supported in this field"/>
         </when>
         <when value="from">
             <param name="compval" value="chr1" type="text" label="Chromosome"/>