## Matching genomic regions / Window BED

### Description

Examines a "window" around each feature in A and reports all features in B that overlap the window. For each overlap the entire entry in A and B are reported.

### Parameters

- The A input file is in BAM format (yes, no) [no]
- Write uncompressed BAM output (yes, no) [no]
- When using BAM input, write output as BED (yes, no) [no]
- Base pairs added upstream (Integer) [1000]
- Base pairs added downstream (Integer) [1000]
- Define window based on strand (yes, no) [no]
- Only report hits in B that overlap A on the same strand (yes, no) [no]
- Write the original A entry once if any overlaps found in B (yes, no) [no]
- For each entry in A, report the number of overlaps with B (yes, no) [no]
- Only report those entries in A that have no overlaps with B (yes, no) [no]

### Details

Similar to intersectBed, windowBed searches for overlapping features in A and B. However, windowBed 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.

Selecting "File A is BAM format [yes]" is analogous to using "-abam" option instead of "-a" in the command line version.

### Output

Default output is a BED file. If input is a BAM file, output can also be a compressed or uncompressed BAM file depending on the options selected.

### References

This tool uses the BEDTools package. Please cite the article:

Quinlan AR and Hall IM, 2010. BEDTools: a flexible suite of utilities for comparing genomic features. Bioinformatics. 26, 6, pp. 841–842.

Please see the BEDTools homepage for more details.