% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/computeDeviationsAnalytic.R
\name{computeDeviationsAnalytic}
\alias{computeDeviationsAnalytic}
\title{computeDeviationsAnalytic}
\usage{
computeDeviationsAnalytic(
  object,
  background,
  annotations,
  verbose = FALSE,
  retSE = TRUE,
  compute = c("deviations", "z", "variability"),
  denominator = c("global", "local", "none")
)
}
\arguments{
\item{object}{A SummarizedExperiment (or SingleCellExperiment) with an assay
'counts', and with a 'bias' column in \code{rowData(object)}. Note that the
regions should have similar widths.}

\item{background}{A \code{bcvBackground} object with bins*samples slots filled,
as produced by \code{\link{computeBackgrounds}}.}

\item{annotations}{Peak annotation (sparse) matrix, with motifs as columns,
or a SummarizedExperiment containing this in the first assay. Values
should be either logical or between 0 and 1.}

\item{verbose}{Logical; whether to output progress messages.}

\item{retSE}{Logical; whether to return a SummarizedExperiment object.}

\item{compute}{What to compute. Defaults to everything: deviations, z and
motif variability.}

\item{denominator}{The type of denominator to use for the deviations.
Either 'global' (default), i.e. the global expectation (same as the
original chromVAR), 'local' (background expectation of the cell/sample),
or 'none' (denominator of 1). 'global' (default) is recommended.}
}
\value{
A SummarizedExperiment (or a list if \code{retSE=FALSE}).
}
\description{
computeDeviationsAnalytic
}
\examples{
attach(getDummyData())
# if GC content not already in the object, use:
# counts <- addGCBias(counts, genome=YOUR_GENOME)

# we fist get the background bins:
bg <- getBackgroundBins(counts)
# then we compute the backgrounds for each sample:
bg <- computeBackgrounds(counts, bg)
# then we can compute the deviations:
dev <- computeDeviationsAnalytic(counts, bg, motifMatches)
dev
}
