diff hicPlotMatrix.xml @ 21:b63363075c2e draft

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/hicexplorer commit 07802a6bd441d9da888cfb8283f8c2135704f7c9
author iuc
date Wed, 18 Oct 2023 11:11:47 +0000
parents 9939786dd9c9
children 12d51d7be66f
line wrap: on
line diff
--- a/hicPlotMatrix.xml	Tue Jan 10 19:21:37 2023 +0000
+++ b/hicPlotMatrix.xml	Wed Oct 18 11:11:47 2023 +0000
@@ -10,7 +10,7 @@
         #if str($pca_conditional.pca_type) == 'bigwig':
             ln -s '$pca_conditional.pca_bigwig' pca.bw &&
             #set $pca = '--bigwig pca.bw'
-        #elif str($pca_conditional.pca_type) == '':
+        #elif str($pca_conditional.pca_type) == 'no_file':
             #set $pca = ''
         #end if
         ln -s $matrix_h5_cooler matrix.$matrix_h5_cooler.ext &&
@@ -97,14 +97,19 @@
                 --increaseFigureHeight $increaseFigureHeight
             #end if
 
-            #if $loops:
-                --loops '$loops'
+            #if str($loop_conditional.loop_selector) == 'yes':
+                    --loops $loop_conditional.loops
+                    --loopLargeRegionsOperation $loop_conditional.loops_large_selector
+            #end if
+
+            #if $tads:
+                --tads '$tads'
             #end if
         && mv plot.$image_file_format plot
 ]]>
     </command>
     <inputs>
-        <expand macro='matrix_h5_cooler_macro' />
+        <expand macro="matrix_h5_cooler_macro" />
 
         <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>
@@ -132,29 +137,47 @@
         <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." />
+        <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." />
 
         <conditional name="pca_conditional">
-            <param name='pca_type' label='Datatype of eigenvector file' type='select'>
-                <option value='' selected="true">None</option>
-                <option value='bigwig'>bigwig</option>
+            <param name="pca_type" label="Datatype of eigenvector file" type="select">
+                <option value="no_file" selected="true">No file</option>
+                <option value="bigwig">bigwig</option>
             </param>
-            <when value='' />
-            <when value='bigwig'>
-                <param name='pca_bigwig' type="data" format="bigwig" label="Eigenvector file" />
+            <when value="no_file" />
+            <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='flipBigwigSign' type='boolean' optional="true" truevalue='--flipBigwigSign' falsevalue='' label='Flip the sign of the bigwig values' />
+                <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 name='bigwigAdditionalVerticalAxis' type='boolean' optional="true" truevalue='--bigwigAdditionalVerticalAxis' falsevalue='' label='Plot an additional vertical axis.' />
+                <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" />
+        <conditional name="loop_conditional">
+            <param name="loop_selector" type="select" label="Plot loops">
+                <option value="yes">Yes</option>
+                <option value="no" selected="True">No</option>
+            </param>
+            <when value="yes">
+                <param name="loops" type="data" format="interval" optional="True" label="Add detected loops" />
+                <param name="loops_large_selector" label="Start bin of the loop for plotting" type="select">
+                    <option value="first" selected="true">First</option>
+                    <option value="center">Center</option>
+                    <option value="last">Last</option>
+                </param>
+            </when>
+            <when value="no" />
+
+        </conditional>
+        <param name="loops" type="data" format="interval" optional="True" label="Add detected loops" />
+        <param name="tads" type="data" format="interval" optional="True" label="Add detected tads" />
+
         <param name="image_file_format" type="select" label="Image output format">
             <option value="png" selected="True">png</option>
             <option value="svg">svg</option>
@@ -174,7 +197,7 @@
         <test>
             <param name="matrix_h5_cooler" value="small_test_matrix.h5" />
             <conditional name="pca_conditional">
-                <param name="pca_type" value='' />
+                <param name="pca_type" value="no_file" />
             </conditional>
             <param name="region" value="chr2L:3000000-3500000" />
             <param name="region2" value="chr2L:3100000-3600000" />
@@ -189,7 +212,7 @@
             <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="no_file" />
             </conditional>
             <param name="image_file_format" value="pdf" />
             <param name="dpi" value="10" />
@@ -198,14 +221,14 @@
         <test>
             <param name="matrix_h5_cooler" value="small_test_matrix.cool" />
             <conditional name="pca_conditional">
-                <param name="pca_type" value='bigwig' />
+                <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="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="colormap" value="hot" />
             <param name="region" value="chr2L:3000000-3500000" />
             <param name="dpi" value="10" />
 
@@ -240,7 +263,7 @@
 
 Contact matrix of *Drosophila melanogaster* embryos visualized using **hicPlotMatrix**. Hi-C matrix bins were merged to a 25 kb bin size using ``hicMergeMatrixBins`` and the matrix has then been corrected using ``hicCorrectMatrix`` before plotting.
 
-Another example is available below using Hi-C data published by `Lieberman-Aiden <https://doi.org/10.1126/science.1181369>`_ in 2009, (`GSE18199 <https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE18199>`_). A Hi-C contact matrix has been plotted with the ``--perChr`` option and the first eigenvector (pca1) computed by ``hicPCA``. For this plot a pearson correlated matrix was used, which is computed by first creating an observed / expected matrix and then a pearson correlation matrix with ``hicTransform``.
+Another example is available below using Hi-C data published by `Lieberman-Aiden <https://pubmed.ncbi.nlm.nih.gov/19815776/>`_ in 2009, (`GSE18199 <https://www.ncbi.nlm.nih.gov/geo/query/acc.cgi?acc=GSE18199>`_). A Hi-C contact matrix has been plotted with the ``--perChr`` option and the first eigenvector (pca1) computed by ``hicPCA``. For this plot a pearson correlated matrix was used, which is computed by first creating an observed / expected matrix and then a pearson correlation matrix with ``hicTransform``.
 
 .. image:: $PATH_TO_IMAGES/SRR0279XX_perChr_eigenvector1.png
    :width: 70 %