set2DF: convert a flowSet to a data frame

Description Usage Arguments Value Examples

View source: R/set2DF.R

Description

A function that convert a flowSet to a data frame.

Usage

1
set2DF(flowSet, fcsFiles, y = NULL)

Arguments

flowSet

A flowSet object

fcsFiles

A vector containing the name of each fcs file included in flowSet.

y

The clinical outcome each fcs file associated with. Null for testing data.

Value

Returns a data frame containing the cytometry data. Cells from different fcs files are combined into one flow frame. A new column, xSample, is introduced to indicate the origin of each cell. The data frame also includes the clinical outcome y.

Examples

1
2
3
4
5
6
7
8
9
library(flowCore)
# Find the table containing fcs file names in CytoDx package
path <- system.file("extdata",package="CytoDx")
# read the table
fcs_info <- read.csv(file.path(path,"fcs_info.csv"))
# Specify the path to the cytometry files
fn <- file.path(path,fcs_info$fcsName)
fSet <- read.flowSet(fn)
df <- set2DF(flowSet=fSet,fcsFiles=fn,y = fcs_info$Label)

CytoDx documentation built on Nov. 8, 2020, 11 p.m.