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))
object | chromVARCounts object |
---|---|
weights | chromVARweights object |
... | additional arguments |
background_peaks | (optional) background peaks matrix computed using
|
expectation | (optional) expectations computed using
|
chromVARDeviations-class
, which inherits from
SummarizedExperiment, and has two assays: deviations and deviation scores.
multiprocessing using bplapply
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
# 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)