scde.failure.probability: Calculate drop-out probabilities given a set of counts or...

Description Usage Arguments Value Examples

View source: R/functions.R

Description

Returns estimated drop-out probability for each cell (row of models matrix), given either an expression magnitude

Usage

1
scde.failure.probability(models, magnitudes = NULL, counts = NULL)

Arguments

models

models determined by scde.error.models

magnitudes

a vector (length(counts) == nrows(models)) or a matrix (columns correspond to cells) of expression magnitudes, given on a log scale

counts

a vector (length(counts) == nrows(models)) or a matrix (columns correspond to cells) of read counts from which the expression magnitude should be estimated

Value

a vector or a matrix of drop-out probabilities

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
data(es.mef.small)
cd <- clean.counts(es.mef.small, min.lib.size=1000, min.reads = 1, min.detected = 1)
data(o.ifm)  # Load precomputed model. Use ?scde.error.models to see how o.ifm was generated
o.prior <- scde.expression.prior(models = o.ifm, counts = cd, length.out = 400, show.plot = FALSE)
# calculate probability of observing a drop out at a given set of magnitudes in different cells
mags <- c(1.0, 1.5, 2.0)
p <- scde.failure.probability(o.ifm, magnitudes = mags)
# calculate probability of observing the dropout at a magnitude corresponding to the
# number of reads actually observed in each cell
self.p <- scde.failure.probability(o.ifm, counts = cd)

hms-dbmi/scde documentation built on March 29, 2018, 1:23 p.m.