view hicSumMatrices.xml @ 23:f81750434d70 draft default tip

planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/hicexplorer commit 79133bc3739fbcc6c2055d589679aae312161d03
author iuc
date Tue, 05 Nov 2024 00:12:13 +0000
parents 1d6af10874d5
children
line wrap: on
line source

<tool id="hicexplorer_hicsummatrices" name="@BINARY@" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="@PROFILE@">
    <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>