diff hicPlotMatrix.xml @ 19:7babd8a46fe0 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/hicexplorer commit 2a0943e78bdc8ebb13f181399206a9eea37ed78f"
author iuc
date Tue, 16 Mar 2021 15:24:48 +0000
parents b553d14a7845
children 9939786dd9c9
line wrap: on
line diff
--- a/hicPlotMatrix.xml	Fri Dec 11 21:10:25 2020 +0000
+++ b/hicPlotMatrix.xml	Tue Mar 16 15:24:48 2021 +0000
@@ -1,4 +1,4 @@
-<tool id="hicexplorer_hicplotmatrix" name="@BINARY@" version="@WRAPPER_VERSION@.0">
+<tool id="hicexplorer_hicplotmatrix" name="@BINARY@" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@">
     <description>plot a Hi-C contact matrix heatmap</description>
     <macros>
         <token name="@BINARY@">hicPlotMatrix</token>
@@ -15,8 +15,6 @@
         #end if
         ln -s $matrix_h5_cooler matrix.$matrix_h5_cooler.ext &&
         @BINARY@
-
-
             --matrix 'matrix.$matrix_h5_cooler.ext'
 
             #if $title and $title is not None:
@@ -91,6 +89,14 @@
                 --rotationY $rotationY
             #end if
 
+            #if $increaseFigureWidth:
+                --increaseFigureWidth $increaseFigureWidth
+            #end if
+
+            #if $increaseFigureHeight:
+                --increaseFigureHeight $increaseFigureHeight
+            #end if
+
             #if $loops:
                 --loops '$loops'
             #end if
@@ -100,35 +106,38 @@
     <inputs>
         <expand macro='matrix_h5_cooler_macro' />
 
-        <param argument="--title" type="text" optional="true" label="Plot title"/>
-        <param argument="--scoreName" type="text" optional="true" label="Score name" help="The label for the heatmap legend."/>
-        <param argument="--perChromosome" type="boolean" truevalue="--perChromosome" falsevalue="" checked="false"
-            label="Plot per chromosome"
-            help="Instead of plotting the whole matrix each chromosome is plotted next to the other. This parameter is not compatible with --region" />
-        <param argument="--clearMaskedBins" type="boolean" truevalue="--clearMaskedBins" falsevalue="" checked="false"
-            label="Remove masked bins from the matrix"  />
+        <param argument="--title" type="text" optional="true" label="Plot title">
+            <validator type="expression" message="Only alphanumeric characters and a space are allowed.">value.isalnum()</validator>
+        </param>
+        <param argument="--scoreName" type="text" optional="true" label="Score name" help="The label for the heatmap legend.">
+            <validator type="expression" message="Only alphanumeric characters and a space are allowed.">value.isalnum()</validator>
+        </param>
+        <param argument="--perChromosome" type="boolean" truevalue="--perChromosome" falsevalue="" checked="false" label="Plot per chromosome" help="Instead of plotting the whole matrix each chromosome is plotted next to the other. This parameter is not compatible with --region" />
+        <param argument="--clearMaskedBins" type="boolean" truevalue="--clearMaskedBins" falsevalue="" checked="false" label="Remove masked bins from the matrix" />
 
-        <repeat name="chromosomeOrder" min="0" title="Chromosomes to include (and order to plot in):"
-            help="This option overrides --region and --region2" >
-            <param name="chromosome" type="text" >
+        <repeat name="chromosomeOrder" min="0" title="Chromosomes to include (and order to plot in):" help="This option overrides --region and --region2">
+            <param name="chromosome" type="text">
                 <validator type="empty_field" />
             </param>
         </repeat>
 
