view hicCompartmentsPolarization.xml @ 0:8d764e8acdf5 draft

"planemo upload for repository commit fa19d3b6a9d0160a13f8d1e4a99f20c4dbe937b2-dirty"
author bgruening
date Mon, 16 Dec 2019 17:26:46 -0500
line wrap: on
line source

<tool id="hicexplorer_hiccompartmentspolarization" name="@BINARY@" version="@WRAPPER_VERSION@.0">
    <description>compute pairwise correlations between multiple Hi-C contact matrices</description>
        <token name="@BINARY@">hicCompartmentsPolarization</token>
    <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) ])

            --obsexp_matrices $m

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

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

        && mv plot.$image_file_format plot

        <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>
        <data format="png" name="outFileName" from_work_dir="plot" label="${} [${on_string}]: Plot">
                <when input="image_file_format" value="svg" format="svg" />
                <when input="image_file_format" value="pdf" format="pdf" />
        <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>
            <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"/>

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``.



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



**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.


.. 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).


.. 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_.

.. _Colormap:

    <expand macro="citations" />