BED Intersection
Intersect two chromosome-aware zero-based half-open BED intervals.
Description
BED intervals use zero-based half-open coordinates.
BED intervals use zero-based half-open coordinates. Touching intervals share a boundary but no bases.1
Intersect two chromosome-aware zero-based half-open BED intervals.
When to use BED Intersection
Use this for the following task: Intersect two chromosome-aware zero-based half-open BED intervals.
Prepare the caller-filtered sequences, counts, coordinates or annotations requested below. Keep identifiers and paired lists aligned on the same reference.
How to use BED Intersection and understand its results
- Prepare the caller-filtered sequences, counts, coordinates or annotations requested below. Keep identifiers and paired lists aligned on the same reference.
- Enter firstChromosome, firstStart, firstEnd, secondChromosome, secondStart, secondEnd using the field table, then run the tool.
- Read overlapBases, intersectionStart, intersectionEnd. Interpret flags, units, ordering and placeholder values using the rules below.
- Review any reported issue or failed check, correct the supplied values when appropriate, and verify the result in its intended context.
| Input field | Meaning | Value type and bounds | Requirement |
|---|---|---|---|
| firstChromosome | First chromosome | string; minimum text length 1; maximum text length 1000000; pattern \S | Required |
| firstStart | First start | integer; minimum 0 | Required |
| firstEnd | First end | integer; minimum 0 | Required |
| secondChromosome | Second chromosome | string; minimum text length 1; maximum text length 1000000; pattern \S | Required |
| secondStart | Second start | integer; minimum 0 | Required |
| secondEnd | Second end | integer; minimum 0 | Required |
Require each end at or after its start. Compare exact chromosome identifiers, calculate overlap length, and return intersection boundaries only for positive overlap; otherwise both boundaries are −1.2
overlap = max(0,min(ends)−max(starts)) for matching chromosomes This summarizes the declared operation. Units, indexing, inclusivity and exceptional cases are explained in the surrounding text.
| Output field | Meaning | Value type |
|---|---|---|
| overlapBases | Overlap bases | integer |
| intersectionStart | Intersection start | integer |
| intersectionEnd | Intersection end | integer |
{
"input": {
"firstChromosome": "chr1",
"firstStart": 10,
"firstEnd": 30,
"secondChromosome": "chr1",
"secondStart": 20,
"secondEnd": 40
},
"output": {
"overlapBases": 10,
"intersectionStart": 20,
"intersectionEnd": 30
}
} Limitations and assumptions
Empty intervals are allowed. Genome builds and chromosome naming must already match; no interval file is loaded.
The tool operates on supplied local data; alignment, filtering and annotation must already be appropriate for the stated calculation. Malformed requests produce input errors. A successfully evaluated request can still contain false flags, empty result lists or a result outside the supplied threshold; those outcomes have the meanings stated above.
Alternative or Complementary methods
Choose Localized SNP Density for this operation: Find SNP-anchored half-open windows meeting a caller-defined localized density threshold. For a complementary task, use Loh Segments for this operation: Merge contiguous segments meeting a supplied minor-allele copy-number LOH criterion.
Further background: BED format specification: zero-based half-open intervals.
References
-
BED format specification: zero-based half-open intervals — GA4GH / HTS specifications
-
BED Intersection — tool.io
Similar or alternative tools
- Localized SNP Density
Find SNP-anchored half-open windows meeting a caller-defined localized density threshold.
- Loh Segments
Merge contiguous segments meeting a supplied minor-allele copy-number LOH criterion.