-        <param argument="--region" type="text" optional="True" label="Plot only this region"
-            help="The format is chr:start-end The plotted region contains the main diagonal and is symmetric unless  --region2 is given"/>
-        <param argument="--region2" type="text" optional="True" label="Region two to plot"
-            help="If given then only the region defined by --region and --region2 is plotted. The format is the same as --region"/>
-        <param argument="--log1p" type="boolean" truevalue="--log1p" falsevalue="" checked="false" label="Plot the log1p of the matrix values (log(Hi-C contacts+1)). This option is recommended."/>
-        <param argument="--log" type="boolean" truevalue="--log" falsevalue="" checked="false" label="Plot the log of the matrix values. (log(Hi-C contacts))"/>
-        <param argument="--fontSize" type="integer" optional="true" label="Font size" help="Fontsize in the plot for x and y axis."/>
-        <param argument="--rotationX" type="integer" optional="true" label="Rotate x-labels by degree" help="Rotation in degrees for the labels of x-axis."/>
-        <param argument="--rotationY" type="integer" optional="true" label="Rotate y-labels by degree" help="Rotation in degrees for the labels of y-axis."/>
-
+        <param argument="--region" type="text" optional="True" label="Plot only this region" help="The format is chr:start-end The plotted region contains the main diagonal and is symmetric unless  --region2 is given">
+            <validator type="expression" message="Only alphanumeric characters, the colon or a dash are allowed.">value.replace(':', '').replace('-', '').isalnum()</validator>
+        </param>
+        <param argument="--region2" type="text" optional="True" label="Region two to plot" help="If given then only the region defined by --region and --region2 is plotted. The format is the same as --region">
+            <validator type="expression" message="Only alphanumeric characters, the colon or a dash are allowed.">value.replace(':', '').replace('-', '').isalnum()</validator>
+        </param>
+        <param argument="--log1p" type="boolean" truevalue="--log1p" falsevalue="" checked="false" label="Plot the log1p of the matrix values (log(Hi-C contacts+1)). This option is recommended." />
+        <param argument="--log" type="boolean" truevalue="--log" falsevalue="" checked="false" label="Plot the log of the matrix values. (log(Hi-C contacts))" />
+        <param argument="--fontSize" type="integer" optional="true" label="Font size" help="Fontsize in the plot for x and y axis." />
+        <param argument="--rotationX" type="integer" optional="true" label="Rotate x-labels by degree" help="Rotation in degrees for the labels of x-axis." />
+        <param argument="--rotationY" type="integer" optional="true" label="Rotate y-labels by degree" help="Rotation in degrees for the labels of y-axis." />
+        <param argument="--increaseFigureWidth" type="float" value='0.5' optional="true" label="Increase figure width size" help="Plotting additional bigwig tracks can cause compression in x or y direction of the heatmap. Set this factor to a value unequal to 0 to correct this." />
+        <param argument="--increaseFigureHeight" type="float" value='0.5' optional="true" label="Increase figure height size" help="Plotting additional bigwig tracks can cause compression in x or y direction of the heatmap. Set this factor to a value unequal to 0 to correct this." />
         <expand macro="colormap" />
 
-        <param argument="--vMin" type="float" optional="true" label="vMin" help="Minimum value of the plotted score."/>
-        <param argument="--vMax" type="float" optional="true" label="vMax" help="Maximum value of the plotted score."/>
+        <param argument="--vMin" type="float" optional="true" label="vMin" help="Minimum value of the plotted score." />
+        <param argument="--vMax" type="float" optional="true" label="vMax" help="Maximum value of the plotted score." />
 
         <conditional name="pca_conditional">
             <param name='pca_type' label='Datatype of eigenvector file' type='select'>
@@ -137,25 +146,21 @@
             </param>
             <when value='' />
             <when value='bigwig'>
-                <param name='pca_bigwig'  type="data" format="bigwig"
-                            label="Eigenvector file"/>
-                <param argument="--vMinBigwig" type="float" optional="true" label="vMinBigwig" help="Minimum value of the plotted bigwig score."/>
-                <param argument="--vMaxBigwig" type="float" optional="true" label="vMaxBigwig" help="Maximum value of the plotted bigwig score."/>
+                <param name='pca_bigwig' type="data" format="bigwig" label="Eigenvector file" />
+                <param argument="--vMinBigwig" type="float" optional="true" label="vMinBigwig" help="Minimum value of the plotted bigwig score." />
+                <param argument="--vMaxBigwig" type="float" optional="true" label="vMaxBigwig" help="Maximum value of the plotted bigwig score." />
                 <param name='flipBigwigSign' type='boolean' optional="true" truevalue='--flipBigwigSign' falsevalue='' label='Flip the sign of the bigwig values' />
-                <param argument="--scaleFactorBigwig" type="float" optional="true" label="Scale factor for bigwig" help="Scale the bigwig values by a factor."/>
+                <param argument="--scaleFactorBigwig" type="float" optional="true" label="Scale factor for bigwig" help="Scale the bigwig values by a factor." />
                 <param name='bigwigAdditionalVerticalAxis' type='boolean' optional="true" truevalue='--bigwigAdditionalVerticalAxis' falsevalue='' label='Plot an additional vertical axis.' />
-
-
             </when>
         </conditional>
