computeDeviations {chromVAR} | R Documentation

## computeDeviations

### Description

Computes deviations in chromatin accessibility across sets of annotations

### Usage

    computeDeviations(object, annotations, ...)

    ## S4 method for signature 'SummarizedExperiment,SummarizedExperiment'
    computeDeviations(object,
      annotations, background_peaks = getBackgroundPeaks(object),
      expectation = computeExpectations(object))

    ## S4 method for signature 'SummarizedExperiment,MatrixOrmatrix'
    computeDeviations(object,
      annotations, background_peaks = getBackgroundPeaks(object),
      expectation = computeExpectations(object))

    ## S4 method for signature 'SummarizedExperiment,list'
    computeDeviations(object, annotations,
      background_peaks = getBackgroundPeaks(object),
      expectation = computeExpectations(object))

    ## S4 method for signature 'SummarizedExperiment,missingOrNULL'
    computeDeviations(object,
      annotations, background_peaks = getBackgroundPeaks(object),
      expectation = computeExpectations(object))

    ## S4 method for signature 'MatrixOrmatrix,SummarizedExperiment'
    computeDeviations(object,
      annotations, background_peaks, expectation = computeExpectations(object))

    ## S4 method for signature 'MatrixOrmatrix,MatrixOrmatrix'
    computeDeviations(object, annotations,
      background_peaks, expectation = computeExpectations(object))

    ## S4 method for signature 'MatrixOrmatrix,list'
    computeDeviations(object, annotations,
      background_peaks, expectation = computeExpectations(object))

    ## S4 method for signature 'MatrixOrmatrix,missingOrNULL'
    computeDeviations(object, annotations,
      background_peaks, expectation = computeExpectations(object))

### Arguments

`object` | chromVARCounts object
`annotations` | chromVARAnnotations 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

### Details

multiprocessing using `bplapply`

### Value

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

### Methods (by class)

- `object = SummarizedExperiment,annotations = SummarizedExperiment`: object and annotations are SummarizedExperiment

- `object = SummarizedExperiment,annotations = MatrixOrmatrix`: object is SummarizedExperiment, annotations are Matrix

- `object = SummarizedExperiment,annotations = list`: object is SummarizedExperiment, annotations are list

- `object = SummarizedExperiment,annotations = missingOrNULL`: object is SummarizedExperiment, annotations are missing

- `object = MatrixOrmatrix,annotations = SummarizedExperiment`: object and annotations are SummarizedExperiment

- `object = MatrixOrmatrix,annotations = MatrixOrmatrix`: object is SummarizedExperiment, annotations are Matrix

- `object = MatrixOrmatrix,annotations = list`: object is SummarizedExperiment, annotations are list

- `object = MatrixOrmatrix,annotations = missingOrNULL`: object is SummarizedExperiment, annotations are missing

### Author(s)

Alicia Schep

### See Also

`computeVariability`, `plotVariability`

### Examples

    # Register BiocParallel
    BiocParallel::register(BiocParallel::SerialParam())
    # Load very small example counts (already filtered)
    data(mini_counts, package = "chromVAR")
    # load annotation matrix; result from matchMotifs
    data(mini_ix, package = "chromVAR")

    # computing deviations
    dev <- computeDeviations(object = mini_counts,
                             annotations = mini_ix)

[Package chromVAR version 1.8.0 Index]