cytof_progression: Progression estimation of cytof expression data

View source: R/cytof_progression.R

cytof_progressionR Documentation

Progression estimation of cytof expression data

Description

Infer the progression based on the relationship of cell subsets estimated using ISOMAP or Diffusion map.

Usage

cytof_progression(
  data,
  cluster,
  method = c("isomap", "NULL"),
  distMethod = "euclidean",
  out_dim = 2,
  clusterSampleMethod = c("ceil", "all", "fixed", "min"),
  clusterSampleSize = 500,
  sampleSeed = 123
)

Arguments

data

Expression data matrix.

cluster

A vector of cluster results for the data.

method

Method for estimation of cell progression, isomap.

distMethod

Method for distance calculation, default is "euclidean", other choices like "manhattan", "cosine", "rankcor".

out_dim

Number of transformed dimensions choosen for output.

clusterSampleMethod

Cluster sampling method 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 cluster and combined for analysis. all: all cells from each cluster are combined for analysis. min: The minimum number of cells among all clusters are sampled from cluster 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 cluster and combined for analysis.

clusterSampleSize

The number of cells to be sampled from each cluster.

sampleSeed

The seed for random down sample of the clusters.

Value

a list. Includes: sampleData, sampleCluster and progressionData.

Examples

## Not run: 
d<-system.file('extdata', package='cytofkit2')
fcsFile <- list.files(d, pattern='.fcs$', full=TRUE)
parameters <- list.files(d, pattern='.txt$', full=TRUE)
markers <- as.character(read.table(parameters, header = TRUE)[, 1])
xdata <- cytof_exprsMerge(fcsFile, mergeMethod = 'fixed', fixedNum = 2000)
clusters <- cytof_cluster(xdata = xdata, method = "Rphenograph")
prog <- cytof_progression(data = xdata, cluster = clusters, clusterSampleSize = 100)
d <- as.data.frame(cbind(prog$progressionData, cluster = factor(prog$sampleCluster)))
cytof_clusterPlot(data =d, xlab = "diffusionmap_1", ylab="diffusionmap_2",
                  cluster = "cluster", sampleLabel = FALSE)

## End(Not run)

JinmiaoChenLab/cytofkit2 documentation built on May 12, 2022, 8:09 a.m.