get-overlap
Quick Start
- Command:
getOverlap -i <input> -cols start1,end1,start2,end2 - Local executable:
/home/vimalinx/miniforge3/envs/bio/bin/getOverlap - Full reference: See references/help.md
When To Use This Tool
- Quantify how much two intervals overlap after another tool has already paired them on the same row.
- Turn
bedtools window-style output into a table with a final numeric overlap or distance column. - Score candidate interval pairs before thresholding or ranking them downstream.
- Add a simple overlap metric without rerunning a full interval join.
Common Patterns
# 1) Measure overlap or gap after bedtools window
windowBed \
-a A.bed \
-b B.bed \
-w 10 \
| getOverlap -i stdin -cols 2,3,6,7
# 2) Append overlap to a precomputed paired table
getOverlap \
-i paired-intervals.tsv \
-cols 2,3,6,7
Recommended Workflow
- Generate or prepare a table where each row already contains the two intervals you want to compare.
- Determine the exact 1-based column numbers for
start1,end1,start2,end2in that table. - Run
getOverlapon the file or use the literal input namestdinwhen streaming from a pipe. - Interpret the appended value before downstream filtering: positive means overlap, negative means separation, and zero means the intervals touch without overlapping.
Guardrails
-colsmust be given in the exact orderstart1,end1,start2,end2; swapping them changes the result.- This tool does not pair records for you; it only computes a metric from coordinates already present on the same line.
- Use the literal token
stdinwith-iwhen piping from another command. - Prefer
-hfor help; GNU-style--helpand--versionemit wrapper errors before usage text.