upstream-extended/iuc/tools/bedtools/windowBed.xml
1<tool id="bedtools_windowbed" name="bedtools WindowBed" version="@TOOL_VERSION@" profile="@PROFILE@">
2 <description>find overlapping intervals within a window around an 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 window
11#if $inputA.is_of_type('bam'):
12 -abam '$inputA'
13#else:
14 -a '$inputA'
15#end if
16-b '$inputB'
17$bed
18$strandB
19#if $addition.addition_select == 'window':
20 -w $addition.w
21#elif $addition.addition_select == 'lr':
22 -l $addition.l
23 -r $addition.r
24#end if
25$original
26$number
27$nooverlaps
28$header
29> '$output'
30 ]]></command>
31 <inputs>
32 <param name="inputA" type="data" format="bam,@STD_BEDTOOLS_INPUTS@" label="@STD_BEDTOOLS_INPUT_LABEL@/BAM file"/>
33 <param name="inputB" argument="-b" type="data" format="@STD_BEDTOOLS_INPUTS@" label="@STD_BEDTOOLS_INPUT_LABEL@ file"/>
34 <param argument="-bed" type="boolean" truevalue="-bed" falsevalue="" checked="false"
35 label="When using BAM input, write output as BED. The default is to write output in BAM when using a BAM file" />
36 <conditional name="addition">
37 <param name="addition_select" type="select" label="Choose what you want to do">
38 <option value="window">Add Base pairs for **both** upstream and downstream of each entry in A when searching for overlaps in B</option>
39 <option value="lr">Add Base pairs **separately** for upstream and downstream of each entry in A when searching for overlaps in B</option>
40 </param>
41 <when value="window">
42 <param argument="-w" type="integer" value="1000" label="Base pairs to add upstream and downstream" />
43 </when>
44 <when value="lr">
45 <param argument="-l" type="integer" value="1000"
46 label="Base pairs added upstream (left) of each entry in A when searching for overlaps in B"
47 help="Allows one to create assymetrical “windows”. Default is 1000bp." />
48 <param argument="-r" type="integer" value="1000"
49 label="Base pairs added downstream (right) of each entry in A when searching for overlaps in B"
50 help="Allows one to create assymetrical “windows”. Default is 1000bp." />
51 </when>
52 </conditional>
53 <param name="strandB" type="select" label="Calculation based on strandedness?">
54 <option value="" selected="true">Report any hit in B</option>
55 <option value="-sm">Only report hits in B that overlap A on the **same** strand</option>
56 <option value="-Sm">Only report hits in B that overlap A on the **opposite** strand</option>
57 </param>
58 <param name="original" argument="-u" type="boolean" truevalue="-u" falsevalue="" checked="false"
59 label="Write original A entry once if any overlaps found in B"
60 help="In other words, just report the fact at least one overlap was found in B" />
61 <param name="number" argument="-c" type="boolean" truevalue="-c" falsevalue="" checked="false"
62 label="For each entry in A, report the number of hits in B"
63 help="Reports 0 for A entries that have no overlap with B" />
64 <param name="nooverlaps" argument="-v" type="boolean" truevalue="-v" falsevalue="" checked="false"
65 label="Only report those entries in A that have no overlaps with B" />
66 <expand macro="print_header" />
67 </inputs>
68 <outputs>
69 <data name="output" format_source="inputA" metadata_source="inputA" />
70 </outputs>
71 <tests>
72 <test>
73 <param name="inputA" value="windowBedA.bed" ftype="bed" />
74 <param name="inputB" value="windowBedB.bed" ftype="bed" />
75 <output name="output" file="windowBed_result1.bed" ftype="bed" />
76 </test>
77 <test>
78 <param name="inputA" value="windowBedA.bed" ftype="bed" />
79 <param name="inputB" value="windowBedB.bed" ftype="bed" />
80 <param name="addition|addition_select" value="window" />
81 <param name="addition|w" value="5000" />
82 <output name="output" file="windowBed_result2.bed" ftype="bed" />
83 </test>
84 <test>
85 <param name="inputA" value="windowBedA.bed" ftype="bed" />
86 <param name="inputB" value="windowBedB.bed" ftype="bed" />
87 <param name="addition|addition_select" value="lr" />
88 <param name="addition|l" value="200" />
89 <param name="addition|r" value="20000" />
90 <output name="output" file="windowBed_result2.bed" ftype="bed" />
91 </test>
92 </tests>
93 <help><![CDATA[
94**What it does**
95
96Similar to bedtools intersect, window searches for overlapping features in A and B. However, window adds a specified number (1000, by default) of base pairs upstream and downstream of each feature in A. In effect, this allows features in B that are “near” features in A to be detected.
97
98.. image:: $PATH_TO_IMAGES/window-glyph.png
99
100@REFERENCES@
101 ]]></help>
102 <expand macro="citations" />
103</tool>