cytof_exprsMerge: Merge the expression matrix from multiple FCS files with...

View source: R/cytof_preProcess.R

cytof_exprsMergeR Documentation

Merge the expression matrix from multiple FCS files with preprocessing

Description

Apply preprocessing on each FCS file including compensation (for FCM data only) and transformation with selected markers, then expression matrix are extracted and merged using one of the methods, all, min, fixed or ceil

Usage

cytof_exprsMerge(
  fcsFiles,
  comp = FALSE,
  transformMethod = c("autoLgcl", "cytofAsinh", "logicle", "arcsinh", "none"),
  scaleTo = NULL,
  markers = NULL,
  mergeMethod = c("ceil", "all", "fixed", "min"),
  fixedNum = 10000,
  sampleSeed = 123,
  ...
)

Arguments

fcsFiles

A vector of FCS file names.

comp

If TRUE, does compensation by compensation matrix contained in FCS. Agrument also accepts a compensation matrix to be applied. Otherwise FALSE.

transformMethod

Data Transformation method, including autoLgcl, cytofAsinh, logicle and arcsinh, or none to avoid transformation.

scaleTo

Scale the expression to a specified range c(a, b), default is NULL.

markers

It can be either a text file that containing markers to be used for analysis or a vector of the marker names.

mergeMethod

Merge method for mutiple FCS expression data. cells can be combined using one of the four different methods including ceil, all, min, fixed. The default option is ceil, up to a fixed number (specified by fixedNum) of cells are sampled without replacement from each fcs file and combined for analysis. all: all cells from each fcs file are combined for analysis. min: The minimum number of cells among all the selected fcs files are sampled from each fcs file and combined for analysis. fixed: a fixed num (specified by fixedNum) of cells are sampled (with replacement when the total number of cell is less than fixedNum) from each fcs file and combined for analysis.

fixedNum

The fixed number of cells to be extracted from each FCS file.

sampleSeed

A sampling seed for reproducible expression matrix merging.

...

Other arguments passed to cytof_exprsExtract

Value

A matrix containing the merged expression data, with selected markers, row names added as filename_cellID, column names added as name<desc>.

See Also

cytof_exprsExtract

Examples

d<-system.file('extdata',package='cytofkit2')
fcsFiles <- list.files(d,pattern='.fcs$',full=TRUE)
merged <- cytof_exprsMerge(fcsFiles)

JinmiaoChenLab/cytofkit2 documentation built on May 12, 2022, 8:09 a.m.