prepSCE: Batch-wise preprocessing of CyTOF FCS files

View source: R/prepSCE.R

prepSCER Documentation

Batch-wise preprocessing of CyTOF FCS files

Description

prepSCE imports FCS files from a single batch as an NCDF format, format channel names, internally gates out dead cells and doublets based on the DNA and/or dead-cell-exclusion dyes provided, performs hyperbolic arcsin transformation, and returns a SingleCellExperiment object. When multiple batches of FCS files are provided, the preprocessing steps are performed in a batch-wise manner (in other words, in a loop), and the final results are merged into a single SCE object. Markers available in only a subset of batches will be discarded.

Usage

prepSCE(
  md,
  pd,
  file_name_keyword = "FILENAME",
  channel_length = "Event_length",
  channel_DNA = c("Ir191Di", "Ir193Di"),
  channel_LD = "Rh103Di",
  type = "CyTOF"
)

Arguments

md

A data.frame/data.table containing the following metadata:

  • full_path: the full path to the FCS file.

  • batch: the batch ID. A factor is preferred.

Other columns can also be inherited in the final SCE object.

pd

A list of data.frames/data.tables containing the following metadata:

  • chennel: the channel names.

  • antigen: the corresponding antigen names.

Note that exclusion dyes do not have to be included here. The list must be named with the corresponding batch IDs.

file_name_keyword

A character string. Specifies the keyword of the FCS files to be matched with the file names. Note that file name matching will be performed using the base, not full, file names.

channel_length

A character string. Specifies the channel name for the event length. Can also be NULL.

channel_DNA

A character vector of length two. Specifies the channel names for DNA dyes. Can also be NULL.

channel_LD

A character string. Specifies the channel name for the live/dead exclusion dye. Can also be NULL.

type

A string indicating the type of the underlying data. Can be either "CyTOF" or "Flow". Can also be set NULL to omit cytometry-specific data transformation.

Value

A SingleCellExperiment-class object.


casanova-lab/iMUBAC documentation built on Sept. 13, 2022, 6:36 p.m.