Computes weighted deviations in chromatin accessibility across sets of weights where the number of the annotation meaningful.

computeWeightedDeviations(object, weights, ...)


  # S4 method for SummarizedExperiment,SummarizedExperiment
computeWeightedDeviations(object,
  weights, background_peaks = getBackgroundPeaks(object),
  expectation = computeExpectations(object))

# S4 method for SummarizedExperiment,Matrix
computeWeightedDeviations(object,
  weights, background_peaks = getBackgroundPeaks(object),
  expectation = computeExpectations(object))

# S4 method for SummarizedExperiment,matrix
computeWeightedDeviations(object,
  weights, background_peaks = getBackgroundPeaks(object),
  expectation = computeExpectations(object))

Arguments

object

chromVARCounts object

weights

chromVARweights object

...

additional arguments

background_peaks

(optional) background peaks matrix computed using getBackgroundPeaks, computed internally with default paramaters if not provided

expectation

(optional) expectations computed using computeExpectations, computed automatically if not provided

Value

chromVARDeviations-class, which inherits from SummarizedExperiment, and has two assays: deviations and deviation scores.

Details

multiprocessing using bplapply

Methods (by class)

  • object = SummarizedExperiment,weights = SummarizedExperiment: / weights are SummarizedExperiment

  • object = SummarizedExperiment,weights = Matrix: object is SummarizedExperiment, weights are in a Matrix

  • object = SummarizedExperiment,weights = matrix: object is SummarizedExperiment, weights are in a numeric

Examples

# Register BiocParallel BiocParallel::register(BiocParallel::SerialParam()) # Load very small example counts (already filtered) data(mini_counts, package = "chromVAR") # Load mini weighted counts rdsA<-paste0(system.file('rds',package='gchromVAR'),'/mini_w.rds') w_se <- readRDS(rdsA) # Build weights from .bed file files <- list.files(system.file('extdata',package='gchromVAR'), full.names = TRUE, pattern = "*.bed$") data(mini_counts, package = "chromVAR") uk_se <- importBedScore(SummarizedExperiment::rowRanges(mini_counts), files) wdev <- computeWeightedDeviations(mini_counts, w_se) ukdev <- computeWeightedDeviations(mini_counts, uk_se)