What it does
This tool identifies common intervals among multiple, sorted BED files. Intervals can be common among 0 to N of the N input BED files.
This tool requires that each BED file is reference-sorted (chrom, then start).
The output file will contain five fixed columns, plus additional columns for each BED file:
- Chromosome name (or 'genome' for whole-genome coverage).
- The zero-based start position of the interval.
- The one-based end position of the interval.
- The number of input files that had at least one feature overlapping this interval.
- A list of input files or labels that had at least one feature overlapping this interval.
- For each input file, an indication (1 = Yes, 0 = No) of whether or not the file had at least one feature overlapping this interval.
Example input:
# a.bed chr1 6 12bed chr1 10 20 chr1 22 27 chr1 24 30 # b.bed chr1 12 32 chr1 14 30 # c.bed chr1 8 15 chr1 10 14 chr1 32 34
Example without a header and without reporting intervals with zero coverage:
chr1 6 8 1 1 1 0 0 chr1 8 12 2 1,3 1 0 1 chr1 12 15 3 1,2,3 1 1 1 chr1 15 20 2 1,2 1 1 0 chr1 20 22 1 2 0 1 0 chr1 22 30 2 1,2 1 1 0 chr1 30 32 1 2 0 1 0 chr1 32 34 1 3 0 0 1
Example adding a header line:
chrom start end num list a.bed b.bed c.bed chr1 6 8 1 1 1 0 0 chr1 8 12 2 1,3 1 0 1 chr1 12 15 3 1,2,3 1 1 1 chr1 15 20 2 1,2 1 1 0 chr1 20 22 1 2 0 1 0 chr1 22 30 2 1,2 1 1 0 chr1 30 32 1 2 0 1 0 chr1 32 34 1 3 0 0 1
Example adding a header line and custom file labels:
chrom start end num list joe bob sue chr1 6 8 1 joe 1 0 0 chr1 8 12 2 joe,sue 1 0 1 chr1 12 15 3 joe,bob,sue 1 1 1 chr1 15 20 2 joe,bob 1 1 0 chr1 20 22 1 bob 0 1 0 chr1 22 30 2 joe,bob 1 1 0 chr1 30 32 1 bob 0 1 0 chr1 32 34 1 sue 0 0 1
This tool is part of the bedtools package from the Quinlan laboratory.
Citation
If you use this tool in Galaxy, please cite:
Bjoern A. Gruening (2014), Galaxy wrapper