reduceMC: Reduce ranges retaining mcols

View source: R/reduceMC.R

reduceMCR Documentation

Reduce ranges retaining mcols

Description

Reduce ranges retaining mcols

Usage

reduceMC(x, ignore.strand = FALSE, simplify = TRUE, ...)

Arguments

x

A GenomicRanges object

ignore.strand

If set to TRUE, then the strand of x and y is set to "*" prior to any computation.

simplify

logical(1). Attempt to simplify returned columns where possible

...

Passed to reduce

Details

This function extends reduce so that all mcols are returned in the output. Where the reduced ranges map to multiple ranges in the original range, mcols will be returned as CompressedList columns.

If simplify = TRUE columns will be returned as vectors where possible.

Value

A GRanges object

Examples

x <- GRanges(c("chr1:1-10:+", "chr1:6-12:-"))
x$id <- c("range1", "range2")
reduceMC(x)
reduceMC(x, ignore.strand = TRUE)


steveped/chipExtra documentation built on Aug. 1, 2024, 12:33 a.m.