cyto_calibrate: Calibrate channel ranges for cyto_plot

View source: R/cyto-helpers.R

cyto_calibrateR Documentation

Calibrate channel ranges for cyto_plot

Description

The density colour scale for points in cyto_plot can now be made to represent fluorescent intensity of a third channel, instead of local density in the 2D plotting space. In order for this feature to work properly, the full range for the channel/marker of interest is required to appropriately set the colour scale. cyto_calibrate performs this range calibration, so that this information can be used in all downstream cyto_plot calls.

Usage

cyto_calibrate(x, parent = "root", type = "range", probs = c(0.01, 0.99), ...)

Arguments

x

object of class cytoframe, cytoset, GatingHierarchy or GatingSet to use for the calibration. For the best calibration is recommended that users supply samples containing both negative and positive events in each channel.

parent

name of the parent population to use for channel calibration when a GatingHierarchy or GatingSet is supplied, set to the "root" node by default.

type

indicates the type of calibration to perform, options include "range" or "quantile". Range calibration simply uses the full range of values across samples for the calibration. Quantile calibration computes an lower and upper quantile for each channel, values falling outside the calibration range are assigned the bottom or top colour.

probs

vector of lower and upper probabilities passed to stats:quantile to compute quantiles, set to c(0.01, 0.99) by default.

...

not in use.

Value

saves calibration settings for use by cyto_plot.

Author(s)

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

Examples

library(CytoExploreRData)

# Activation flowSet
fs <- Activation

# Calibration
cyto_calibrate(fs)

# Colour based on Hoechst-405 staining
cyto_plot(fs[1],
channels = c("FSC-A", "SSC-A"),
point_col = "Hoechst-405")


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