preprocessing: Preprocess fcs files from a single experiment

Description Usage Arguments Value Examples

View source: R/preprocessing.R

Description

A function that preprocesses fcs files from a single experiment.

Usage

1
2
3
4
preprocessing(fcsFiles, assay = c("FCM", "CyTOF"), b = 1/200,
  fileSampleSize = 5000, compFiles = NULL,
  excludeTransformParameters = c("FSC-A", "FSC-W", "FSC-H", "Time",
  "Cell_length"))

Arguments

fcsFiles

A vector specifying the location of all fcs files.

assay

Either "FCM" or "CyTOF" to indicate the type of cytometry data.

b

A positive number used to specify the arcsinh transformation. f(x) = asinh (b*x) where x is the original value and f(x) is the value after transformation. The suggested value is 1/150 for flow cytometry (FCM) data and 1/8 for CyTOF data. If b = 0, the transformation is skipped.

fileSampleSize

An integer specifying the number of events sampled from each fcs file. If NULL, all the events will be pre-processed and wrote out to the new fcs files.

compFiles

A vector specifying the paths of user supplied compensation matrix for each fcs file. The matrix must be stored in csv files.

excludeTransformParameters

A vector specifying the name of parameters not to be transformed (left at linear scale).

Value

Returns a flowFrame object containing the preprocessed cytometry data. Cells from different fcs files are combined into one flow frame. A new parameter, sample_id, is introduced to indicate the origin of each cell.

Examples

1
2
3
4
5
6
# Find fcs files
files=system.file("extdata","SDY420/ResultFiles/CyTOF_result",
                  package="MetaCyto")
files=list.files(files,pattern="fcs$",full.names=TRUE)
# Preprocess
fcs = preprocessing(fcsFiles=files,assay ="CyTOF",b=1/8)

hzc363/MetaCyto documentation built on July 27, 2020, 2:46 a.m.