ranges-disjoin: Disjoin then aggregate a Ranges object

disjoin_rangesR Documentation

Disjoin then aggregate a Ranges object

Description

Disjoin then aggregate a Ranges object

Usage

disjoin_ranges(.data, ...)

disjoin_ranges_directed(.data, ...)

Arguments

.data

a Ranges object to disjoin

...

Name-value pairs of summary functions.

Value

a Ranges object that is now disjoint (no bases overlap).

Examples

df <- data.frame(start = 1:10, width = 5,  seqnames = "seq1",
strand = sample(c("+", "-", "*"), 10, replace = TRUE), gc = runif(10))
rng <- as_granges(df)
rng %>% disjoin_ranges()
rng %>% disjoin_ranges(gc = mean(gc))
rng %>% disjoin_ranges_directed(gc = mean(gc))

sa-lee/plyranges documentation built on April 15, 2024, 12:25 p.m.