diff --git a/R/summarize_regions.R b/R/summarize_regions.R index b2732d5..1a57a93 100644 --- a/R/summarize_regions.R +++ b/R/summarize_regions.R @@ -7,7 +7,7 @@ #' details. #' @param aligner The aligner used to produce the BED files - one of "biscuit", #' "bismark", "bsbolt". -#' @param fun Function to apply over the region. See details. +#' @param fun Function(s) to apply over the region. See details. #' @param mval Whether to calculate the M value (coverage \eqn{\times \beta}) #' or use the beta value when applying the function. #' @param set_region_rownames Use the region strings as the returned data @@ -54,7 +54,7 @@ #' # make a vector of regions #' regions <- c("chr1:1-6", "chr1:7-10", "chr1:11-14") #' summarize_regions(bedfiles, regions) -#' summarize_regions(bedfiles, regions, mval = FALSE) +#' summarize_regions(bedfiles, regions, fun = c("mean", "stddev"), mval = FALSE) #' summarize_regions(bedfiles, regions, fun = "sum") summarize_regions <- function( bedfiles, diff --git a/man/summarize_regions.Rd b/man/summarize_regions.Rd index bab74c7..751e373 100644 --- a/man/summarize_regions.Rd +++ b/man/summarize_regions.Rd @@ -20,7 +20,7 @@ summarize_regions( \item{regions}{A vector, data frame or GenomicRanges of genomic regions. See details.} -\item{fun}{Function to apply over the region. See details.} +\item{fun}{Function(s) to apply over the region. See details.} \item{aligner}{The aligner used to produce the BED files - one of "biscuit", "bismark", "bsbolt".} @@ -78,6 +78,6 @@ lapply(bedfiles, function(i) knitr::kable(read.table(i, col.names = colnames))) # make a vector of regions regions <- c("chr1:1-6", "chr1:7-10", "chr1:11-14") summarize_regions(bedfiles, regions) -summarize_regions(bedfiles, regions, mval = FALSE) +summarize_regions(bedfiles, regions, fun = c("mean", "stddev"), mval = FALSE) summarize_regions(bedfiles, regions, fun = "sum") }