view hicAverageRegions.xml @ 6:03d7978293fe draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/hicexplorer commit 2a0943e78bdc8ebb13f181399206a9eea37ed78f"
author iuc
date Tue, 16 Mar 2021 14:57:51 +0000
parents 4b6a36c18e5e
children b15d27c440fd
line wrap: on
line source

<tool id="hicexplorer_hicaverageregions" name="@BINARY@" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@">
    <description>sums Hi-C contacts around given reference points and computes their average.</description>
    <macros>
        <token name="@BINARY@">hicAverageRegions</token>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements" />
    <command detect_errors="exit_code"><![CDATA[

        ln -s '$matrix_h5_cooler' 'matrix_name.$matrix_h5_cooler.ext' &&
        @BINARY@ --matrix 'matrix_name.$matrix_h5_cooler.ext'

        --regions '$regions'
        #if $rangeFormat_conditional.rangeFormat_selector == 'optionGenomicUnits':
            --range '$rangeFormat_conditional.upstreamRange' '$rangeFormat_conditional.downstreamRange'
        #else:
            --rangeInBins '$rangeFormat_conditional.upstreamRange' '$rangeFormat_conditional.downstreamRange'
        #end if
        --coordinatesToBinMapping $coordinatesToBinMapping_selector
        --outFileName output_matrix.npz

]]>
    </command>
    <inputs>
        <expand macro='matrix_h5_cooler_macro' />
        <param argument="--regions" type="data" format='bed' label="Regions to average" help="BED file which stores a list of regions that are summed and averaged." />

        <conditional name="rangeFormat_conditional">
            <param name="rangeFormat_selector" type="select" label="List of chromosomes or a BED file containg regions">
                <option value="optionGenomicUnits">Range in genomic units</option>
                <option value="optionBinUnits" selected="True">Range in bin (matrix indices) units</option>
            </param>
            <when value="optionGenomicUnits">
                <param name="upstreamRange" type="integer" value="" label="Upstream range" />
                <param name="downstreamRange" type="integer" value="" label="Downstream range" />
            </when>
            <when value="optionBinUnits">
                <param name="upstreamRange" type="integer" value="" label="Upstream range" />
                <param name="downstreamRange" type="integer" value="" label="Downstream range" />
            </when>
        </conditional>
        <param name="coordinatesToBinMapping_selector" type="select" label="Define start value of range" help="If the region contains start and end coordinates, define if the start, center (start + (end-start) / 2) or end bin should be used as start for range.">
            <option value="start">Start</option>
            <option value="center" selected="True">Center</option>
            <option value="end" selected="True">End</option>
        </param>
    </inputs>
    <outputs>
        <data name="outFileName" from_work_dir="output_matrix.npz" format="zip" />
    </outputs>
    <tests>
        <test>
            <param name="matrix_h5_cooler" value="small_test_matrix.cool" />
            <param name="regions" value="hicAverageRegions/regions.bed" />
            <conditional name="rangeFormat_conditional">
                <param name="rangeFormat_selector" value='optionGenomicUnits' />
                <param name="upstreamRange" value='100000' />
                <param name="downstreamRange" value='100000' />
            </conditional>
            <output name='outFileName' file='hicAverageRegions/result_range_100000.npz' ftype="zip" compare="sim_size" delta="20000" />
        </test>
        <test>
            <param name="matrix_h5_cooler" value="small_test_matrix.cool" />
            <param name="regions" value="hicAverageRegions/regions.bed" />
            <conditional name="rangeFormat_conditional">
                <param name="rangeFormat_selector" value='optionBinUnits' />
                <param name="upstreamRange" value='100' />
                <param name="downstreamRange" value='100' />
            </conditional>
            <output name='outFileName' file='hicAverageRegions/result_rangeInBins_100.npz' ftype="zip" compare="sim_size" delta="20000" />
        </test>
    </tests>
    <help><![CDATA[

Average regions
===============

This tool sums Hi-C contacts around given reference points and computes their average. This tool is useful to detect differences at certain reference points, TAD boundaries for instance, between samples.

WARNING: This tool can only be used with fixed bin size Hi-C matrices. No guarantees how and if it works on restriction site interaction matrices.

Use the output to plot the average with hicPlotAverageRegions.

_________________

| 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>