cyto_extract: Extract a valid flowFrame or flowSet

View source: R/cyto-helpers.R

cyto_extractR Documentation

Extract a valid flowFrame or flowSet

Description

cyto_extract is essentially a wrapper for gs_pop_get_data which also accepts flowFrame or flowSet objects. The parent population is extracted from GatingHierarchy or GatingSet objects whilst flowFrame or flowSet objects are returned as is.

Usage

cyto_extract(
  x,
  parent = NULL,
  select = NULL,
  copy = FALSE,
  raw = FALSE,
  channels = NULL,
  ...
)

Arguments

x

object of class flowFrame, flowSet, GatingHierarchy or GatingSet.

parent

name of the parent population to extract from GatingHierarchy or GatingSet objects.

select

named list containing experimental variables to be used to select samples using cyto_select.

copy

logical indicating whether a deep copy of the extracted data should be returned.

raw

logical indicating whether a list of raw data matrices should be returned instead of a flowFrame or flowSet.

channels

names of the markers or channels for which data should be extracted, set to all channels by default.

...

additional arguments passed to gh_pop_get_data or gs_pop_get_data.

Value

either a flowFrame or a cytoset by default. A list of raw data matrices when raw is set to TRUE.

Author(s)

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

Examples


# Load in CytoExploreRData to access data
library(CytoExploreRData)

# GatingSet
gs <- GatingSet(Activation)

# Extract cytoframe
cf <- cyto_extract(gs[[1]], parent = "root")

# Extract cytoset
cs <- cyto_extract(gs, parent = "root")

# Extract raw data matrices
mt <- cyto_extract(gs, parent = "root", raw = TRUE)
mt[["Activation_1.fcs"]]

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