disjoin_ranges {plyranges} | R 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))

[Package plyranges version 1.10.0 Index]