view hicCorrelate.xml @ 6:5ebde98fa3d9 draft

planemo upload for repository https://github.com/maxplanck-ie/HiCExplorer/tree/master/galaxy/wrapper/ commit 80462804e4fd7deafbcf8e8c5283cc7a98fa7dd5
author iuc
date Sat, 30 Dec 2017 08:23:32 -0500
parents 4a70b450b0af
children b10b77f55859
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

            #if $use_range.select_use_range == "yes_use_range":
                --range $range_min:$range_max
            #end if

            #if $chromosomes:
                --chromosomes #echo "' '".join([ "'%s'" % $chrom.chromosome for $chrom in $chromosomes ])#
            #end if
            
            --colorMap $colormap

            --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)" />
        <conditional name="use_range"> <!-- argparse specifies one argument of type min_range:max_range -->
            <param name="select_use_range" type="select" label="Range restriction (in bp)" argument="--range">
                <option value="no_use_range">No restriction</option>
                <option value="yes_use_range">Only consider counts within a range</option>
            </param>
            <when value="no_use_range"/>
            <when value="yes_use_range">
                <param name="range_min" type="integer" value="" min="0"/>
                <param name="range_max" type="integer" value="" min="0"/>
            </when>
        </conditional>
        <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>