view hicCorrelate.xml @ 7:602a0c6f4bb0 draft

planemo upload for repository https://github.com/maxplanck-ie/HiCExplorer/tree/master/galaxy/wrapper/ commit 0456f085bac2c88b8cbddfcf12b02776d2a0d457
author bgruening
date Wed, 07 Mar 2018 03:39:03 -0500
parents c1f9dc3b2238
children 2d8543aeeb65
line wrap: on
line source

<tool id="hicexplorer_hiccorrelate" name="@BINARY@" version="@WRAPPER_VERSION@.0">
    <description>Computes pairwise correlations between hic matrices data</description>
    <macros>
        <token name="@BINARY@">hicCorrelate</token>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements" />
    <command detect_errors="exit_code"><![CDATA[

        @multiple_input_matrices@
        hicCorrelate

            --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 name="method" type="select" label="Correlation method to use" argument="--method" >
            <option value="spearman">Spearman</option>
            <option selected="true" value="pearson">Pearson</option>
        </param>
        <param name="log1p" type="boolean" argument="--log1p"  truevalue="--log1p" falsevalue=""
            label="Use the log1p of the matrix values" help="(--log1p)" />

        <expand macro="use_range" />

        <repeat name="chromosomes" title="List of chromosomes to be included in the correlation" min="0">
            <param name="chromosome" type="text">
                <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="hicCorrectMatrix_result1.npz.h5" ftype="h5"/>
                <param name="mlabel" value="first"/>
            </repeat>
            <repeat name="input_files">
                <param name="matrix" value="hicCorrectMatrix_result1.npz.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="hicCorrectMatrix_result1.npz.h5" ftype="h5"/>
                <param name="mlabel" value="first"/>
            </repeat>
            <repeat name="input_files">
                <param name="matrix" value="hicCorrectMatrix_result1.npz.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
==================

Computes pairwise correlations between Hi-C contact matrices.
The correlation is computed taking the values from each pair of matrices and discarding values that are zero in both matrices.

Input
-----

Parameters
__________
- Two contact matrices which are used for the correlation.
- Choice if pearson or spearman correlation should be used.
- log scale for the values
- Correlate full matrix or only specific chromosomes
- Correlate only within a given range.
- colormap to use:  Colormap_

Output
------

Pearson correlation
___________________

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

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



Spearman correlation
_____________________

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

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

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>