tmix2DGate: Gating wrapper based on flowClust::tmixFilter

View source: R/tmix2DGate.R

tmix2DGateR Documentation

Gating wrapper based on flowClust::tmixFilter

Description

It basically calls flowClust to fit K clusters and construct K ellipsoidGate from them.

Usage

tmix2DGate(fr, channels, K, quantile = 0.85, trans = 0, plot = FALSE, ...)

Arguments

fr

flowFrame

channels

character vector of channel/marker names (must be of length 2)

K

integer the number of clusters to fit

quantile

numeric vector of length K, which specifies the size of each cluster.

trans

numeric must be 0

plot

logical flag, whether to plot the flowClust results for the diagnostic purpose.

...

other arguments passed to tmixFilter

Value

a filters object that contains K filters constructed from K clusters generated by flowClust

Examples

## Not run: 
library(ggcyto)
dataDir <- system.file("extdata",package="flowWorkspaceData")
gs <- load_gs(list.files(dataDir, pattern = "gs_manual",full = TRUE))
fr <- getData(gs[[1]], "CD3+")
gates <- tmix2DGate(fr = fr, channels = c("<B710-A>", "<R780-A>"), K = 2, quantile = 0.7)
autoplot(fr, "CD8","CD4") + geom_gate(gates)

## End(Not run)

RGLab/cytoUtils documentation built on Jan. 31, 2024, 11:26 p.m.