cyto_stats_compute-GatingSet-method: Compute Statistics - GatingSet Method

Description Usage Arguments Author(s) See Also Examples

Description

Calculate and export flow cytometry statistics for a GatingSet.

Usage

1
2
3
4
## S4 method for signature 'GatingSet'
cyto_stats_compute(x, alias = NULL,
  parent = NULL, channels = NULL, trans = NULL, stat = "median",
  density_smooth = 1.5, save = TRUE)

Arguments

x

object of class GatingSet.

alias

name(s) of the population(s) for which the statistic should be calculated.

parent

name(s) of the parent population(s) used calculate population frequencies. The frequency of alias in each parent will be returned as a percentage.

channels

names of of channels for which statistic should be calculated, set to all channels by default.

trans

object of class transformList or transformerList generated by estimateLogicle used to transform the fluorescent channels of x. The transformation list is required to apply the inverse transformation such that the required statistics are returned on the original linear scale.

stat

name of the statistic to calculate, options include "count", "freq", "median", "mode", "mean", "geo mean", "CV", or "freq".

density_smooth

smoothing parameter passed to density when calculating mode, set to 1.5 by default.

save

logical indicating whether statistical results should be saved to a csv file.

Author(s)

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

See Also

cyto_stats_compute,flowFrame-method

cyto_stats_compute,flowSet-method

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
library(CytoRSuiteData)

# Load in samples
fs <- Activation
gs <- GatingSet(fs)

# Apply compensation
gs <- compensate(gs, fs[[1]]@description$SPILL)

# Transform fluorescent channels
trans <- estimateLogicle(gs[[4]], cyto_fluor_channels(gs))
gs <- transform(gs, trans)

# Gate using gate_draw
gt <- Activation_gatingTemplate
gating(gt, gs)

# Compute statistics
cyto_stats_compute(gs,
  alias = "T Cells",
  channels = c("Alexa Fluor 488-A", "PE-A"),
  stat = "median",
  save = FALSE
)

cyto_stats_compute(gs,
  alias = "T Cells",
  stat = "geo mean",
  save = FALSE
)

cyto_stats_compute(gs,
  alias = c("CD4 T Cells", "CD8 T Cells"),
  stat = "count",
  save = FALSE
)

cyto_stats_compute(gs,
  alias = c("CD4 T Cells", "CD8 T Cells"),
  parent = c("Live Cells", "T Cells"),
  stat = "freq",
  save = FALSE
)

DillonHammill/CytoRSuite documentation built on May 30, 2019, 2:03 a.m.