view hicMergeLoops.xml @ 2:59d3fa4c16f5 draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/hicexplorer commit 4b602d427e0fc0da5353a4510798349de98e4ae4"
author iuc
date Wed, 11 Mar 2020 17:03:53 -0400
parents 49b82255b72f
children 94b552c6830a
line wrap: on
line source

<tool id="hicexplorer_hicmergeloops" name="@BINARY@" version="@WRAPPER_VERSION@.0">
    <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'
                        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." multiple="true" />
        <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" compare="sim_size" delta='40000'/>
        </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>