library(openCyto)
library(ggcyto)
create and register plugin function
tmix2DGate.wrapper <- function(fr, pp_res = NULL, channels, ...){
flowIncubator:::tmix2DGate(fr, channels, ...)
}
registerPlugins(tmix2DGate.wrapper, "tmix2DGate.wrapper")
## Registered tmix2DGate.wrapper
## [1] TRUE
the pop is set to * indicating this gating method will generate multiple gates population names are manually defined in alias and follow the same order as the gates arranged in filters container
add_pop(gs, alias = "cd4,cd8"
, pop = "*"
, parent = "cd3"
, dims = "cd4,cd8"
, gating_method = "tmix2DGate.wrapper"
, gating_args = "K = 2, quantile = 0.6, trans = 0"
)
autoplot(gs, c("cd4", "cd8"))