Progression estimation of cytof expression data

Share:

Description

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

Usage

1
2
3
cytof_progression(data, cluster, method = c("diffusionmap", "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 or diffusionmap.

distMethod

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

out_dim

Number of transformed dimenions choosed 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

1
2
3
4
5
6
7
8
9
d<-system.file('extdata', package='cytofkit')
fcsFile <- list.files(d, pattern='.fcs$', full=TRUE)
parameters <- list.files(d, pattern='.txt$', full=TRUE)
markers <- as.character(read.table(parameters, sep = "\t", header = TRUE)[, 1])
xdata <- cytof_exprsMerge(fcsFile, markers = markers, 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)