view hicMergeLoops.xml @ 6:94b552c6830a draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/hicexplorer commit 2a0943e78bdc8ebb13f181399206a9eea37ed78f"
author iuc
date Tue, 16 Mar 2021 15:27:51 +0000
parents 59d3fa4c16f5
children 1511a8ebe906
line wrap: on
line source

<tool id="hicexplorer_hicmergeloops" name="@BINARY@" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@">
    <description>merge detected loops of different resolutions.</description>
    <macros>
        <token name="@BINARY@">hicMergeLoops</token>
        <import>macros.xml</import>
    </macros>
    <expand macro="requirements" />
    <command detect_errors="exit_code"><![CDATA[
        #for $counter, $loopfile in enumerate($inputFiles):
            ln -s '$loopfile' '${counter}_loop_file.bedgraph' &&
        #end for
        #set $m = ' '.join([ '\'%s_loop_file.bedgraph\'' % $counter for $counter, $inputfile in enumerate($inputFiles) ])

        @BINARY@
            --inputFiles $m
            --lowestResolution $lowestResolution
            --outFileName merged_loops.bedgraph
    ]]>    </command>
    <inputs>
        <param argument="--inputFiles" type="data" format='bed' multiple="true" label="Loop files to merge" help="The loop files from hicDetectLoops. To use files from other sources,
            please follow \'chr start end chr start end\' format and remove any header." />
        <param argument="--lowestResolution" type="integer" value="" label="Lowest used resolution" help='The lowest resolution of all loop files, i.e. 5kb, 10kb and 25kb, please use 25000.' />
    </inputs>
    <outputs>
        <data name="mergedLoops" from_work_dir="merged_loops.bedgraph" format="bed" label="${tool.name} on  [${on_string}]: Merged loops" />
    </outputs>
    <tests>
        <test>
            <param name="inputFiles" ftype='bed' value="hicMergeLoops/gm12878_10kb.bedgraph,hicMergeLoops/gm12878_5kb.bedgraph,hicMergeLoops/gm12878_25kb.bedgraph" />
            <param name="lowestResolution" value="25000" />
            <output name="mergedLoops" file="hicMergeLoops/gm12878_all.bedgraph" ftype="bed" />
        </test>
    </tests>
    <help><![CDATA[

Merge detected loops
====================

This script merges the loop locations of different different resolutions.

Loops need to have the following format:

chr start end chr start end

A merge happens if x and y position of a loop overlaps with x and y position of another loop; all loops are considered as an overlap within +/- the bin size of the lowest resolution.
I.e. for a loop with coordinates x and y, the overlap to all other loops is searched for (x - lowest resolution) and (y + lowest resolution).
If two or more locations should be merged, the one with the lowest resolution is taken as the merged loop.

Example usage:

`$ hicMergeLoops -i gm12878_10kb.bedgraph gm12878_5kb.bedgraph gm12878_25kb.bedgraph -o merged_result.bedgraph -r 25000`

Please recall: We work with binned data i.e. the lowest resolution is therefore the one where we merge the most bases into one bin. In the above example the lowest resultion is 25kb, the highest resolution is 5kb.


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>