createFSPY {flowSpy} | R Documentation

## create an FSPY object

### Description

This function is about how to build an FSPY object. An FSPY object is the base for the whole analysizing workflow of flow and mass cytometry data.

### Usage

    createFSPY(
      raw.data,
      markers,
      meta.data,
      batch = NULL,
      batch.correct = FALSE,
      normalization.method = "none",
      verbose = FALSE,
      ...
    )

### Arguments

`raw.data` | matrix. Raw data read from FCS file after perform preprocessing.
`markers` | vector. Detailed marker information in the gate of flow cytometer.
`meta.data` | data.frame. Raw metadata of each cell. Columns "cell" and "stage" are required.
`batch` | vector. Batch covariate (only one batch allowed). Method to correct batch effect function is refered to `ComBat`.
`batch.correct` | logical. Whether to correct batch effect. If TRUE, batch must be provided.
`normalization.method` | character. Normalization and transformation method. Whether to normalize and log transformed of raw.data. In flowSpy workflow, it's better to perform transformation of FCS data using `runExprsExtract` or `runExprsMerge` before creating an FSPY object. `flowSpy` only provide log transforma method. If you need to using truncateTransform, scaleTransform, linearTransform, quadraticTransform and lnTransform, see `flowCore` for more information. And `runExprsExtract` in `flowSpy`, autoLgcl, cytofAsinh, logicle, arcsinh, and logAbs can be used to perform transformation of FCS data.
`verbose` | logical. Whether to print calculation progress.
`...` | paramters pass to `correctBatchFSPY` function.

### Value

An FSPY object with raw.data and markers and meta.data

### Examples

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

    ## Build using test data
    markers <- c("CD43", "CD34", "CD90", "CD45RA",
                 "CD31", "CD49f", "CD73", "FLK1", "CD38")

    fspy <- createFSPY(raw.data = test.fcs.data,
                       markers = markers,
                       meta.data = test.meta.data,
                       normalization.method = "log",
                       verbose = TRUE)

    fspy

    }

[Package flowSpy version 1.0.4 Index]