-        <param name='loops' type="data" format="interval" optional='True' label="Add detected loops"/>
+        <param name='loops' type="data" format="interval" optional='True' label="Add detected loops" />
         <param name="image_file_format" type="select" label="Image output format">
             <option value="png" selected="True">png</option>
             <option value="svg">svg</option>
             <option value="pdf">pdf</option>
-
         </param>
-        <param name='dpi' type='integer' label='DPI for image' help='Change the default resolution of the plot.' optional='true'/>
+        <expand macro="dpi" />
     </inputs>
     <outputs>
         <data format="png" name="outFileName" from_work_dir="plot" label="${tool.name} on ${matrix_h5_cooler.name} [${on_string}]: Plot">
@@ -167,51 +172,49 @@
     </outputs>
     <tests>
         <test>
-            <param name="matrix_h5_cooler" value="small_test_matrix.h5"/>
+            <param name="matrix_h5_cooler" value="small_test_matrix.h5" />
             <conditional name="pca_conditional">
-                <param name="pca_type" value=''/>
+                <param name="pca_type" value='' />
             </conditional>
-            <param name="region" value="chr2L:3000000-3500000"/>
-            <param name="region2" value="chr2L:3100000-3600000"/>
-            <param name="log1p" value="True"/>
-            <param name="clearMaskedBins" value="True"/>
+            <param name="region" value="chr2L:3000000-3500000" />
+            <param name="region2" value="chr2L:3100000-3600000" />
+            <param name="log1p" value="True" />
+            <param name="clearMaskedBins" value="True" />
             <param name="image_file_format" value="png" />
             <param name="dpi" value="10" />
 
-            <output name="outFileName" file="hicPlotMatrix/plot1.png" ftype="png" compare="sim_size"/>
+            <output name="outFileName" file="hicPlotMatrix/plot1.png" ftype="png" compare="sim_size" />
         </test>
         <test>
-            <param name="matrix_h5_cooler" value="small_test_matrix.cool"/>
-            <param name="region" value="chr2L:3000000-3500000"/>
-
+            <param name="matrix_h5_cooler" value="small_test_matrix.cool" />
+            <param name="region" value="chr2L:3000000-3500000" />
             <conditional name="pca_conditional">
-                <param name="pca_type" value=''/>
+                <param name="pca_type" value='' />
             </conditional>
             <param name="image_file_format" value="pdf" />
             <param name="dpi" value="10" />
-
-            <output name="outFileName" file="hicPlotMatrix/plot2.pdf" ftype="pdf" compare="sim_size"/>
+            <output name="outFileName" file="hicPlotMatrix/plot2.pdf" ftype="pdf" compare="sim_size" />
         </test>
         <test>
-            <param name="matrix_h5_cooler" value="small_test_matrix.cool"/>
+            <param name="matrix_h5_cooler" value="small_test_matrix.cool" />
             <conditional name="pca_conditional">
-                <param name="pca_type" value='bigwig'/>
-                <param name="pca_bigwig" value="hicPCA/pca1_test1.bw"/>
-                <param name='vMinBigwig' value='10'/>
-                <param name='vMaxBigwig' value='20'/>
-                <param name='scaleFactorBigwig' value='2000'/>
-                <param name='flipBigwigSign' value='True'/>
+                <param name="pca_type" value='bigwig' />
+                <param name="pca_bigwig" value="hicPCA/pca1_test1.bw" />
+                <param name='vMinBigwig' value='10' />
+                <param name='vMaxBigwig' value='20' />
+                <param name='scaleFactorBigwig' value='2000' />
+                <param name='flipBigwigSign' value='True' />
             </conditional>
-            <param name='colormap' value='hot'/>
-            <param name="region" value="chr2L:3000000-3500000"/>
+            <param name='colormap' value='hot' />
+            <param name="region" value="chr2L:3000000-3500000" />
             <param name="dpi" value="10" />
 
             <param name="image_file_format" value="svg" />
-            <output name="outFileName" file="hicPlotMatrix/plot3_pca.svg" ftype="svg" compare="sim_size" delta="35000"/>
+            <output name="outFileName" file="hicPlotMatrix/plot3_pca.svg" ftype="svg" compare="sim_size" />
         </test>
-
     </tests>
     <help><![CDATA[
+
 Contact matrix plot
 =======================
 
@@ -248,6 +251,6 @@
 
 .. _readthedocs.io: http://hicexplorer.readthedocs.io/en/latest/index.html
 .. _Colormaps: https://matplotlib.org/examples/color/colormaps_reference.html
-]]></help>
+]]>    </help>
     <expand macro="citations" />
 </tool>