BED overlap count matrix
Count each sample interval that overlaps each reference span, including duplicate and nested records. Keep every reference field, the chosen sample order, exact originals and a complete source report.
- 1Add input
- 2Review and run
- 3Get your result
Tool input and files are processed in this browser without being uploaded.
Before you start
Count each sample interval that overlaps each reference span, including duplicate and nested records. Keep every reference field, the chosen sample order, exact originals and a complete source report.
How to use this tool
- Choose the reference file first, then the sample files.
- Move samples up/down until their order matches the intended matrix columns.
- Run and inspect reference/sample totals and complete download sizes.
- Copy the complete matrix or download the matrix, report and every original. Verify coordinate assembly compatibility in your analysis workflow.
Supported inputs and limits
Choose one reference BED file and 1–20 sample BED files in explicit column order. All original sources together allow 4 MiB and 100,000 interval records. A physically empty file is refused; a nonempty blank/comment-only sample contributes zeros. The reference must contain at least one interval.
Each record has 3–12 nonempty tokens, separated by ASCII spaces or tabs. The first three are chromosome, start and end; every remaining token is opaque and retained. Leading/trailing ASCII separators normalize in the matrix. Quotes and backslashes are literal; empty fields or whitespace inside a field are unsupported.
Chromosome and source labels allow 512 UTF-8 bytes; each coordinate or extra token allows 65,536 UTF-8 bytes. Names are scalar Unicode without C0/C1/DEL/BOM controls. A file picker or operating system may impose a shorter filename limit.
Coordinates are ASCII decimals satisfying 0 ≤ start < end ≤ 9007199254740991. Signs, decimals, exponents and zero-width records are refused. Leading zero spelling stays in the matrix. Chromosome identifiers match case exactly; inputs may be unsorted.
Intervals are 0-based, half-open [start,end). Touching endpoints do not overlap. Every duplicate or nested sample record counts separately; reference records are never deduplicated or sorted. The last columns follow the displayed sample order.
Strict UTF-8 with one optional leading BOM and LF, CRLF or mixed line endings. Lone CR, invalid UTF-8, C0/C1/DEL controls and nonleading BOMs are refused. Blank/ASCII-whitespace lines and column-zero # comments are ignored for counts and retained in original sidecars.
All downloads together allow 32 MiB: overlap-matrix.bed, full result-report.json and every original source sidecar. Exact size is checked before full counts, matrix text or report serialization is allocated. An over-budget task has no partial matrix, copy or downloads.
The matrix uses tabs and LF, no header row, and retains every reference token plus one count per sample. The full report records every token/count, source names/SHA256/byte sizes/BOM/line endings/physical lines, sample record counts and complete export metadata. Originals retain all source bytes.
Processing stays in a local Worker. The 10-second operation deadline covers worker loading, source reading, readiness and computation. Cancel and timeout terminate the worker; retry the same selected files and order. The screen previews up to 4,000 code points; copy and downloads are complete.
This counts whole coordinate spans. It does not validate BED annotation columns, expand blocks, apply strand/fraction filters or infer genome assemblies. Appended sample columns may exceed 12; their meanings are counts rather than BED12 annotations. No file content or name is uploaded.
Worked example
Example input
Reference: chr1 0 1000; chr1 1000 2000. Sample 1: [20,50), [30,40), [1500,1900). Sample 2: [68,786), [899,987).
Example options
Sample 1, then sample 2; all spans on chr1.
Example output
chr1 0 1000 2 2 chr1 1000 2000 1 0
When something does not work
Keep the original files. Correct the refused source, remove unsupported fields or split the workload, and select the repaired file in the same role. A refusal, cancel or timeout creates no partial output. Cancel keeps your File selection and sample order for a fresh retry.
Frequently asked questions
Do nested or duplicate intervals count once?
Each overlapping sample record counts once, including repeated identical records. The tool counts records rather than union-covered bases.
Can I infer the sample from the matrix column name?
The matrix deliberately has no header. Match each appended column to the ordered source roles and names in the complete report.