Description Usage Arguments Details Value See Also Examples
separates BS4, BS5 and Debris population in a flowfile using an EM style algorithm. Algorithm starts with ncluster number of clusters and automatically reduces this number if need be.
1 2 | celldebris_emclustering(flowfile, channels, mu = NULL, sigma = NULL,
ncluster = 5, min.itera = 20, classifier = 0.8)
|
flowfile |
flowframe to be clustered. |
channels |
channels to use for the clustering |
mu |
pre-specified mean matrix for the clusters. Number of rows should equal ncluster and number of columns should equal length(channels). Defaults to NULL and will be computed from the data internally if left as NULL. |
sigma |
pre-specified list of variance-covariace matrix for the clusters. Each element of the list should contain a square matrix of variance-covariance matrix with length equal ncluster. Defaults to NULL and will be computed from the data internally if left as NULL. |
ncluster |
number of cluster desired. |
min.itera |
minimum number of EM iterations. |
classifier |
cells will be assigned to a cluster if belongs to that cluster by at least this probability. Only for plotting purposes. |
The function using EM algorithm involving mixtures of multivariate normals to separate the entire cell-population provided into cluster. The mvnorm
function is used to compute the densities and only the probabilites of each point belonging to a cluster are returned as additional columns to the
expression matrix of result.
list containing;
percentages - percentage of cells in each cluster
mus - matrix of mean vectors for each cluster
sigmas - list of variance-covariance matrix for each cluster
result - flowframe with probabilities of each cluster added as columns to the expression matrix of the flowfile
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | flowfile_path <- system.file("extdata", "B4_18_1.fcs", package = "cyanoFilter",
mustWork = TRUE)
flowfile <- flowCore::read.FCS(flowfile_path, alter.names = TRUE,
transformation = FALSE, emptyValue = FALSE,
dataset = 1) #FCS file contains only one data object
flowfile_nona <- cyanoFilter::nona(x = flowfile)
flowfile_noneg <- cyanoFilter::noneg(x = flowfile_nona)
flowfile_logtrans <- lnTrans(x = flowfile_noneg, c('SSC.W', 'TIME'))
cells_nonmargin <- cellmargin(flow.frame = flowfile_logtrans, Channel = 'SSC.W',
type = 'estimate', y_toplot = "FSC.HLin")
emapproach <- celldebris_emclustering(flowfile = cells_nonmargin$reducedflowframe,
channels = c("RED.B.HLin", "YEL.B.HLin",
"FSC.HLin", "RED.R.HLin"),
ncluster = 5, min.itera = 20)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.