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

  1. Prepare the caller-filtered sequences, counts, coordinates or annotations requested below. Keep identifiers and paired lists aligned on the same reference.
  2. Enter firstChromosome, firstStart, firstEnd, secondChromosome, secondStart, secondEnd using the field table, then run the tool.
  3. Read overlapBases, intersectionStart, intersectionEnd. Interpret flags, units, ordering and placeholder values using the rules below.
  4. Review any reported issue or failed check, correct the supplied values when appropriate, and verify the result in its intended context.
Input fieldMeaningValue type and boundsRequirement
firstChromosomeFirst chromosomestring; minimum text length 1; maximum text length 1000000; pattern \SRequired
firstStartFirst startinteger; minimum 0Required
firstEndFirst endinteger; minimum 0Required
secondChromosomeSecond chromosomestring; minimum text length 1; maximum text length 1000000; pattern \SRequired
secondStartSecond startinteger; minimum 0Required
secondEndSecond endinteger; minimum 0Required

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 fieldMeaningValue type
overlapBasesOverlap basesinteger
intersectionStartIntersection startinteger
intersectionEndIntersection endinteger
json
{
  "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

  1. BED format specification: zero-based half-open intervals — GA4GH / HTS specifications

  2. 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.

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies