Learn R Programming

valr (version 0.8.3)

interval_spacing: Calculate interval spacing.

Description

Spacing for the first interval of each chromosome is undefined (NA). The leading interval of an overlapping interval pair has a negative value.

Usage

interval_spacing(x)

Value

ivl_df with .spacing column.

Arguments

x

ivl_df

See Also

Other utilities: bed12_to_exons(), bed_makewindows(), bound_intervals(), flip_strands()

Examples

Run this code
x <- tibble::tribble(
  ~chrom, ~start, ~end,
  "chr1", 1,      100,
  "chr1", 150,    200,
  "chr2", 200,    300
)

interval_spacing(x)

Run the code above in your browser using DataLab