runExprsMerge {flowSpy} | R 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

    runExprsMerge(
      fcsFiles,
      comp = FALSE,
      transformMethod = c("autoLgcl", "cytofAsinh", "logicle", "arcsinh", "logAbs", "none"),
      scaleTo = NULL,
      mergeMethod = c("ceil", "all", "fixed", "min"),
      fixedNum = 2000,
      ...
    )

### 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.
`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.
`...` | Other arguments passed to `runExprsExtract`

### Value

A matrix containing the merged expression data, with selected markers.

### Author(s)

Chen Hao

### References

Hao Chen, Mai Chan Lau, Michael Thomas Wong, Evan W. Newell, Michael Poidinger, Jinmiao Chen. Cytofkit: A Bioconductor Package for an Integrated Mass Cytometry Data Analysis Pipeline. PLoS Comput Biol, 2016.

### See Also

`runExprsExtract`

### Examples

    if (FALSE) {
      # See vignette tutorials for more information
      vignette("Quick_start", package = "flowSpy")

      # Path to your FCS files
      fcs.path <- "flowSpy-dataset/FCS/usecase2/"
      fcs.files <- paste0(fcs.path, "D", c(0,2,4,6,8,10), "-sub.fcs")

      # Merge FCS files, and each file contain 2000 cells
      set.seed(1)
      fcs.data <- runExprsMerge(fcs.files, comp = F, transformMethod = "none", fixedNum = 2000)
    }

[Package flowSpy version 1.0.4 Index]