correctUnmix: Correct defects in spectral unmixing by compensation

Description Usage Arguments See Also Examples

View source: R/correctUnmix.R

Description

This function provides a way to reduce the defects in the spectral unmixing, by creating a secondary correction matrix, which is symmetrical.

Usage

1
correctUnmix(unmixFlowObj, correcMat, transCoFacs = 200)

Arguments

unmixFlowObj

A flowframe or flowset post unmixing.

correcMat

A correction matrix. If this is the first round, the executionof this function needs to be preceeded by the generation of this matrix, for example by using the correcMatCreate function.

transCoFacs

If transformation should be performed, the transformation cofactors can be added here. Three possible inputs: a vector with specific cofactors for each variable, a set value that will be used for all variables, and FALSE. Note: It might be good to set this to FALSE in the final round, to optimize the transoformations externally. See arcTrans.

See Also

specUnmix, arcTrans

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# Load some data
data(fullPanel)

# Load a spectral matrix
data(specMat)

# Select the rows that should be compensated
fluoExprs <- fullPanel[, grepl("[VBRY]", colnames(fullPanel))]

# Unmix this dataset
dataUnmixed <- specUnmix(fluoExprs, specMat)

# Now correct the data with this.
correcData <- correctUnmix(dataUnmixed)

# In this first run, an empty correction matrix will be created,
# but in later iterations, the correcMat can be changed to include the
# corrections needed.

# For example, Qdot705 is "overcompensated" to AF700 in the spectral unmixing
# process. For this reason, a correction is included:
correcMat["Qdot705", "AF700"] <- 0.1

# And now, a new correction is made
correcData <- correctUnmix(dataUnmixed, correcMat)

# And so on, and so forth.

jtheorell/theFlowSpec documentation built on Aug. 22, 2019, 3:33 a.m.