cyto_transform: Apply Transformations to Cytometry Data

View source: R/cyto-helpers.R

cyto_transformR Documentation

Apply Transformations to Cytometry Data

Description

Apply Transformations to Cytometry Data

Usage

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

## Default S3 method:
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 class 'transformList'
cyto_transform(
  x,
  trans = NULL,
  plot = TRUE,
  popup = FALSE,
  axes_limits = "machine",
  ...
)

## S3 method for class '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.

Author(s)

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

See Also

cyto_transformer_log

cyto_transformer_arcsinh

cyto_transformer_biex

cyto_transformer_logicle

cyto_transformer_combine

Examples


# Load in CytoExploreRData to access data
library(CytoExploreRData)

# Activation flowSet
fs <- Activation

# Automatically transform flowSet
fs_trans <- cyto_transform(fs, type = "arcsinh")

# 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)

DillonHammill/CytoExploreR documentation built on March 2, 2023, 7:34 a.m.