upstream-extended/iuc/tools/bedtools/mapBed.xml
1<tool id="bedtools_map" name="bedtools MapBed" version="@TOOL_VERSION@.4" profile="@PROFILE@">
2 <description>apply a function to a column for each overlapping interval</description>
3 <macros>
4 <import>macros.xml</import>
5 </macros>
6 <expand macro="bio_tools" />
7 <expand macro="requirements" />
8 <expand macro="stdio" />
9 <command><![CDATA[
10bedtools map
11-a '${inputA}'
12-b '${inputB}'
13$strand
14@C_AND_O_ARGUMENT@
15@OVERLAP@
16#if str($overlapB):
17 -F $overlapB
18#end if
19$reciprocal
20$split
21$header
22@GENOME_FILE@
23> '${output}'
24 ]]></command>
25 <inputs>
26 <param name="inputA" argument="-a" type="data" format="bam,@STD_BEDTOOLS_INPUTS@" label="File A (BAM/@STD_BEDTOOLS_INPUT_LABEL@)" />
27 <param name="inputB" argument="-b" type="data" format="bam,@STD_BEDTOOLS_INPUTS@" label="File B (BAM/@STD_BEDTOOLS_INPUT_LABEL@)" />
28 <expand macro="overlap" />
29 <expand macro="overlap" name="overlapB" argument="-F" fracof="B"/>
30 <param name="reciprocal" argument="-r" type="boolean" truevalue="-r" falsevalue="" checked="false"
31 label="Require reciprocal overlap"
32 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" />
33 <expand macro="strand2" />
34 <expand macro="c_and_o_argument">
35 <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" />
36 </expand>
37 <expand macro="split" />
38 <expand macro="print_header" />
39 <expand macro="input_conditional_genome_file" optional="true"/>
40 </inputs>
41 <outputs>
42 <data name="output" format_source="inputA" metadata_source="inputA" label="Mapping of ${inputB.name} into ${inputA.name}" />
43 </outputs>
44 <tests>
45 <test>
46 <param name="inputA" value="mapBed1.bed" ftype="bed" />
47 <param name="inputB" value="mapBed2.bed" ftype="bed" />
48 <repeat name="c_and_o_argument_repeat">
49 <param name="col" value="5" />
50 <param name="operation" value="mean" />
51 </repeat>
52 <output name="output" file="mapBed_result1.bed" ftype="bed" />
53 </test>
54 <test>
55 <param name="inputA" value="mapBed1.bed" ftype="bed" />
56 <param name="inputB" value="mapBed2.bed" ftype="bed" />
57 <repeat name="c_and_o_argument_repeat">
58 <param name="col" value="5" />
59 <param name="operation" value="collapse" />
60 </repeat>
61 <output name="output" file="mapBed_result2.bed" ftype="bed" />
62 </test>
63 <test>
64 <param name="inputA" value="mapBed1.bed" ftype="bed" />
65 <param name="inputB" value="mapBed2.bed" ftype="bed" />
66 <repeat name="c_and_o_argument_repeat">
67 <param name="col" value="5" />
68 <param name="operation" value="collapse" />
69 </repeat>
70 <param name="strand" value="-S" />
71 <output name="output" file="mapBed_result3.bed" ftype="bed" />
72 </test>
73 <test>
74 <param name="inputA" value="mapBed1.bed" ftype="bed" />
75 <param name="inputB" value="mapBed2.bed" ftype="bed" />
76 <repeat name="c_and_o_argument_repeat">
77 <param name="col" value="5" />
78 <param name="operation" value="collapse" />
79 </repeat>
80 <param name="strand" value="-s" />
81 <output name="output" file="mapBed_result4.bed" ftype="bed" />
82 </test>
83 <test>
84 <param name="inputA" value="mapBed3.bed" ftype="bed" />
85 <param name="inputB" value="mapBed4.bed" ftype="bed" />
86 <repeat name="c_and_o_argument_repeat">
87 <param name="col" value="5" />
88 <param name="operation" value="collapse" />
89 </repeat>
90 <param name="strand" value="-s" />
91 <conditional name="genome_file_opts">
92 <param name="genome_file_opts_selector" value="hist" />
93 <param name="genome" value="mm9.len" ftype="bed" />
94 </conditional>
95 <output name="output" file="mapBed_result5.bed" ftype="bed" />
96 </test>
97 <test>
98 <param name="inputA" value="mapBed3.bed" ftype="bed" />
99 <param name="inputB" value="mapBed4.bed" ftype="bed" />
100 <repeat name="c_and_o_argument_repeat">
101 <param name="col" value="5" />
102 <param name="operation" value="collapse" />
103 </repeat>
104 <param name="strand" value="-s" />
105 <conditional name="genome_file_opts">
106 <param name="genome_file_opts_selector" value="loc" />
107 <param name="genome" value="mm9"/>
108 </conditional>
109 <output name="output" file="mapBed_result5.bed" ftype="bed" />
110 </test>
111 </tests>
112 <help><![CDATA[
113**What it does**
114
115bedtools 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.
116
117.. image:: $PATH_TO_IMAGES/map-glyph.png
118
119.. class:: infomark
120
121bedtools 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.
122
123.. class:: infomark
124
125The 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.
126
127@REFERENCES@
128 ]]></help>
129 <expand macro="citations" />
130</tool>