| getNormData {LineagePulse} | R Documentation |
The data normalisation is based on the model normalisation used by and inferred by LineagePulse, e.g. for data visualisation.
getNormData(matCounts, lsMuModel, vecGeneIDs, boolDepth = TRUE, boolBatch = TRUE)
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. |
(numeric matrix genes x cells) Input data normalized by library size factors (optional) and by inferred batch factors (optional).
David Sebastian Fischer
Called by fitZINB. Can be called by user.
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)