view hicSumMatrices.xml @ 21:36dfa2825a59 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/hicexplorer commit 07802a6bd441d9da888cfb8283f8c2135704f7c9
author iuc
date Wed, 18 Oct 2023 10:15:10 +0000
parents 5aa5ef83f975
children
line wrap: on
line source

<tool id="hicexplorer_hicsummatrices" name="@BINARY@" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@">
    <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.$m.ext' &&
        #end for
        #set $m = ' '.join([ '\'%s_matrix.%s\'' % ($counter, $matrix.ext) for $counter, $matrix in enumerate($matrix_h5_cooler_multiple) ])
        #set $extension = $matrix_h5_cooler_multiple[0].ext
        @BINARY@
            --matrices $m
            --outFileName 'matrix.$extension'

        && mv 'matrix.$extension' matrix
]]>
    </command>
    <inputs>
        <expand macro="matrix_h5_cooler_multiple_macro" />
    </inputs>
    <outputs>
        <data name="outFileName" from_work_dir="matrix" format_source="matrix_h5_cooler_multiple" />
    </outputs>
    <tests>
        <test>
            <param name="matrix_h5_cooler_multiple" value="small_test_matrix.h5,small_test_matrix.h5" />
            <output name="outFileName" ftype="h5">
                <assert_contents>
                    <has_h5_keys keys="intervals,matrix" />
                </assert_contents>
            </output>
        </test>
        <test>
            <param name="matrix_h5_cooler_multiple" value="small_test_matrix.cool,small_test_matrix.cool" />
            <output name="outFileName" ftype="cool">
                <assert_contents>
                    <has_h5_keys keys="bins,chroms,indexes,pixels" />
                </assert_contents>
            </output>
        </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>