view hicTransform.xml @ 8:ae9cc6dbfaca draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/hicexplorer commit 3b41d687ff30583540d055f6995de00530cca81d-dirty"
author bgruening
date Mon, 16 Dec 2019 15:41:36 -0500
parents 014e59185b0c
children 3f529510975e
line wrap: on
line source

<tool id="hicexplorer_hictransform" name="@BINARY@" version="@WRAPPER_VERSION@.0">
    <description>transform a matrix to obs/exp, pearson and covariance matrices</description>
    <macros>
        <token name="@BINARY@">hicTransform</token>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements" />
    <command detect_errors="exit_code"><![CDATA[

        ln -s '$matrix_h5_cooler' 'matrix.$matrix_h5_cooler.ext' &&
        @BINARY@ --matrix 'matrix.$matrix_h5_cooler.ext'
        --method $method_selector
        --outFileName 'matrix.$matrix_h5_cooler.ext'
        && mv 'matrix.$matrix_h5_cooler.ext' matrix
]]>
    </command>
    <inputs>
        <expand macro='matrix_h5_cooler_macro' />
        <param name="method_selector" type="select" label="Choose method to apply">
                <option value="obs_exp" selected="True">obs / exp</option>
                <option value="obs_exp_norm">obs / exp (Homer norm)</option>
                <option value="obs_exp_non_zero">obs / exp (exclude non-zero from exp)</option>
                <option value="pearson">pearson</option>
                <option value="covariance">covariance</option>
        </param>

    </inputs>
    <outputs>
        <data name="matrix_out" from_work_dir="matrix" format="cool" label="${tool.name} on ${matrix_h5_cooler.name} [${on_string}]: $method_selector">
            <change_format>
                <when input_dataset="matrix_h5_cooler" attribute="ext" value="h5" format="h5"/>
            </change_format>
        </data>
    </outputs>
    <tests>
        <test>
            <param name="matrix_h5_cooler" value="small_test_matrix.h5"/>
            <param name='method_selector' value='obs_exp_norm'/>
            <output name="matrix_out" ftype="h5">
                <assert_contents>
                    <has_h5_keys keys='intervals,matrix'/>
                </assert_contents>
            </output>
        </test>
    </tests>
    <help><![CDATA[
Transformation of matrix for plotting
=====================================

**hicTransform** computes a matrix based on one Hi-C contact matrix as input:

- An **observed/expected matrix** obtained "by dividing each entry in the contact matrix by the genome-wide average contact probability for loci at that genomic distance" (`Lieberman-Aiden et al. (2009)`_). This transformation allows to better assess long range interactions.
- An **observed/expected norm matrix** which computes the expected matrix as EXP_i,j = sum(diagonal(i-j)) * sum(row(j)) * sum(row(i)) / sum(matrix)
- An **observed/expected non-zero values matrix** which computes the expected matrix as the sum per genomic distance j divided by sum of non-zero contacts: sum(diagonal(j) / number of non-zero elements in diagonal(j)
- A **Pearson correlation matrix** obtained by computing the Pearson correlation between each bin based on observed/expected values. This matrix transformation allows to better identify the bins that are entering in contact together, or not, at long ranges, and thus helps defining compartments in the nucleus (``hicPCA``).
- A **covariance matrix**, which is used as a basis for the Principal Component Analysis (PCA) to compute the eigenvectors outputed by **hicTransform**.

These matrices can be used with ``hicPlotMatrix`` or ``pyGenomeTracks`` for a visualization of the A / B compartment analysis.

_________________

Output
------

From one Hi-C contact matrix, **hicTransform** outputs a matrix with the selected method applied.

_________________

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

.. _readthedocs.io: http://hicexplorer.readthedocs.io/en/latest/index.html
.. _`Lieberman-Aiden et al. (2009)`: https://doi.org/10.1126%2Fscience.1181369
]]></help>
    <expand macro="citations" />
</tool>