cyto_merge_by: Merge a flowSet by experiment variables

View source: R/cyto-helpers.R

cyto_merge_byR Documentation

Merge a flowSet by experiment variables

Description

cyto_merge_by makes a call to cyto_group_by to split samples into groups based on experiment variables. The resulting groups are then converted to flowFrames using cyto_convert. cyto_merge_by is the preferred way to merge samples in CytoExploreR as it will ensure appropriate sampling in cyto_plot.

Usage

## S3 method for class 'GatingSet'
cyto_merge_by(
  x,
  parent = "root",
  merge_by = "all",
  select = NULL,
  barcode = TRUE,
  ...
)

## S3 method for class 'flowSet'
cyto_merge_by(x, merge_by = "all", select = NULL, barcode = TRUE, ...)

Arguments

x

object of class flowSet.

parent

name of the parent population to merge when a GatingSet object is supplied, set to the "root" node by default.

merge_by

vector of cyto_details column names (e.g. c("Treatment","Concentration") indicating how the samples should be grouped prior to merging.

select

selection critieria passed to cyto_select which indicates which samples in each group to retain prior to merging, set to NULL by default to merge all samples in each group. Filtering steps should be comma separated and wrapped in a list. Refer to cyto_select for more details.

barcode

logical indicating whether a call should be made to cyto_barcode prior to grouping and merging samples, set to TRUE by default. Barcoding helps cyto_sample to appropriately sample events based on the number of merged samples.

...

additional arguments passed to cyto_barcode.

Value

list of flowFrames merged by the grouping variables specified by merge_by.

Author(s)

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

See Also

cyto_group_by

cyto_select

cyto_barcode

cyto_sample

Examples


# Load CytoExploreRData to access data
library(CytoExploreRData)

# Activation flowSet
fs <- Activation

# Activation GatingSet
gs <- GatingSet(fs)

# Experiment details
cyto_details(fs)

# Merge samples by 'Treatment'
fr_list <- cyto_merge_by(fs, "Treatment")

# Merge samples by 'OVAConc'
fr_list <- cyto_merge_by(fs, "OVAConc")

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