getNormData: Return depth and batch corrected data

Description Usage Arguments Value Author(s) See Also Examples

Description

The data normalisation is based on the model normalisation used by and inferred by LineagePulse, e.g. for data visualisation.

Usage

1
2
getNormData(matCounts, lsMuModel, vecGeneIDs, boolDepth = TRUE,
  boolBatch = TRUE)

Arguments

matCounts

(numeric matrix genes x cells) Count data.

lsMuModel

(list) Mean parameter model parameters.

vecGeneIDs

(vector of strings) Gene IDs for which mean model fits are to be extracted.

boolDepth

(bool) [Default TRUE] Whether to normalize for sequencing depth.

boolBatch

(bool) [Default TRUE] Whether to normalize for batch.

Value

(numeric matrix genes x cells) Input data normalized by library size factors (optional) and by inferred batch factors (optional).

Author(s)

David Sebastian Fischer

See Also

Called by fitZINB. Can be called by user.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
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 batch correction on alternative model:
# Use H1 model fits.
matNormData <- getNormData(
     matCounts = lsSimulatedData$counts,
     lsMuModel = lsMuModelH1(objLP),
     vecGeneIDs = rownames(lsSimulatedData$counts)[1],
     boolDepth = TRUE, boolBatch = TRUE)

YosefLab/LineagePulse documentation built on May 6, 2019, 2:19 p.m.