Adds openCyto boundary gates at designated location, selectively cleaning out margin events that mess with various algorithms. Can return template for redo editing, as well as returns plots for troubleshooting.
Source:R/MarginClean.R
MarginClean.Rd
Adds openCyto boundary gates at designated location, selectively cleaning out margin events that mess with various algorithms. Can return template for redo editing, as well as returns plots for troubleshooting.
Usage
MarginClean(
gs,
desiredCols = NULL,
subset = "root",
themin = NULL,
themax,
returnTemplate = FALSE,
importTemplate = FALSE,
returnPlots = FALSE,
Verbose = FALSE,
inpath = NULL,
outpath = NULL,
filename = NULL,
yaxis = NULL,
sample.name = NULL,
inverse.transform = FALSE
)
Arguments
- gs
The GatingSet object you want to clean margins on
- desiredCols
Provide a vector of fluorophore names to clean margins for (see colnames(gs)), default NULL cleans margins for all fluorophores
- subset
Subset at which to start margin cleanup, default is root.
- themin
Default is NULL, provide a numeric value to establish a lower boundary to clean up small debris.
- themax
Provide a numeric value to set the upper boundary to exclude margin events.
- returnTemplate
Default is FALSE, returns assembled openCyto gating template allowing for adjustments that can be brought in with importTemplate and inpath
- importTemplate
Default is FALSE, when TRUE, retrieves previous returnTemplate .csv from the inpath location and uses for the openCyto gating
- returnPlots
Default is FALSE, when TRUE, returns a pdf of margin clean events to the outpath to verify didn't cut of the population of interest.
- Verbose
Default is FALSE, will print to console the frequency of retained cells after margin cleanup for each specimen
- inpath
Default NULL, alternatively a file.path to the template.csv being imported for openCyto gating
- outpath
Default NULL, provide a file.path to desired location to store either the returnTemplate or the returnPlot objects
- filename
Default NULL, alternatively set a name for returnTemplate or returnPlot objects
- yaxis
Sets yaxis fluorophore on returnPlots, the default NULL utilizes the first fluorophore in the panel
- sample.name
Used when returningPlots, default NULL uses TUBENAME as the keyword value provided when retrieving sample name for plot titles.
- inverse.transform
Default is FALSE, retaining input GatingSet transformation setting