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
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"), FlowSOM_k = 40,
  clusterSampleSize = 500, resultDir = getwd(), saveResults = TRUE,
  saveObject = TRUE, ...)

Arguments

fcsFiles

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

markers

It can be either a text file where contains the makers 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

Either boolean value tells if do compensation (compensation matrix contained in FCS), or a compensation matrix to be applied.

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 selection are accepted.

visualizationMethods

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

progressionMethod

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

FlowSOM_k

Number of clusters for meta clustering in FlowSOM.

clusterSampleSize

The uniform size of each cluster.

resultDir

The directory where result files will be generated.

saveResults

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

saveObject

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

...

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

http://signbioinfo.github.io/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)   

haoeric/cytofkit_devel documentation built on May 17, 2019, 2:29 p.m.