Description Usage Arguments Details Value Examples
View source: R/read.gatingML.cytobank.R
It is equivalent to the behavior of shifting the off-scale boundary events into the gate boundary that is describled in bounding transformation section of gatingML standard.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | extend(
gate,
bound,
data.range = NULL,
plot = FALSE,
limits = c("original", "extended")
)
## S3 method for class 'polygonGate'
extend(
gate,
bound,
data.range = NULL,
plot = FALSE,
limits = c("original", "extended")
)
## S3 method for class 'rectangleGate'
extend(gate, ...)
## S3 method for class 'ellipsoidGate'
extend(gate, ...)
|
gate |
a flowCore filter/gate |
bound |
numeric matrix representing the bouding information parsed from gatingML. Each row corresponds to a channel. rownames should be the channel names. colnames should be c("min", "max") |
data.range |
numeric matrix specifying the data limits of each channel. It is used to set the extended value of vertices and must has the same structure as 'bound'. when it is not supplied, c(-.Machine$integer.max, - .Machine$integer.max) is used. |
plot |
whether to plot the extended polygon. |
limits |
character whether to plot in "extended" or "original" gate limits. Default is "original". |
... |
other arguments |
The advantage of extending gates instead of shifting data are two folds: 1. Avoid the extra computation each time applying or plotting the gates 2. Avoid changing the data distribution caused by adding the gates
Normally this function is not used directly by user but invoked when parsing GatingML file exported from Cytobank.
a flowCore filter/gate
1 2 3 4 5 6 7 8 9 10 11 | library(flowCore)
sqrcut <- matrix(c(300,300,600,600,50,300,300,50),ncol=2,nrow=4)
colnames(sqrcut) <- c("FSC-H","SSC-H")
pg <- polygonGate(filterId="nonDebris", sqrcut)
pg
bound <- matrix(c(100,3e3,100,3e3),
byrow = TRUE, nrow = 2,
dimnames = list(c("FSC-H", "SSC-H"),
c("min", "max")))
bound
pg.extened <- extend(pg, bound, plot = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.