diff loadandplot.xml @ 76:7dcc25a1a062 draft

Uploaded 20170620
author fabio
date Tue, 20 Jun 2017 12:57:03 -0400
parents 2bb6b44093ba
children dc2707da8ba4
line wrap: on
line diff
--- a/loadandplot.xml	Mon Jun 19 12:09:26 2017 -0400
+++ b/loadandplot.xml	Tue Jun 20 12:57:03 2017 -0400
@@ -3,7 +3,7 @@
   <macros>
     <import>macros.xml</import>
   </macros>
-  <expand macro="requirements" />
+  <!--<expand macro="requirements" />-->
 
   <command detect_errors="exit_code">
 <![CDATA[
@@ -36,28 +36,25 @@
       #if $conditionaltype.smoothing == 'no':
         alignment="'${conditionaltype.alignment}'"
       #elif $conditionaltype.smoothing == 'locpoly':
-        alignment="'${conditionaltype.locpolyconditionalscale.alignment}'"
-        #if $conditionaltype.locpolyconditionalscale.alignment == 'scale':
-          scale='${conditionaltype.locpolyconditionalscale.scalegrid}'
-        #end if
         bandwidth='${conditionaltype.locpolybandwidth}'
         degree='${conditionaltype.locpolydegree}'
-        fill_gaps='${conditionaltype.fillgaps}'
+        alignment="'${conditionaltype.conditionalscale.alignment}'"
       #elif $conditionaltype.smoothing == 'kernel':
-        alignment="'${conditionaltype.kernelconditionalscale.alignment}'"
-        #if $conditionaltype.kernelconditionalscale.alignment == 'scale':
-          scale='${conditionaltype.kernelconditionalscale.scalegrid}'
-        #end if
         bandwidth='${conditionaltype.kernelbandwidth}'
-        fill_gaps='${conditionaltype.fillgaps}'
+        alignment="'${conditionaltype.conditionalscale.alignment}'"
       #elif $conditionaltype.smoothing == 'splines':
-        alignment="'${conditionaltype.splinesconditionalscale.alignment}'"
-        #if $conditionaltype.splinesconditionalscale.alignment == 'scale':
-          scale='${conditionaltype.splinesconditionalscale.scalegrid}'
-        #end if
         degree='${conditionaltype.splinesdegree}'
         dist_knots='${conditionaltype.splinesdistknots}'
-        fill_gaps='${conditionaltype.fillgaps}'
+        alignment="'${conditionaltype.conditionalscale.alignment}'"
+      #end if
+
+      #if $conditionaltype.smoothing != 'no':
+        #if $conditionaltype.conditionalscale.alignment == 'scale':
+          scale='${conditionaltype.conditionalscale.scalegrid}'
+          fill_gaps='TRUE'
+        #else
+          fill_gaps='${conditionaltype.conditionalscale.fillgaps}'
+        #end if
       #end if
 
       average='${plotres.average}'
@@ -104,101 +101,33 @@
       </param>
       <!-- conditional choice: smoothing=no -->
       <when value="no">
-        <param name="alignment" type="select" label="Region alignment" help="">
-          <option value="center">Center - Alignment on the central position</option>
-          <option value="left">Left - Alignment on the starting position</option>
-          <option value="right">Right - Alignment on the ending position</option>
-        </param>
+        <expand macro="alignment" />
       </when>
       <!-- conditional choice: smoothing=locpoly -->
       <when value="locpoly">
-        <!-- conditional region alignment -->
-        <conditional name="locpolyconditionalscale">
-          <param name="alignment" type="select" label="Region alignment" help="">
-            <option value="center">Center - Alignment on the central position</option>
-            <option value="left">Left - Alignment on the starting position</option>
-            <option value="right">Right - Alignment on the ending position</option>
-            <option value="scale">Scale - Scaling all regions to the same length</option>
-          </param>
-          <when value="scale">
-            <param name="scalegrid" type="integer" value="0" min="0" label="Number of grid points" help="Number of equally-spaced grid points over which the smoothed curves are evaluated." />
-          </when>
-        </conditional>
-
         <param name="locpolybandwidth" type="integer" value="5" min="2" label="Bandwidth for smoothing" help="" />
         <param name="locpolydegree" type="integer" value="3" min="0" label="Degree of local polynomial" help="" />
-
-        <!-- fill gaps -->
-        <param name="fillgaps" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="True" label="Use smoothing to fill gaps (NA measurements)" help="" />
+        <!-- conditional region alignment -->
+        <expand macro="alignment-s" />
       </when>
       <!-- conditional choice: smoothing=kernel -->
       <when value="kernel">
+        <param name="kernelbandwidth" type="integer" value="5" min="2" label="Bandwidth for smoothing" help="" />
         <!-- conditional region alignment -->
-        <conditional name="kernelconditionalscale">
-          <param name="alignment" type="select" label="Region alignment" help="">
-            <option value="center">Center - Alignment on the central position</option>
-            <option value="left">Left - Alignment on the starting position</option>
-            <option value="right">Right - Alignment on the ending position</option>
-            <option value="scale">Scale - Scaling all regions to the same length</option>
-          </param>
-          <when value="scale">
-            <param name="scalegrid" type="integer" value="0" min="0" label="Number of grid points" help="Number of equally-spaced grid points over which the smoothed curves are evaluated." />
-          </when>
-        </conditional>
-
-        <param name="kernelbandwidth" type="integer" value="5" min="2" label="Bandwidth for smoothing" help="" />
-
-        <!-- fill gaps -->
-        <param name="fillgaps" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="True" label="Use smoothing to fill gaps (NA measurements)" help="" />
+        <expand macro="alignment-s" />
       </when>
       <!-- conditional choice: smoothing=splines -->
       <when value="splines">
-        <!-- conditional region alignment -->
-        <conditional name="splinesconditionalscale">
-          <param name="alignment" type="select" label="Region alignment" help="">
-            <option value="center">Center - Alignment on the central position</option>
-            <option value="left">Left - Alignment on the starting position</option>
-            <option value="right">Right - Alignment on the ending position</option>
-            <option value="scale">Scale - Scaling all regions to the same length</option>
-          </param>
-          <when value="scale">
-            <param name="scalegrid" type="integer" value="0" min="0" label="Number of grid points" help="Number of equally-spaced grid points over which the smoothed curves are evaluated." />
-          </when>
-        </conditional>
-
         <param name="splinesdegree" type="integer" value="3" min="0" label="Degree of B-splines" help="" />
         <param name="splinesdistknots" type="integer" value="10" min="2" label="Distance between nodes (approximate)" help="" />
-
-        <!-- fill gaps -->
-        <param name="fillgaps" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="True" label="Use smoothing to fill gaps (NA measurements)" help="" />
+        <!-- conditional region alignment -->
+        <expand macro="alignment-s" />
       </when>
     </conditional>
 
     <!-- plot IWTomics results -->
     <section name="plotres" title="Plot data" expanded="True">
-      <!-- average -->
-      <param name="average" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="True" label="Plot the mean curves" help="" />
-      <!-- sample size in each position -->
-      <param name="size" type="boolean" truevalue="TRUE" falsevalue="FALSE" checked="True" label="Plot sample size in each position" help="" />
-      <!-- conditional plot type -->
-      <conditional name="conditionalplottype">
-        <!-- plot type -->
-        <param name="plottype" type="select" label="Plot type" help="">
-          <option value="boxplot">Pointwise quantile curves (boxplot)</option>
-          <option value="curves">Curves (aligned)</option>
-        </param>
-        <!-- conditional choice: plottype=boxplot -->
-        <when value="boxplot">
-          <section name="probabilitiessection" title="Probabilities" expanded="True" help="Probabilities corresponding to the quantile curves to be drawn.">
-            <param name="prob0" size="3" type="float" value="0.25" min="0.0" max="1.0" label="Probability" />
-            <param name="prob1" size="3" type="float" value="0.5" min="0.0" max="1.0" label="Probability" />
-            <param name="prob2" size="3" type="float" value="0.75" min="0.0" max="1.0" label="Probability" />
-            <repeat name="probabilities" title="Probabilities">
-              <param name="prob" size="3" type="float" value="0.5" min="0.0" max="1.0" label="Probability" />
-            </repeat>
-          </section>
-        </when>
-      </conditional>
+      <expand macro="plot-params" />
     </section>
   </inputs>