Skip to contents

Cut an object of class `fdmat` down to only a single gate

Usage

cutFdmatToGate(fdmat, gate = NULL)

Arguments

fdmat

An object of class-fdmat as produced by makefdmat.

gate

Numeric or Character length one. The designator for the gate to keep, as defined in the gating strategy (from those gates where 'keepData' is set to TRUE.

Value

An object of class-fdmat containing only the data for the gate as specified in gate.

See also

Examples

td <- tempdir()
data_source <- "https://github.com/bpollner/data/raw/main/flowdex_examples/flowdex_examples.zip"
check_download_data(td, data_source)
exp_home <- paste0(td, "/flowdex_examples")
old_wd <- getwd()
setwd(exp_home)
#
assign("get_settings_from_flowdex_package_root", TRUE, pos=.GlobalEnv)
# only required to make the examples run automatically
# you should not call 'assign' if you run the examples manually
# the effect of setting 'get_settings_from_flowdex_package_root' to TRUE
# is that the file 'flowdex_settings.R' in 'root' of the installed package
# 'flowdex' will be sourced instead of the one in the user-defined location.
#
fdmat <- flowdexit(gateStrat = "gateStrat_2")
#> Reading in fcs files... ok. 
#> Producing gating set... Applying fjbiexp transformation... ok. 
#> Gating: (6 gates)
#> done!
#> DNA+: Extracting binned data on FITC.A (res=220) and recalc. to volume... ok. 
#> HighSSC_ffif: Extracting binned data on FSC.A (res=220) and recalc. to volume... ok. 
#> Exporting data (2 gates) to xlsx...ok. 
#> fdmat-object saved.
fdmat_cut <- cutFdmatToGate(fdmat, 2)
#
setwd(old_wd)