Use when you need to apply aggregation functions (sum, mean, count, etc.) to values from overlapping intervals in one file and map them onto intervals from another file.
mapBed -a A.bed -b B.bed -c <B_col> -o <op> [options]/home/vimalinx/miniforge3/envs/bio/bin/mapBedreferences/help.md# 1) Mean signal from B column 5 over each A interval
mapBed \
-a exons.bed \
-b signal.bed \
-c 5 \
-o mean
# 2) Count distinct overlapping labels
mapBed \
-a peaks.bed \
-b annotations.bed \
-c 4 \
-o count_distinct
# 3) Map multiple B columns with matching operations
mapBed \
-a peaks.bed \
-b signal.bed \
-c 4,5 \
-o distinct,mean
mapBed.collapse / distinct for labels.-s, -S, -f, -F, -r, or -e only if overlap eligibility needs to be biologically constrained.-c refers to columns in B, not A.-c columns and multiple -o operators, the counts must align unless you intentionally rely on the single-column / single-op broadcast behavior.collapse keeps duplicates whereas distinct removes them.-h for help; GNU-style --help / --version calls on these wrappers are noisy.