gatingMatrix: Apply gating on the matrix data

Description Usage Arguments Value Examples

View source: R/gating.R

Description

Apply gating on the matrix data

Usage

1
gatingMatrix(x, lower.gate = NULL, upper.gate = NULL)

Arguments

x

matrix

lower.gate

vector. Gating parameter, the name of the vector is the marker name, and the value of the vector is the lower bound of gating cutoff.

upper.gate

vector. Gating parameter, the name of the vector is the marker name, and the value of the vector is the upper bound of gating cutoff.

Value

a matrix

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
par(mfrow=c(1,2))
x <- matrix(rnorm(200, 3, 1), nrow = 100, ncol = 2)
colnames(x) <- c("CD34", "CD43")
plot(x[, "CD34"], x[, "CD43"], main = "Before gating")

lower.gate = c(CD34 = 2, CD43 = 3)
upper.gate = c(CD34 = 4, CD43 = 5)

x <- gatingMatrix(x, lower.gate = lower.gate, upper.gate = upper.gate)
plot(x[, "CD34"], x[, "CD43"], main = "After gating")

par(mfrow=c(1,1))

flowSpy documentation built on Nov. 8, 2020, 6:53 p.m.