view hicCompareMatrices.xml @ 4:6d2c4187805b draft

"planemo upload for repository commit 91a0182476a7fc26be7bef1677790518c4e88348-dirty"
author bgruening
date Mon, 16 Dec 2019 08:39:14 -0500
parents 08e157ceda6f
children 55b4b8bc250d
line wrap: on
line source

<tool id="hicexplorer_hiccomparematrices" name="@BINARY@" version="@WRAPPER_VERSION@.0">
    <description>normalize and compare two Hi-C contact matrices</description>
        <token name="@BINARY@">hicCompareMatrices</token>
    <expand macro="requirements" />
    <command detect_errors="exit_code"><![CDATA[

    --matrices '$matrix1' '$matrix2'
    --operation $operation
    --outFileName matrix.$outputFormat

    && mv matrix.$outputFormat matrix
        <param name='matrix1' type="data" format="h5,cool"
            label="First matrix"/>
        <param name='matrix2' type="data" format="h5,cool"
            label="Second matrix to compare against the first"/>

        <param name='operation' type='select' label="Operation to be used for the comparison">
            <option value='diff'>diff</option>
            <option value="ratio">ratio</option>
            <option value="log2ratio">log2ratio</option>
        <param name='outputFormat' type='select' label="Output file format">
            <option value='h5'>HiCExplorer format</option>
            <option value="cool">cool</option>
        <data name="outFileName" from_work_dir="matrix" format="h5" label="${} MATRIX on ${on_string}">
                <when input="outputFormat" value="cool" format="cool" />
            <param name="matrix1" value="small_test_matrix.h5"/>
            <param name="matrix2" value="small_test_matrix.h5"/>
            <param name="operation" value='log2ratio' />
            <param name="outputFormat" value="h5" />
            <output name="outFileName" file="compare_matrices_log2ratio.h5" ftype="h5" compare="sim_size" delta='10000'/>
            <param name="matrix1" value=""/>
            <param name="matrix2" value=""/>
            <param name="operation" value='ratio' />
            <param name="outputFormat" value="cool" />
            <output name="outFileName" file="" ftype="cool" compare="sim_size" delta='2000'/>

Comparison of Hi-C matrices

This tool is useful to compare two matrices by applying operations like difference, ratio or log2ratio after normalization. To
normalize the matrices, each element is divided by the sum of the matrix.

**hicCompareMatrices** can be used for example to determine the effect of a mutation compared to wild-type samples on contact enrichment,
or to see TAD structure modifications near differentially expressed genes between two conditions when followed by ``hicPlotMatrix``.
It can also be used to compare two biological replicates.



**hicCompareMatrices** is usually perfomed on corrected matrices (``hicCorrectMatrix``) with bins merged (``hicMergeMatrixBins``) depending
on the downstream analyses to perform (visualisation of a whole chromosome, or of a small region, etc).



Here is an example of a log2ratio comparison between M1BP Knockdown and GST cells in
*Drosophila melanogaster* on corrected matrices with 50 bins merged (about 30kb bins) plotted using ``hicPlotMatrix``.

.. image:: $PATH_TO_IMAGES/hicCompareMatrices_m1bp_over_gst_log2_m50_matrix_plot.png
   :width: 50%

In this plot we see that the cells with a M1BP Knockdown display a negative log2ratio compared to the wild-type. Depletion of M1BP thus show a dramatic effect on the distribution of Hi-C contacts in which short range contacts decrease (Ramirez *et al.* 2017,  High-resolution TADs reveal DNA sequences underlying genome organization in flies,

Below you can find an example of a log2ratio plot between Hi-C matrices of two biological replicates, no differences are observable which means that the replicates are well correlated.

.. image:: $PATH_TO_IMAGES/hicCompareMatrices_QC_log2_m50_matrix_plot.png
   :width: 50%


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

    <expand macro="citations" />