cytofkit: cytofkit: an integrated mass cytometry data analysis pipeline

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/cytofkit.R

Description

The main function to drive the cytofkit workflow.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
cytofkit(fcsFiles = getwd(), markers = "parameter.txt",
  projectName = "cytofkit", ifCompensation = FALSE,
  transformMethod = c("autoLgcl", "cytofAsinh", "logicle", "arcsinh", "none"),
  mergeMethod = c("ceil", "all", "min", "fixed"), fixedNum = 10000,
  dimReductionMethod = c("tsne", "pca", "isomap"),
  clusterMethods = c("Rphenograph", "ClusterX", "DensVM", "FlowSOM", "NULL"),
  visualizationMethods = c("tsne", "pca", "isomap", "NULL"),
  progressionMethod = c("NULL", "diffusionmap", "isomap"),
  Rphenograph_k = 30, FlowSOM_k = 40, seed = NULL,
  clusterSampleSize = 500, resultDir = getwd(), saveResults = TRUE,
  saveObject = TRUE, openShinyAPP = FALSE, ...)

Arguments

fcsFiles

It can be either the path where your FCS files are stored or a vector of FCS file names.

markers

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

projectName

A prefix that will be added to the names of all result files.

ifCompensation

Boolean value, to apply compensation contained in FCS, or a compensation matrix.

transformMethod

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

mergeMethod

When multiple fcs files are selected, 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.

dimReductionMethod

The method used for dimensionality reduction, including tsne, pca and isomap.

clusterMethods

The clustering method(s) used for subpopulation detection, including DensVM, ClusterX, Rphenograph and FlowSOM. Multiple selections are accepted.

visualizationMethods

The method(s) used for visualize the cluster data, including tsne, pca and isomap. Multiple selections are accepted.

progressionMethod

Use the first ordination score of isomap to estimated the progression order of cells, choose NULL to ignore.

Rphenograph_k

Integer number of nearest neighbours to pass to Rphenograph.

FlowSOM_k

Number of clusters for meta clustering in FlowSOM.

seed

Integer to set a seed for reproducible results.

clusterSampleSize

The uniform size of each cluster.

resultDir

The directory where result files will be generated.

saveResults

Save the results, and the post-processing results including scatter plot, heatmap, and statistical results.

saveObject

Save the results into RData objects for loading back to R for further analysis

openShinyAPP

Opens the shinyAPP automatically when the analysis was done, default FALSE.

...

Other arguments passed to cytof_exprsExtract

Details

cytofkit works as the main funciton to perform the analysis of one or multiple FCS files. The workflow contains data merging from multiple FCS file, expression data transformation, dimensionality reduction with PCA, isomap or tsne (default), clustering analysis with methods includes DensVM, ClusterX, Rphenograph) and FlowSOM for subpopulation detection, and estimation of cellular progression using isomap. The analysis results can be visualized using scatter plot, heatmap plot or progression plot. Dimension reduced data and cluster labels will be saved back to new copies of FCS files. By default the analysis results will be automatically saved under resultDir for further annotation. Moreover An interactive web application is provided for interactive exploration of the analysis results, see cytofkitShinyAPP.

Value

a list containing expressionData, dimReductionMethod, visualizationMethods, dimReducedRes, clusterRes, progressionRes, projectName, rawFCSdir and resultDir. If choose 'saveResults = TRUE', results will be saved into files under resultDir.

Author(s)

Hao Chen, Jinmiao Chen

References

https://github.com/JinmiaoChenLab/cytofkit

See Also

cytofkit, cytofkit_GUI, cytofkitShinyAPP

Examples

1
2
3
4
5
dir <- system.file('extdata',package='cytofkit')
file <- list.files(dir, pattern='.fcs$', full=TRUE)
parameters <- list.files(dir, pattern='.txt$', full=TRUE)
## remove the hash symbol to run the following command
#cytofkit(fcsFile = file, markers = parameters) 

JinmiaoChenLab/cytofkit documentation built on Dec. 20, 2020, 8:52 p.m.