view hicCorrelate.xml @ 18:340aa8042c7f draft default tip

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/hicexplorer commit 2a0943e78bdc8ebb13f181399206a9eea37ed78f"
author iuc
date Tue, 16 Mar 2021 15:03:46 +0000
parents e89d515c3594
children
line wrap: on
line source

<tool id="hicexplorer_hiccorrelate" name="@BINARY@" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@">
    <description>compute pairwise correlations between multiple Hi-C contact matrices</description>
    <macros>
        <token name="@BINARY@">hicCorrelate</token>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements" />
    <command detect_errors="exit_code"><![CDATA[

        @multiple_input_matrices@
        @BINARY@

            --matrices $matrices
            --labels $mlabels

            #if $method and $method is not None:
                --method $method
            #end if
            $log1p

            @USE_RANGE@

            #if $chromosomes:
                --chromosomes #echo "' '".join([ "'%s'" % $chrom.chromosome for $chrom in $chromosomes ])#
            #end if

            #if $colormap:
                --colorMap $colormap
            #end if

            --outFileNameHeatmap heatmap.png
            --outFileNameScatter scatter.png
]]>
    </command>
    <inputs>
        <expand macro="multiple_input_matrices" />

        <param argument="--method" type="select" label="Correlation method to use">
            <option value="spearman">Spearman</option>
            <option selected="true" value="pearson">Pearson</option>
        </param>
        <param argument="--log1p" type="boolean" truevalue="--log1p" falsevalue="" label="Use the log1p of the matrix values" help="If set, then the log1p of the matrix values is used.
            This parameter has no effect for Spearman correlations
            but changes the output of Pearson correlation and, for
            the scatter plot, if set, the visualization of the
            values is easier." />

        <expand macro="use_range" />

        <repeat name="chromosomes" title="List of chromosomes to be included in the correlation" min="0">
            <param name="chromosome" type="text" label='chromosome (one per field)'>
                <validator type="empty_field" />
            </param>
        </repeat>
        <expand macro="colormap" />
    </inputs>
    <outputs>        <!-- not sure if argument is specifiable for output yet, would be cool if so -->
        <data name="outFileNameHeatmap" from_work_dir="heatmap.png" format="png" />
        <data name="outFileNameScatter" from_work_dir="scatter.png" format="png" />
    </outputs>
    <tests>
        <test>
            <repeat name="input_files">
                <param name="matrix" value="small_test_matrix.h5" ftype="h5" />
                <param name="mlabel" value="first" />
            </repeat>
            <repeat name="input_files">
                <param name="matrix" value="small_test_matrix.h5" ftype="h5" />
                <param name="mlabel" value="second" />
            </repeat>
            <param name="log1p" value="True" />
            <param name="colormap" value="jet" />
            <param name="method" value="spearman" />
            <output name="outFileNameHeatmap" file="hicCorrelate_heatmap_result1.png" ftype="png" compare="sim_size" />
            <output name="outFileNameScatter" file="hicCorrelate_scatter_result1.png" ftype="png" compare="sim_size" />
        </test>
        <test>
            <repeat name="input_files">
                <param name="matrix" value="small_test_matrix.h5" ftype="h5" />
                <param name="mlabel" value="first" />
            </repeat>
            <repeat name="input_files">
                <param name="matrix" value="small_test_matrix.h5" ftype="h5" />
                <param name="mlabel" value="second" />
            </repeat>

            <param name="log1p" value="True" />
            <param name="colormap" value="jet" />
            <param name="method" value="spearman" />
            <output name="outFileNameHeatmap" file="hicCorrelate_heatmap_result1.png" ftype="png" compare="sim_size" />
            <output name="outFileNameScatter" file="hicCorrelate_scatter_result1.png" ftype="png" compare="sim_size" />
        </test>
    </tests>
    <help><![CDATA[

Matrix correlation
==================

**hicCorrelate** is a dedicated Quality Control tool that allows the correlation of multiple Hi-C matrices at once with either a heatmap or scatterplots output.

Computes pairwise correlations between Hi-C matrices data. The correlation is computed taking the values from each pair of matrices and discarding values that are zero in both matrices. Parameters that strongly affect correlations are bin size of the Hi-C matrices (can be changed using ``hicMergeMatrixBins``) and the considered range. The smaller the bin size of the matrices, the finer the differences you score. The *Range* parameter should be selected at a meaningful genomic scale according to, for example, the mean size of the TADs in the organism you work with or to specific ranges found using ``hicPlotDistVsCounts``.

_________________

Usage
-----

It is recommended to use this tool on corrected matrices (``hicCorrectMatrix``) at restriction enzyme resolution (unmerged bins).

_________________

Output
------

**hicCorrelate** outputs correlation plots of multiple Hi-C matrices.

Below, you can find a correlation example of uncorrected Hi-C matrices obtained from *Drosophila melanogaster* embryos, either wild-type or having one gene knocked-down by RNAi.

Heatmap
_______

.. image:: $PATH_TO_IMAGES/hicCorrelate_Dmel_heatmap.png
   :width: 45%

This example is showing a heatmap that was calculated using the Pearson correlation of corrected Hi-C matrices with a bin size of 6000 bp at a range of 5000 to 200000. The dendrogram indicates which samples are most similar to each other. You can see that the wild-type samples are seperated from the knock-down samples. In that case, Spearman correlation gives very similar results (not shown).

Scatterplot
___________

.. image:: $PATH_TO_IMAGES/hicCorrelate_Dmel_scatterplot.png
   :width: 45%

Additionally, pairwise scatterplots comparing interactions between each sample can be plotted.

_________________

For more information about HiCExplorer please consider our documentation on readthedocs.io_.

.. _readthedocs.io: http://hicexplorer.readthedocs.io/en/latest/index.html
.. _Colormap: https://matplotlib.org/examples/color/colormaps_reference.html

]]>    </help>
    <expand macro="citations" />
</tool>