addGates: Add Polygon Gates

View source: R/gen-functions.R

addGatesR Documentation

Add Polygon Gates

Description

Load the predefined gating strategy (as .csv or .xlsx file) and apply the gates as defined in the file.

Usage

addGates(
  gs,
  gateStrat = ".",
  foN.gateStrat = ".",
  type.gateStrat = ".",
  verbose = "."
)

Arguments

gs

A gating set as produced by makeGatingSet.

gateStrat

Character length one. The name of the file defining the gating strategy. If left at the default '.', the name as defined in the settings file (key: 'fiN_gateStrat') will be used.

foN.gateStrat

Character length one. The name of the folder where the file defining the gating strategy and the gate definitions reside. If left at the default '.', the name as defined in the settings file (key: 'foN_gating') will be used.

type.gateStrat

Character length one, can be either 'csv' or 'xlsx'. The type of file defining the gating strategy. Currently, csv and xlsx files are supported. If left at the default '.', the filetype as defined in the settings (key: 'dV_gateStratInputType') file will be used.

verbose

Logical. If status messages should be displayed. If left at the default '.', the value as defined in the settings file (key 'dV_verbose') will be used.

Details

The gating strategy file can hold one or more gates. One row in the files represents one gate. In order to see a schematic representation of 'parent' and 'child' gates, simply use 'plot'.

Value

An object of class-GatingSet_fd.

See Also

Other Extraction functions: makeAddGatingSet(), makeGatingSet(), makefdmat()

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.
#
gs <- makeGatingSet()
gs
gs <- addGates(gs)
gs
#
setwd(old_wd)

bpollner/flowdex documentation built on March 31, 2022, 3:21 a.m.