do_rledf_range_summary: Calculate min/max/sum/mean/whichmin/whichmax over ranges on...

Description Usage Arguments Value See Also

Description

Loop over the Rle objects in an RleDataFrame, calculate the appropriate statistic for each view. If simplify == FALSE, this function returns a vector for each Rle. If simplify == TRUE, it returns a vector for the case of a single range, otherwise, a matrix. Rownames for the matrix are taken from the names of the argument bounds.

Usage

1
2
.do_rledf_range_summary(x, bounds, na.rm = FALSE, simplify = TRUE,
  RLEFUN, FUN.TYPE = c("numeric", "double", "integer", "logical"))

Arguments

x

RleDataFrame

bounds

IRanges or matrix, views on every Rle. If bounds is a matrix, the first two columns are used as as the starts and stops. Names for the ranges are taken from rownames of the matrix. Such a matrix can be constructed with boundingIndicesByChr.

na.rm

scalar logical, ignore NAs in calculations?

simplify

scalar logical, simplify result? For a single view, a vector, otherwise a matrix with one row per view.

RLEFUN

function, internal rle view summary function like .rle_range_means

FUN.TYPE

scalar character, the storage mode for the returned vector or matrix (when simplify==TRUE).

Value

With simplify == TRUE, a vector for single view or a matrix otherwise. When simplify == FALSE, a list of vectors length ncol(x) where each element is of length nrows(bounds).

See Also

RleDataFrame boundingIndicesByChr

Other views: .do_rledf_views


genoset documentation built on Nov. 8, 2020, 6:07 p.m.