Apply Transformations to Cytometry Data

cyto_transform(x, trans = NULL, ...)

# S3 method for default
cyto_transform(
  x,
  trans = NULL,
  type = "logicle",
  channels = NULL,
  parent = "root",
  select = NULL,
  inverse = FALSE,
  plot = TRUE,
  popup = FALSE,
  axes_limits = "machine",
  ...
)

# S3 method for transformList
cyto_transform(
  x,
  trans = NULL,
  plot = TRUE,
  popup = FALSE,
  axes_limits = "machine",
  ...
)

# S3 method for transformerList
cyto_transform(
  x,
  trans = NULL,
  inverse = FALSE,
  plot = TRUE,
  popup = FALSE,
  axes_limits = "machine",
  ...
)

Arguments

x

object of class flowFrame, flowSet, GatingHierarchy or GatingSet.

trans

object of class transformerList containing the transformation definitions to apply to x.

...

additional arguments passed to cyto_transformer_log, cyto_transformer_arcsinh, cyto_transformer_biex or cyto_transformer_logicle, when no trans object is supplied.

type

type of transformation to apply when no trans object is supplied, options include "log", "arcsinh", "biex" and "logicle".

channels

names of the channels to transform, set to all the fluorescent channels by default. Only required when no trans object is supplied.

parent

name of the parent population of GatingHierarchy or GatingSet objects used to visualise the transformations.

select

list of selection criteria passed to cyto_select to select a subset of samples for visualising the transformations.

inverse

logical indicating whether the inverse transformations should be applied. Currently only supported for flowFrame and flowSet objects.

plot

logical indicating whether the result of the transformations should be plotted using cyto_plot.

popup

logical indicating whether plots should be constructed in a popup window, set to FALSE by default.

axes_limits

options include "auto", "data" or "machine" to use optimised, data or machine limits respectively. Set to "machine" by default to use entire axes ranges. Fine control over axes limits can be obtained by altering the xlim and ylim arguments.

Value

object of class flowFrame, flowSet, GatingHierarchy or GatingSet with transformations applied.

See also

Author

Dillon Hammill, Dillon.Hammill@anu.edu.au

Examples

# Load in CytoExploreRData to access data library(CytoExploreRData) # Activation flowSet fs <- Activation # Automatically transform flowSet fs_trans <- cyto_transform(fs, type = "arcsinh")
#> Automatically transforming flowFrame/flowSet objects is not recommended as transformation definitions will be lost.
# Manually construct & apply transformations trans <- cyto_transformer_biex(fs)
fs_trans <- cyto_transform(fs, trans)
# Add fs to GatingSet gs <- GatingSet(fs) # Automatically transform GatingSet gs_trans <- cyto_transform(gs, type = "logicle")
# Manually construct & apply transformations trans <- cyto_transformer_logicle(gs)
gs_trans <- cyto_transform(gs, trans)