Applies a previously-defined scatter gate boundary to a set of flow
cytometry expression data and returns only the events falling inside it.
This is a lightweight, standalone counterpart to the gating step used
internally by get.gated.flow.expression.data(), intended for interactive
use and for testing other AutoSpectral functions against a gated subset
of data without going through the full control-file/FCS-reading pipeline.
Usage
apply.gate(
flow.data,
gate.boundary,
scatter.param = asp$default.scatter.parameter,
asp = NULL,
min.fraction = 0.01
)Arguments
- flow.data
A matrix or data frame of flow cytometry data (for example, unmixed or raw expression data) with named columns, including the two scatter parameters named in
scatter.param.- gate.boundary
A gate boundary, as returned by
define.gate.landmarks(),define.gate.density(), ordo.gate()— a list containing at least numericxandycomponents describing the polygon vertices.- scatter.param
Character vector of length 2 giving the names of the two scatter columns in
flow.datato gate on. Default isasp$default.scatter.parameter.- asp
The AutoSpectral parameter list, prepared using
get.autospectral.param(). Only used to supply the default forscatter.param; not required ifscatter.paramis supplied directly.- min.fraction
Numeric between
0and1, default0.01. If the fraction of events retained by the gate falls below this value, a warning is issued (the function still returns the gated data). Set to0to disable this check.