Home Pattern

Interval: windowed coverage around features

Quantify signal in fixed neighborhoods around point features: window the features (slop), collapse overlaps (merge), then count reads in each window (coverage).

Revised
2026-06-10
Rev
1

Pattern health

warn
  • IWC exemplar anchors

    1 abstract workflow anchor declared.

  • Foundry verification fixture

    No structural verification fixture yet.

  • Pattern map coverage

    1 pattern map link here.

  • Metadata contract

    Pattern frontmatter matches the site contract.

Interval: windowed coverage around features

Use this recipe when you have point or summit features and want signal quantified in a fixed neighborhood around each — reads in summit ± N bp, coverage in promoter windows. The atacseq workflow uses it to count reads in 1 kb windows around MACS2 summits. Three operations, in order.

1. Window the features (slop)

bedtools_slopbed extends each summit by a fixed amount on both sides to make a window (“get summits +/-500kb”; addition: { addition_select: b, b: "500" } — 500 bp each side, a 1 kb window). Requires a genome file to clamp at chromosome ends. See interval-window-flank for parameters and the bp-vs-kb label-drift gotcha.

2. Collapse overlapping windows (merge)

Adjacent summits produce overlapping windows; bedtools_mergebed collapses them so a region of read pileup isn’t counted twice (“Merge summits +/-500kb”; distance: "0"). See interval-merge-overlapping.

3. Count reads in each window (coverage)

bedtools_coveragebed counts how many reads (from the deduplicated-reads BAM) fall in each merged window (“Compute coverage on summits +/-500kb”; reduce_or_iterate_selector: iterate, hist: false, mean: false). This is interval-coverage Mode B — region-restricted counts, not genome-wide depth.

Why this shape

The merge between slop and coverage is the non-obvious step. Without it, overlapping windows double-count shared reads and inflate the per-window signal. Slop defines the neighborhoods, merge makes them disjoint, coverage quantifies — each step is one operation, and dropping merge silently biases the numbers upward.

Pitfalls

  • Skipping merge double-counts. This is the recipe’s whole reason to exist as a three-step chain rather than slop→coverage. Overlapping windows share reads; coverage over un-merged windows over-reports.
  • Window size vs label. b: "500" is 500 bp; the step’s “500kb” label is wrong (see interval-window-flank). Verify the actual extension against the biology you want.
  • Coverage mode. Use interval-coverage Mode B (coveragebed, reads-in-regions) here, not Mode A (genomecoveragebed, genome-wide) — you already have the regions and want per-region counts.
  • Genome file consistency. Slop’s genome file must match the alignment reference, or windows land at coordinates the reads can’t occupy.

See also

IWC exemplars1 anchor

IWC Exemplars

epigenetics/atacseq/atacseqhigh

slop -> merge -> coverage to quantify reads in fixed windows around MACS2 summits.

  • get summits +/-500kb
  • Merge summits +/-500kb
  • Compute coverage on summits +/-500kb

Incoming References (5)

  • Galaxy: genomic interval patternsrelated pattern— Use this MOC to choose corpus-grounded Galaxy genomic interval operations and recipes on coordinate features.
  • Interval: compute coveragerelated pattern— Two coverage modes: genome-wide depth as a bedgraph (genomecoveragebed) and reads counted in given regions (coveragebed). Same family, different question.
  • Interval: merge overlapping featuresrelated pattern— Collapse overlapping or book-ended intervals within one set into single spans; bedtools mergebed or the gops_merge Operate-on-Genomic-Intervals tool.
  • Interval: window or flank featuresrelated pattern— Extend features by a fixed or fractional amount to build neighborhood windows, clamped to chromosome ends; bedtools slopbed with a genome file.
  • Iwc Interval Operations Surveyrelated note— IWC corpus survey of coordinate-aware genomic interval operations; sizing and candidate boundaries for a galaxy-interval-patterns MOC, with hold-if-thin gate.