scde.failure.probability {scde} | R Documentation

## Calculate drop-out probabilities given a set of counts or expression magnitudes

### Description

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

### Usage

    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

    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)

[Package scde version 2.12.0 Index]