view mapBed.xml @ 43:07e8b80f278c draft

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/bedtools commit db0b91a784ca0c216345bc488d7d488babf1b53f"
author iuc
date Fri, 01 Apr 2022 19:02:51 +0000
parents 7ab85ac5f64b
children
line wrap: on
line source

<tool id="bedtools_map" name="bedtools MapBed" version="@TOOL_VERSION@.3" profile="@PROFILE@">
    <description>apply a function to a column for each overlapping interval</description>
    <macros>
        <import>macros.xml</import>
    </macros>
    <expand macro="bio_tools" />
    <expand macro="requirements" />
    <expand macro="stdio" />
    <command><![CDATA[
bedtools map
-a '${inputA}'
-b '${inputB}'
$strand
@C_AND_O_ARGUMENT@
@OVERLAP@
#if str($overlapB):
    -F $overlapB
#end if
$reciprocal
$split
$header
@GENOME_FILE@
> '${output}'
    ]]></command>
    <inputs>
        <param name="inputA" argument="-a" type="data" format="bam,@STD_BEDTOOLS_INPUTS@" label="File A (BAM/@STD_BEDTOOLS_INPUT_LABEL@)" />
        <param name="inputB" argument="-b" type="data" format="bam,@STD_BEDTOOLS_INPUTS@" label="File B (BAM/@STD_BEDTOOLS_INPUT_LABEL@)" />
        <expand macro="overlap" />
        <expand macro="overlap" name="overlapB" argument="-F" fracof="B"/>
        <param name="reciprocal" argument="-r" type="boolean" truevalue="-r" falsevalue="" checked="false"
            label="Require reciprocal overlap"
            help="If set, the overlap between the BAM alignment and the BED interval must affect the above fraction of both the alignment and the BED interval" />
        <expand macro="strand2" />
        <expand macro="c_and_o_argument">
            <param name="col" argument="-c" type="data_column" data_ref="inputB" label="Specify the column(s) from the B file to map onto intervals in A" help="Multiple columns can be specified in a comma-delimited list" />
        </expand>
        <expand macro="split" />
        <expand macro="print_header" />
        <expand macro="input_conditional_genome_file" optional="true"/>
    </inputs>
    <outputs>
        <data name="output" format_source="inputA" metadata_source="inputA" label="Mapping of ${inputB.name} into ${inputA.name}" />
    </outputs>
    <tests>
        <test>
            <param name="inputA" value="mapBed1.bed" ftype="bed" />
            <param name="inputB" value="mapBed2.bed" ftype="bed" />
            <repeat name="c_and_o_argument_repeat">
                <param name="col" value="5" />
                <param name="operation" value="mean" />
            </repeat>
            <output name="output" file="mapBed_result1.bed" ftype="bed" />
        </test>
        <test>
            <param name="inputA" value="mapBed1.bed" ftype="bed" />
            <param name="inputB" value="mapBed2.bed" ftype="bed" />
            <repeat name="c_and_o_argument_repeat">
                <param name="col" value="5" />
                <param name="operation" value="collapse" />
            </repeat>
            <output name="output" file="mapBed_result2.bed" ftype="bed" />
        </test>
        <test>
            <param name="inputA" value="mapBed1.bed" ftype="bed" />
            <param name="inputB" value="mapBed2.bed" ftype="bed" />
            <repeat name="c_and_o_argument_repeat">
                <param name="col" value="5" />
                <param name="operation" value="collapse" />
            </repeat>
            <param name="strand" value="-S" />
            <output name="output" file="mapBed_result3.bed" ftype="bed" />
        </test>
        <test>
            <param name="inputA" value="mapBed1.bed" ftype="bed" />
            <param name="inputB" value="mapBed2.bed" ftype="bed" />
            <repeat name="c_and_o_argument_repeat">
                <param name="col" value="5" />
                <param name="operation" value="collapse" />
            </repeat>
            <param name="strand" value="-s" />
            <output name="output" file="mapBed_result4.bed" ftype="bed" />
        </test>
        <test>
            <param name="inputA" value="mapBed3.bed" ftype="bed" />
            <param name="inputB" value="mapBed4.bed" ftype="bed" />
            <repeat name="c_and_o_argument_repeat">
                <param name="col" value="5" />
                <param name="operation" value="collapse" />
            </repeat>
            <param name="strand" value="-s" />
            <conditional name="genome_file_opts">
                <param name="genome_file_opts_selector" value="hist" />
                <param name="genome" value="mm9.len" ftype="bed" />
            </conditional>
            <output name="output" file="mapBed_result5.bed" ftype="bed" />
        </test>
        <test>
            <param name="inputA" value="mapBed3.bed" ftype="bed" />
            <param name="inputB" value="mapBed4.bed" ftype="bed" />
            <repeat name="c_and_o_argument_repeat">
                <param name="col" value="5" />
                <param name="operation" value="collapse" />
            </repeat>
            <param name="strand" value="-s" />
            <conditional name="genome_file_opts">
                <param name="genome_file_opts_selector" value="loc" />
                <param name="genome" value="mm9"/>
            </conditional>
            <output name="output" file="mapBed_result5.bed" ftype="bed" />
        </test>
    </tests>
    <help><![CDATA[
**What it does**

bedtools map allows one to map overlapping features in a B file onto features in an A file and apply statistics and/or summary operations on those features.

.. image:: $PATH_TO_IMAGES/map-glyph.png

.. class:: infomark

bedtools map requires each input file to be sorted by genome coordinate. For BED files, this can be done with sort -k1,1 -k2,2n. Other sorting criteria are allowed if a genome file (-g) is provides that specifies the expected chromosome order.

.. class:: infomark

The map tool is substantially faster in versions 2.19.0 and later. The plot below demonstrates the increased speed when, for example, counting the number of exome alignments that align to each exon. The bedtools times are compared to the bedops bedmap utility as a point of reference.

@REFERENCES@
    ]]></help>
    <expand macro="citations" />
</tool>