view hicCompartmentsPolarization.xml @ 0:1fbe6c8e3eed draft default tip

"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:25:22 -0500
parents
children
line wrap: on
line source

<tool id="hicexplorer_hiccomparmentspolarization" name="@BINARY@" version="@WRAPPER_VERSION@.0">
    <description>compute pairwise correlations between multiple Hi-C contact matrices</description>
    <macros>
        <token name="@BINARY@">hicCompartmentsPolarization</token>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements" />
    <command detect_errors="exit_code"><![CDATA[

        #for $counter, $m in enumerate($matrix_h5_cooler_multiple):
            ln -s '$m' '${counter}_matrix.$m.ext' &&
        #end for
        #set $m = ' '.join([ '\'%s_matrix.%s\'' % ($counter, $matrix.ext) for $counter, $matrix in enumerate($matrix_h5_cooler_multiple) ])
       
        @BINARY@

            --obsexp_matrices $m

            --pca '$pca'
            ##--quantile  #echo int($quantile) # 

            $outputMatrix
            ##--outliers  #echo float($outliers) # 
            --outputFileName plot.$image_file_format

        && mv plot.$image_file_format plot


           
]]>
    </command>
    <inputs>
        <expand macro="matrix_h5_cooler_multiple_macro" />
        <param name='pca'  type="data" format="bedgraph" label="Eigenvector file" help='A PCA vector as a bedgraph file with 
                                no header. In case of several matrices with 
                                 different conditions, ie. control
                                treatment, the PCA of control can be 
                                used. Note that only one PCA can be provided.'/>
        <!-- <param name='quantile'  type="integer" label="Quantile" help='The number of to be used quantiles.' value="30"/>
        <param name='outliers'  type="float"  label="Outliers" help='The number of outliers to be removed.' value="0.0"/> -->
        <param name='outputMatrix' type='boolean' optional="true" truevalue='--outputMatrix output_matrix.npz' falsevalue='' label='Return computed matrix' help='Output .npz file includes all the generated matrices' />
        <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>
    </inputs>
    <outputs>
        <data format="png" name="outFileName" from_work_dir="plot" label="${tool.name} [${on_string}]: Plot">
            <change_format>
                <when input="image_file_format" value="svg" format="svg" />
                <when input="image_file_format" value="pdf" format="pdf" />
            </change_format>
        </data>
        <data name='output_matrix' from_work_dir='output_matrix.npz' format='hicexplorer_compartments_matrix' label='Output .npz file includes all the generated matrices'>
            <filter>outputMatrix == '--outputMatrix output_matrix.npz'</filter>
        </data>
    </outputs>
    <tests>
        <test>
            <param name="matrix_h5_cooler_multiple" value="hicTransform/obs_exp_norm.h5"/>
            <param name="pca" value="hicCompartmentsPolarization/pca1.bedgraph"/>
            <output name="outFileName" file="hicCompartmentsPolarization/compartmentsPolarizationRatio.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>