view hicSumMatrices.xml @ 11:6d1526527417 draft

planemo upload for repository https://github.com/maxplanck-ie/HiCExplorer/tree/master/galaxy/wrapper/ commit 2307743fd10f0babde52eec30289fe1682236287
author iuc
date Sat, 09 Jun 2018 15:39:00 -0400
parents 0399cd2c25aa
children e89bc5e38823
line wrap: on
line source

<tool id="hicexplorer_hicsummatrices" name="@BINARY@" version="@WRAPPER_VERSION@.0">
    <description>combine Hi-C matrices of the same size</description>
    <macros>
        <token name="@BINARY@">hicSumMatrices</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 &&
        #end for
        #set $m = '" "'.join([ '%s_matrix' % $counter for $counter, $matrix in enumerate($matrix_h5_cooler_multiple) ])

        hicSumMatrices
            --matrices "$m"
            --outFileName matrix.$outputFormat

        && mv matrix.$outputFormat matrix
]]>
    </command>
    <inputs>
        <expand macro='matrix_h5_cooler_multiple_macro'/>

        <param name='outputFormat' type='select' label="Output file format">
            <option value='h5'>HiCExplorer format</option>
            <option value="cool">cool</option>
        </param>
    </inputs>
    <outputs>
        <data name="outFileName" from_work_dir="matrix" format="h5">
             <change_format>
                <when input="outputFormat" value="cool" format="cool" />
            </change_format>
        </data>
    </outputs>
    <tests>
        <test>
            <param name="matrix_h5_cooler_multiple" value="hicCorrectMatrix_result1.npz.h5,hicCorrectMatrix_result1.npz.h5"/>
            <!-- <param name="matrices" value="hicCorrectMatrix_result1.npz.h5,hicCorrectMatrix_result1.npz.h5"/> -->
            <param name='outputFormat' value='h5'/>
            <output name="outFileName" file="hicSumMatrices_result1.npz.h5" ftype="h5" compare="sim_size" delta="70000"/>
        </test>
    </tests>
    <help><![CDATA[
Summation of matrices
=====================

**hicSumMatrix** is combining two (or more) contact matrices of the same size to one.
This is useful if replicates of an Hi-C experiment should be merged into one contact matrix to
increase the coverage of the data. With Hi-C, real contacts are sometimes difficult to be distinguished
from noise, especially with a low contact count. The more contacts are given, the more likely it is
that a high number of contacts are biologically releveant. It is therefore common to merge biological
and technical replicates of Hi-C experiments and **hicSumMatrix** address this concern.

_________________

Usage
-----

This tool takes two or more Hi-C contact matrices and sum the contacts into one matrix. It is recommended to use uncorrected and unmerged matrices as input (use the direct output from ``hicBuildMatrix``). Bin merging (``hicMergeMatrixBins``) and Hi-C contact matrix correction (``hicCorrectMatrix``) must be performed afterwards.

_________________

Output
------
**hicSumMatrix** outputs a Hi-C contact matrix comprising the sum of all the contacts of the Hi-C matrices used as input.

_________________

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

.. _readthedocs.io: http://hicexplorer.readthedocs.io/en/latest/index.html
]]></help>
    <expand macro="citations" />
</tool>