getPostDrop: Get posteriors of drop-out

Description Usage Arguments Value Author(s) Examples

View source: R/srcLineagePulse_getFits.R

Description

Return posteriors of drop-out per gene and cell as matrix for chosen models.

Usage

1
getPostDrop(matCounts, lsMuModel, lsDispModel, lsDropModel, vecGeneIDs)

Arguments

matCounts

(count matrix genes x cells) Observed read counts, not observed are NA.

lsMuModel

(list) Object containing description of gene-wise mean parameter models.

lsDispModel

(list) Object containing description of gene-wise dispersion parameter models.

lsDropModel

(list) Object containing description of cell-wise drop-out parameter models.

vecGeneIDs

(vector of strings) [Default NULL] Gene IDs for which posteriors of drop-out are to be computed.

Value

(numeric matrix genes x cells) Posterior probability of observation not being generated by drop-out.

Author(s)

David Sebastian Fischer

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
lsSimulatedData <- simulateContinuousDataSet(
    scaNCells = 20,
    scaNConst = 2,
    scaNLin = 2,
    scaNImp = 2,
    scaMumax = 100,
    scaSDMuAmplitude = 3,
    vecNormConstExternal=NULL,
    vecDispExternal=rep(20, 6),
    vecGeneWiseDropoutRates = rep(0.1, 6))
objLP <- runLineagePulse(
    counts = lsSimulatedData$counts,
    dfAnnotation = lsSimulatedData$annot,
    strMuModel = "impulse")
# Get posterior of drop-out on alternative model:
# Use H1 model fits.
vecPosteriorDropoutFits <- getPostDrop(
     matCounts = lsSimulatedData$counts,
     lsMuModel = lsMuModelH1(objLP),
     lsDispModel = lsDispModelH1(objLP),
     lsDropModel = lsDropModel(objLP),
     vecGeneIDs = rownames(lsSimulatedData$counts)[1])

LineagePulse documentation built on Nov. 8, 2020, 7:01 p.m.