Title: | immunoClust - Automated Pipeline for Population Detection in Flow Cytometry |
---|---|
Description: | immunoClust is a model based clustering approach for Flow Cytometry samples. The cell-events of single Flow Cytometry samples are modelled by a mixture of multinominal normal- or t-distributions. The cell-event clusters of several samples are modelled by a mixture of multinominal normal-distributions aiming stable co-clusters across these samples. |
Authors: | Till Soerensen [aut, cre] |
Maintainer: | Till Soerensen <[email protected]> |
License: | Artistic-2.0 |
Version: | 1.39.3 |
Built: | 2024-12-26 03:45:23 UTC |
Source: | https://github.com/bioc/immunoClust |
Model based clustering and meta-custering routines for Flow Cytometry (FC) data.
The immunoClust-pipeline consits of two major procedures:
cell.process |
Clustering of cell-events |
meta.process |
Meta-clustering of cell-clusters |
Cell-events clustering is performed for each FC data sample separately. After this all cell-clustering results are collected in a vector and meta-clustering is performed to obtain the across samples popluations.
Package: | immunoClust |
Type: | Package |
Version: | 1.0.0 |
Depends: | R(>= 2.13.0), methods, stats, graphics, grid, lattice, flowCore |
Date: | 2015-01-28 |
License: | Artistic-2.0 |
Till Sörensen <[email protected]>
Sörensen, T., Baumgart, S., Durek, P., Grützkau, A. and Häupl, T. immunoClust - an automated analysis pipeline for the identification of immunophenotypic signatures in high-dimensional cytometric datasets. Cytometry A (accepted).
Calculates the Bhattacharyya Distance, Coefficient and Probability
bhattacharyya.prob(gM,gS, cM,cS, alpha=1) bhattacharyya.dist(gM, gS, cM, cS) bhattacharyya.coeff(gM,gS, cM,cS, alpha=1)
bhattacharyya.prob(gM,gS, cM,cS, alpha=1) bhattacharyya.dist(gM, gS, cM, cS) bhattacharyya.coeff(gM,gS, cM,cS, alpha=1)
gM , cM
|
|
gS , cS
|
|
alpha |
A value between 0 and 1 used to balance the bhattacharrya probabilities, coefficients calculated with either the full covariance matrices or using only the diagonal elements of it. |
Calculates the bhattacharyya probabilty, distance or coefficient of the clusters, i.e. Gaussian distributions. Distance and Coefficient are symetric for both clusters, whereas the probabity is not.
The Bhattacharyya probability, distance or coefficient
Till Sörensen [email protected]
data(dat.meta) prob <- bhattacharyya.prob(prop(dat.meta,"M",c()), prop(dat.meta,"S"), mu(dat.meta,1), sigma(dat.meta,1)) dist <- bhattacharyya.dist(prop(dat.meta,"M",c()), prop(dat.meta,"S"), mu(dat.meta,1), sigma(dat.meta,1)) coeff <- bhattacharyya.coeff(prop(dat.meta,"M",c()), prop(dat.meta,"S"), mu(dat.meta,1), sigma(dat.meta,1))
data(dat.meta) prob <- bhattacharyya.prob(prop(dat.meta,"M",c()), prop(dat.meta,"S"), mu(dat.meta,1), sigma(dat.meta,1)) dist <- bhattacharyya.dist(prop(dat.meta,"M",c()), prop(dat.meta,"S"), mu(dat.meta,1), sigma(dat.meta,1)) coeff <- bhattacharyya.coeff(prop(dat.meta,"M",c()), prop(dat.meta,"S"), mu(dat.meta,1), sigma(dat.meta,1))
Performs EM-iteration on cell events, where an initial event cluster membership is obtained by hierarchical clustering on a sample subset given a number of clusters.
cell.ClustData(data, K, parameters=NULL, expName="immunoClust Experiment", sample.number=1500, sample.standardize=TRUE, B=50, tol=1e-5, modelName="mvt")
cell.ClustData(data, K, parameters=NULL, expName="immunoClust Experiment", sample.number=1500, sample.standardize=TRUE, B=50, tol=1e-5, modelName="mvt")
data |
A numeric matrix, data frame of observations, or object of class flowFrame. Rows correspond to observations and columns correspond to measured parameters. |
K |
Given number of clusters for the final model. |
parameters |
A character vector specifying the parameters (columns) to be included in clustering. When it is left unspecified, all the parameters will be used. |
expName |
The name of the clustering experiment. |
sample.number |
The maximum number of samples used for initial hierarchical clustering. |
sample.standardize |
A numeric indicating whether the samples for hierarchical clustering are standardized (mean=0, SD=1). |
B |
The maximum number of EM-iterations. |
tol |
The tolerance used to assess the convergence of the EM-algorithm. |
modelName |
Used mixture model; either |
Although this function provides the possiblity to cluster an abitrary set of observed data into a fixed number of clusters, this function is used in the immunoClust-pipeline only for the calculation of the initial model with one cluster.
The fitted model cluster information in an object of class
immunoClust
.
Till Sörensen [email protected]
Sörensen, T., Baumgart, S., Durek, P., Grützkau, A. and Häupl, T. immunoClust - an automated analysis pipeline for the identification of immunophenotypic signatures in high-dimensional cytometric datasets. Cytometry A (accepted).
immunoClust-object
, cell.hclust
data(dat.fcs) res <- cell.ClustData(dat.fcs, parameters=c("FSC-A", "SSC-A"), 5) summary(res)
data(dat.fcs) res <- cell.ClustData(dat.fcs, parameters=c("FSC-A", "SSC-A"), 5) summary(res)
Performs EMt-iteration on cell event observations giving initial model
parameters and returns the fitted clusters information in an object of class
immunoClust
.
cell.EMt(data, K, w, m, s, parameters=NULL, expName="immunoClust Experiment", B=50, tol=1e-5, bias=0.5, modelName="mvt") cell.EMstep(data, K, w, m, s, parameters=NULL, expName="immunoClust EMstep", B=1, tol=1e-5, modelName="mvt") cell.Estep(data, K, w, m, s, parameters=NULL, expName="immunoClust Estep", scale_Z=TRUE, modelName="mvt")
cell.EMt(data, K, w, m, s, parameters=NULL, expName="immunoClust Experiment", B=50, tol=1e-5, bias=0.5, modelName="mvt") cell.EMstep(data, K, w, m, s, parameters=NULL, expName="immunoClust EMstep", B=1, tol=1e-5, modelName="mvt") cell.Estep(data, K, w, m, s, parameters=NULL, expName="immunoClust Estep", scale_Z=TRUE, modelName="mvt")
data |
A numeric matrix, data frame of observations, or object of class flowFrame. |
parameters |
A character vector specifying the parameters (columns) to be included in clustering. When it is left unspecified, all the parameters will be used. |
expName |
The name of the clustering experiment. |
K |
The number of clusters. |
w |
The |
m |
The |
s |
The |
B |
The maximum number of EMt-iterations. |
tol |
The tolerance used to assess the convergence of the EMt-algorithms. |
bias |
The ICL-bias used in the EMt-algorithm. |
scale_Z |
Scale the returned a-posteriori probabilities to one for each observed event. |
modelName |
Used mixture model; either |
Whereas cell.EMt
performs a complete EMt-iteration, cell.Estep
only calculates the a-posteriori probabilities and the Maximum-A-Posteriori
estimators of cluster membership for all events. For an EM-iteration use
cell.EMstep
.
The fitted clusters information in an object of class
immunoClust
.
Till Sörensen [email protected]
Sörensen, T., Baumgart, S., Durek, P., Grützkau, A. and Häupl, T. immunoClust - an automated analysis pipeline for the identification of immunophenotypic signatures in high-dimensional cytometric datasets. Cytometry A (accepted).
data(dat.fcs) data(dat.exp) ## cell.clustering result for dat.fcs r <- dat.exp[[1]] summary(r) ## apply model parameter to all (unfiltered) events dat.trans <- trans.ApplyToData(r, dat.fcs) r2 <- cell.EMt(dat.trans, K=ncls(r), w=weights(r),m=mu(r),s=sigma(r), parameters=parameters(r)) summary(r2)
data(dat.fcs) data(dat.exp) ## cell.clustering result for dat.fcs r <- dat.exp[[1]] summary(r) ## apply model parameter to all (unfiltered) events dat.trans <- trans.ApplyToData(r, dat.fcs) r2 <- cell.EMt(dat.trans, K=ncls(r), w=weights(r),m=mu(r),s=sigma(r), parameters=parameters(r)) summary(r2)
The function fits initial model parameters to specific observed cell event data.
The function returns the cluster information of the fitted model in an object
of class immunoClust
.
cell.FitModel(x, data, B=50, tol=1e-5, bias=0.5, modelName="mvt" ) cell.Classify(x, data, modelName="mvt" )
cell.FitModel(x, data, B=50, tol=1e-5, bias=0.5, modelName="mvt" ) cell.Classify(x, data, modelName="mvt" )
x |
An immunoClust object with the initial model parameter
( |
data |
A numeric matrix, data frame of observations, or object of class flowFrame. |
B |
The maximum number of EMt-iterations. |
tol |
The tolerance used to assess the convergence of the EMt-algorithms. |
bias |
The ICL-bias used in the EMt-algorithm. |
modelName |
Used mixture model; either |
These functions are wrapper of the functions cell.EM
and
cell.Estimation
, when model cluster parameters are combined in an object
of class immunoClust
and are used in the iterative cell event clustering
process cell.process
of immunoClust and are not intended to
be called directly.
The fitted model cluster information in an object of class
immunoClust
.
Till Sörensen [email protected]
Sörensen, T., Baumgart, S., Durek, P., Grützkau, A. and Häupl, T. immunoClust - an automated analysis pipeline for the identification of immunophenotypic signatures in high-dimensional cytometric datasets. Cytometry A (accepted).
cell.process
, cell.EMt
, cell.Estep
data(dat.fcs) data(dat.exp) r1 <- dat.exp[[1]] dat.trans <- trans.ApplyToData(r1, dat.fcs) r2 <- cell.FitModel(r1, dat.trans)
data(dat.fcs) data(dat.exp) r1 <- dat.exp[[1]] dat.trans <- trans.ApplyToData(r1, dat.fcs) r2 <- cell.FitModel(r1, dat.trans)
Performs model based agglomerative clustering on cell event observations with weights. It is used in the interative cell event clustering approach of immunoClust to obtain an initial cluster membership for the EM(t)-iteration.
cell.hclust(data, weights=NULL)
cell.hclust(data, weights=NULL)
data |
The numeric |
weights |
The |
This function is used internally in cell.TestSubCluster
procedure
of immunoClust.
A numeric -dimensional matrix which gives the
minimum index for observations in each of the two clusters merged at the
ith step in each row.
Till Sörensen [email protected]
Sörensen, T., Baumgart, S., Durek, P., Grützkau, A. and Häupl, T. immunoClust - an automated analysis pipeline for the identification of immunophenotypic signatures in high-dimensional cytometric datasets. Cytometry A (accepted).
cell.TestSubCluster
, cell.process
data(dat.fcs) inc <- sample(1:nrow(dat.fcs), 50) result <- cell.hclust(exprs(dat.fcs)[inc,])
data(dat.fcs) inc <- sample(1:nrow(dat.fcs), 50) result <- cell.hclust(exprs(dat.fcs)[inc,])
Performs an EM-iteration on cell event observations given an initial cluster
membership for the cell events and returns the fitted cluster information in an
object of class immunoClust
.
cell.MEstep(data, label, parameters=NULL, expName="immunoClust Experiment", B=1, tol=1e-5, modelName="mvt") cell.Mstep(data, label, parameters=NULL, expName="immunoClust Mstep", modelName="mvt")
cell.MEstep(data, label, parameters=NULL, expName="immunoClust Experiment", B=1, tol=1e-5, modelName="mvt") cell.Mstep(data, label, parameters=NULL, expName="immunoClust Mstep", modelName="mvt")
data |
A numeric matrix, data frame of observations, or object of class flowFrame. |
parameters |
A character vector specifying the parameters (columns) to be included in clustering. When it is left unspecified, all the parameters will be used. |
expName |
The name of the clustering experiment. |
label |
The |
B |
The maximum number of EMt-iterations. |
tol |
The tolerance used to assess the convergence of the EMt-algorithms. |
modelName |
Used mixture model; either |
cell.ME
and cell.MEstep
do the same call. In cell.MEstep
the calling options are a bit better structured and cell.ME
becomes deprecated in future.
The fitted clusters information in an object of class
immunoClust
.
Till Sörensen [email protected]
Sörensen, T., Baumgart, S., Durek, P., Grützkau, A. and Häupl, T. immunoClust - an automated analysis pipeline for the identification of immunophenotypic signatures in high-dimensional cytometric datasets. Cytometry A (accepted).
data(dat.fcs) data(dat.exp) ## cell.clustering result for dat.fcs r1 <- dat.exp[[1]] summary(r1) ## apply model parameter to all (unfiltered) events dat.trans <- trans.ApplyToData(r1, dat.fcs) r2 <- cell.MEstep(dat.trans, label(r1), parameters=parameters(r1) ) summary(r2)
data(dat.fcs) data(dat.exp) ## cell.clustering result for dat.fcs r1 <- dat.exp[[1]] summary(r1) ## apply model parameter to all (unfiltered) events dat.trans <- trans.ApplyToData(r1, dat.fcs) r2 <- cell.MEstep(dat.trans, label(r1), parameters=parameters(r1) ) summary(r2)
This function performs iterative model based clustering on cell-event data. It
takes the observed cell-event data as major input and returns an object of class
immunoClust
, which contains the fitted mixture model parameter and
cluster membership information. The additional arguments control the routines
for data preprocessing, major loop and EMt-iteration, the model refinement
routine and transformation estimation.
cell.process(fcs, parameters=NULL, apply.compensation=FALSE, classify.all=FALSE, N=NULL, min.count=10, max.count=10, min=NULL, max=NULL, I.buildup=6, I.final=4, I.trans=I.buildup, modelName="mvt", tol=1e-5, bias=0.3, sub.tol= 1e-4, sub.bias=bias, sub.thres=bias, sub.samples=1500, sub.extract=0.8, sub.weights=1, sub.standardize=TRUE, trans.estimate=TRUE, trans.minclust=10, trans.a=0.01, trans.b=0.0, trans.parameters=NULL) cell.MajorIterationLoop(dat, x=NULL, parameters=NULL, I.buildup=6, I.final=4, modelName="mvt", tol=1e-5, bias=0.3, sub.bias=bias, sub.thres=0.0, sub.tol=1e-4, sub.samples=1500, sub.extract=0.8, sub.weights=1, sub.EM="MEt", sub.standardize=TRUE) cell.MajorIterationTrans(fcs, x=NULL, parameters=NULL, I.buildup=6, I.final=4, I.trans=I.buildup, modelName="mvt", tol=1e-5, bias=0.3, sub.bias=bias, sub.thres=0.0, sub.tol=1e-4, sub.samples=1500, sub.extract=0.8, sub.weights=1, sub.EM="MEt", sub.standardize=TRUE, trans.minclust=5, trans.a=0.01, trans.decade=-1, trans.scale=1.0, trans.proc="vsHtransAw") cell.InitialModel(dat, parameters=NULL, trans.a = 0.01, trans.b = 0.0, trans.decade=-1, trans.scale=1.0) cell.classifyAll(fcs, x, apply.compensation=FALSE)
cell.process(fcs, parameters=NULL, apply.compensation=FALSE, classify.all=FALSE, N=NULL, min.count=10, max.count=10, min=NULL, max=NULL, I.buildup=6, I.final=4, I.trans=I.buildup, modelName="mvt", tol=1e-5, bias=0.3, sub.tol= 1e-4, sub.bias=bias, sub.thres=bias, sub.samples=1500, sub.extract=0.8, sub.weights=1, sub.standardize=TRUE, trans.estimate=TRUE, trans.minclust=10, trans.a=0.01, trans.b=0.0, trans.parameters=NULL) cell.MajorIterationLoop(dat, x=NULL, parameters=NULL, I.buildup=6, I.final=4, modelName="mvt", tol=1e-5, bias=0.3, sub.bias=bias, sub.thres=0.0, sub.tol=1e-4, sub.samples=1500, sub.extract=0.8, sub.weights=1, sub.EM="MEt", sub.standardize=TRUE) cell.MajorIterationTrans(fcs, x=NULL, parameters=NULL, I.buildup=6, I.final=4, I.trans=I.buildup, modelName="mvt", tol=1e-5, bias=0.3, sub.bias=bias, sub.thres=0.0, sub.tol=1e-4, sub.samples=1500, sub.extract=0.8, sub.weights=1, sub.EM="MEt", sub.standardize=TRUE, trans.minclust=5, trans.a=0.01, trans.decade=-1, trans.scale=1.0, trans.proc="vsHtransAw") cell.InitialModel(dat, parameters=NULL, trans.a = 0.01, trans.b = 0.0, trans.decade=-1, trans.scale=1.0) cell.classifyAll(fcs, x, apply.compensation=FALSE)
fcs |
An object of class flowFrame. Rows correspond to observations and columns correspond to measured parameters. |
dat |
A numeric matrix, data frame of observations, or object of class flowFrame. Rows correspond to observations and columns correspond to measured parameters. |
x |
An object of class |
Arguments for data pre and post processing:
parameters |
A character vector specifying the parameters (columns) to be included in clustering. When it is left unspecified, all the parameters will be used. |
apply.compensation |
A numeric indicator whether the compensation matrix in the flowFrame should be applied. |
classify.all |
A numeric indicator whether the removed over- and underexposed observations should also be classified after the clustering process. |
N |
Maximum number of observations used for clustering. When unspecified
or higher than the number of observations (i.e. rows) in dat, all observations
are used for clustering, otherwise only the first |
min.count |
An integer specifying the threshold count for filtering data
points from below. The default is 10, meaning that if 10 or more data points
are smaller than or equal to |
max.count |
An integer specifying the threshold count for filtering
data points from above. Interpretation is similar to that of |
min |
The lower limit set for data filtering. Note that it is a vector of length equal to the number of parameters (columns), implying that a different value can be set for each parameter. |
max |
The upper limit set for data filtering. Interpretation is similar to
that of |
Arguments for the major loop and EMt-iteration:
I.buildup |
The number of major iterations, where the number of used observations is doubled successively. |
I.final |
The number of major iterations with all observations. |
I.trans |
The number of iterations where transformation estimation is applied. |
modelName |
Used mixture model; either |
tol |
The tolerance used to assess the convergence of the major EM(t)-algorithms of all observations. |
bias |
The ICL-bias used in the major EMt-algorithms of all observations. |
Arguments for model refinement (sub-clustering):
sub.tol |
The tolerance used to assess the convergence of the EM-algorithms in the sub-clustering. |
sub.bias |
The ICL-bias used in the sub-clustering EMt-algorithms, in general the same as the ICL-bias. |
sub.thres |
Defines the threshold, below which an ICL-increase is meaningless. The threshold is given as the multiple (or fraction) of the costs for a single cluster. |
sub.samples |
The number of samples used for initial hierarchical clustering. |
sub.extract |
The threshold used for cluster data extraction. |
sub.weights |
Power of weights applied to hierarchical clustering, where the used weights are the probabilities of cluster membership. |
sub.EM |
Used EM-algorithm; either |
sub.standardize |
A numeric indicating whether the samples for hierarchical clustering are standardized (mean=0, SD=1). |
Arguments for transformation optimization:
trans.estimate |
A numeric indicator whether transformation estimation should be applied. |
trans.minclust |
The minimum number of clusters required to start transformation estimation. |
trans.a |
A numeric vector, giving the (initial) scaling |
trans.b |
A numeric vector, giving the (initial) translation |
trans.parameters |
A character vector, specifying the parameters (columns)
to be applied for transformation. When it is left unspecified, the parameters
to be transformed are obtained by the |
trans.decade |
A numeric scale value for the theorectical maximum of transformed observation value. If below 0, no scaling of the trasnformed values is applied, which is the default in the immunoClust-pipeline. |
trans.scale |
A numeric scaling factor for the linear (i.e. not transformed) parameters. By default the linear parameters (normally the scatter parameters) are not scaled. |
trans.proc |
An experimental switch for alternative procedures; should be "vsHtransAw". |
The cell.process
function does data preprocessing and calls the major
iteration loop either with or without integrated transformation optimization.
When transformation optimization is applied the transformation parameters give
the initial transformation otherwise they define the fixed
transformation.
The major iteration loop with included transformation optimization relies on
flowFrames
structure from the flowCore
-package for the storage of
the observed data.
The cell.InitialModel
builds up an initial immunoClust-object
with one cluster and the given transformation parameters.
The cell.classifyAll
calculates the cluster membership for the removed
cell events. The assigment of the cluster membership is critical for over- and
underexposed obsevervations and the interpretaion is problematic.
The fitted model information in an object of class
immunoClust
.
a) The data preprocessing arguments (min.count
, max.count
,
min
and max
) for removing over- and underexposed observations are
adopted from flowCust-package
with the same meaning.
b) The sub.thres
value is given in here in relation to the single
cluster costs
.
An absolute increase of the log-likelihood above is reported as
reasonable from the literature. From our experience a higher value is required
for this increase in FC data. For the ICL-bias and the sub.thres identical
values were chosen. For the CyTOF dataset this value had been adjusted to 0.05
since the absolute increase of the log-likelihood became to high due to the
high number of parameters.
c) The sub.extract
value controls the smooth data extraction for a
cluster. A higher value includes more events for a cluster in the
sub-clustering routine.
d) The default value of trans.a=0.01
for the initial transformation is
optimized for Fluorescence Cytometry. For CyTOF data the initial scaling value
was trans.a=1.0
.
Till Sörensen [email protected]
Sörensen, T., Baumgart, S., Durek, P., Grützkau, A. and Häupl, T. immunoClust - an automated analysis pipeline for the identification of immunophenotypic signatures in high-dimensional cytometric datasets. Cytometry A (accepted).
immunoClust-object
,
plot
,
splom
,
cell.FitModel
,
cell.SubClustering
,
trans.FitToData
data(dat.fcs) res <- cell.process(dat.fcs) summary(res)
data(dat.fcs) res <- cell.process(dat.fcs) summary(res)
Gives information about the amount of overexposed cell-event observetion in a FCS-file.
removed.above(fcs, parameters=NULL, N=NULL, max.count=10, max=NULL) removed.below(fcs, parameters=NULL, N=NULL, min.count=10, min=NULL)
removed.above(fcs, parameters=NULL, N=NULL, max.count=10, max=NULL) removed.below(fcs, parameters=NULL, N=NULL, min.count=10, min=NULL)
fcs |
An object of class flowFrame. Rows correspond to observations and columns correspond to measured parameters. |
parameters |
A character vector specifying the parameters (columns) to be included in clustering. When it is left unspecified, all the parameters will be used. |
N |
Maximum number of observations used for clustering. When unspecified
or higher than the number of observations (i.e. rows) in dat, all observations
are used for clustering, otherwise only the first |
max.count |
An integer specifying the threshold count for filtering data
points from above. The default is 10, meaning that if 10 or more data points
are larger than or equal to |
max |
The upper limit set for data filtering. Note that it is a vector of length equal to the number of parameters (columns), implying that a different value can be set for each parameter. |
min.count |
analoguous to |
min |
analoguous to |
A table with two rows containing the number of events above max
in
each parameter and above in only this parameter. The two last columns
give the sum and percentage of all events above max
in any parameter.
Till Sörensen [email protected]
data(dat.fcs) removed.above(dat.fcs)
data(dat.fcs) removed.above(dat.fcs)
These function tests each cell-cluster of a model for refining it into more
sub-clusters and returns the refined model parameter in an object of class
immunoClust
.
cell.SubClustering( x, dat, B=50, tol=1e-5, thres=0.1, bias=0.5, sample.weights=1, sample.EM="MEt", sample.number=1500, sample.standardize=TRUE, extract.thres=0.8, modelName="mvt") cell.TestSubCluster(x, y, t, cluster, J=8, B=500, tol=1e-5, bias=0.5, sample.EM="MEt", sample.df=5, sample.number=1500, sample.standardize=TRUE, modelName="mvt")
cell.SubClustering( x, dat, B=50, tol=1e-5, thres=0.1, bias=0.5, sample.weights=1, sample.EM="MEt", sample.number=1500, sample.standardize=TRUE, extract.thres=0.8, modelName="mvt") cell.TestSubCluster(x, y, t, cluster, J=8, B=500, tol=1e-5, bias=0.5, sample.EM="MEt", sample.df=5, sample.number=1500, sample.standardize=TRUE, modelName="mvt")
x |
An immunoClust object with the initial model parameter
( |
dat |
A numeric matrix, data frame of observations, or object of class flowFrame. |
B |
The maximum number of EM(t)-iterations in Sub-Clustering. |
tol |
The tolerance used to assess the convergence of the EM(t)-algorithms in Sub-Clustering. |
thres |
Defines the threshold, below which an ICL-increase is meaningless. The threshold is given as the multiple (or fraction) of the costs for a single cluster. |
bias |
The ICL-bias used in the EMt-algorithm. |
sample.weights |
Power of weights applied to hierarchical clustering, where the used weights are the probabilities of cluster membership. |
sample.EM |
Used EM-algorithm; either |
sample.number |
The number of samples used for initial hierarchical clustering. |
sample.standardize |
A numeric indicating whether the samples for hierarchical clustering are standardized (mean=0, SD=1). |
extract.thres |
The threshold used for cluster data extraction. |
modelName |
Used mixture model; either |
y |
A numeric matrix of the observations beloning to the particular cluster. |
t |
A numeric vector with the probability weights for the observations belonining to the particular cluster. |
cluster |
An integer index of the particular cluster |
J |
The number of sub-models to be builded and tested for a particular cluster. |
sample.df |
Degree of freedom for the t-distibutions in a t-mixture model. Has to be 5 in immunoClust. |
These function are used internally by the cell-clustering procedures of
cell.process
in immunoClust and are not intended to be used
directly.
The cluster parameters of the refined model in an object of class
immunoClust
.
Till Sörensen [email protected]
Sörensen, T., Baumgart, S., Durek, P., Grützkau, A. and Häupl, T. immunoClust - an automated analysis pipeline for the identification of immunophenotypic signatures in high-dimensional cytometric datasets. Cytometry A (accepted).
data(dat.fcs) data(dat.exp) dat.trans <- trans.ApplyToData(dat.exp[[1]], dat.fcs) #need to re-calculate the cluster membership probabilities # not stored in dat.exp r1 <- cell.Classify(dat.exp[[1]], dat.trans) summary(r1) r2 <- cell.SubClustering(r1, dat.trans) summary(r2)
data(dat.fcs) data(dat.exp) dat.trans <- trans.ApplyToData(dat.exp[[1]], dat.fcs) #need to re-calculate the cluster membership probabilities # not stored in dat.exp r1 <- cell.Classify(dat.exp[[1]], dat.trans) summary(r1) r2 <- cell.SubClustering(r1, dat.trans) summary(r2)
A vector
of immunoClust-objects
with cell.process
clustering results of five samples.
data("dat.exp")
data("dat.exp")
Cell-event clustering was performed on reduced (10.000 events) sample data of the dataset of immunoClust, MACS-depleted populations datasets 2010. URL http://flowrepository.org/id/FR-FCM-ZZWB.
A vector of 5 immnoClust-objects
for the
cell clustering results of 5 FC samples.
[[1]]
CD19 MACS-depleted cells
[[2]]
CD15 MACS-depleted cells
[[3]]
CD14 MACS-depleted cells
[[4]]
CD4 MACS-depleted cells
[[5]]
CD3 MACS-depleted cells
http://flowrepository.org/id/FR-FCM-ZZWB
data(dat.exp) ## process meta clustering meta <- meta.process(dat.exp, meta.bias=0.6) ## extract event counts in the 5 samples for all meta clusters res <- meta.numEvents(meta)
data(dat.exp) ## process meta clustering meta <- meta.process(dat.exp, meta.bias=0.6) ## extract event counts in the 5 samples for all meta clusters res <- meta.numEvents(meta)
flowFrame
data sample with 10.000 events in 7 parameters.
data(dat.fcs)
data(dat.fcs)
This FCS sample is a reduced (10.000 events) dataset in flowFrame format of the first sample in the dataset of immunoClust, MACS-depleted populations datasets 2010. URL http://flowrepository.org/id/FR-FCM-ZZWB.
A flowCore
flowFrame
with 10.000 observations on the following
7 parameters.
FCS-A
Forward scatter
SSC-A
Sideward scatter
FITC-A
CD14
PE-A
CD19
APC-A
CD15
APC-Cy7-A
CD4
Pacific Blue-A
CD3
http://flowrepository.org/id/FR-FCM-ZZWB
data(dat.fcs) show(dat.fcs) ## Not run: ## process cell clustering dat.res <- cell.process(dat.fcs) ## apply asinh-transformation dat.fcs.transformed <- trans.ApplyToData(dat.res, dat.fcs) ## plot results splom(dat.res, dat.fcs.transformed,N=1000) ## End(Not run)
data(dat.fcs) show(dat.fcs) ## Not run: ## process cell clustering dat.res <- cell.process(dat.fcs) ## apply asinh-transformation dat.fcs.transformed <- trans.ApplyToData(dat.res, dat.fcs) ## plot results splom(dat.res, dat.fcs.transformed,N=1000) ## End(Not run)
The Meta-clustering result of the dat.exp
data set.
data("dat.meta")
data("dat.meta")
The Meta-clustering was performed with an ICL-bias of 0.4.
A list-object containing the meta-clusering result. A detailed
description is documented in the value section for the
meta.process
function.
http://flowrepository.org/id/FR-FCM-ZZWB
data(dat.meta) ## extract event counts in the 5 samples for all meta clusters res <- meta.numEvents(dat.meta)
data(dat.meta) ## extract event counts in the 5 samples for all meta clusters res <- meta.numEvents(dat.meta)
Collection of generic function definitions used in immunoClust
either for an immunoClust
or an immunoMeta
object.
nsam(object, ...) sam_ncls(object, ...) sam_clsWeights(object, ...) sam_clsEvents(object, ...) sam_clsMu(object, ...) sam_clsSigma(object, ...) nobs(object, ...) npar(object, ...) ncls(object, ...) weights(object, ...) mu(object, ...) sigma(object, ...) label(object, ...) aposteriori(object, ...) subset(x, ...) parameters(object, ...) transformParams(object, ...) clusterCoeff(object, ...) clusterDist(object, ...) clusterProb(object, ...)
nsam(object, ...) sam_ncls(object, ...) sam_clsWeights(object, ...) sam_clsEvents(object, ...) sam_clsMu(object, ...) sam_clsSigma(object, ...) nobs(object, ...) npar(object, ...) ncls(object, ...) weights(object, ...) mu(object, ...) sigma(object, ...) label(object, ...) aposteriori(object, ...) subset(x, ...) parameters(object, ...) transformParams(object, ...) clusterCoeff(object, ...) clusterDist(object, ...) clusterProb(object, ...)
object , x
|
an object to apply the function. |
... |
addionional options to be passed to methods |
The appropriate value for the specific cal (see dection Details).
returns the number of cell-event immunoClust
-objects
co-clustered in the immunoMeta
-object.
returns the cluster weights of all samples cell-clusters.
returns the cluster event numbers of all samples cell-clusters.
returns the cluster means of all samples cell-clusters.
returns the cluster co-variance matrices of all samples cell-clusters.
already generic in stats
. Here, returns the number of
clustered objects either cell-events or cell-clusters in cell event or
meta clustering.
returns the number of parameters used for clustering.
returns the number of clusters, either cell-event cluster or meta-cluster.
already generic in stats
. Here, returns the weights
of the mixture models for the cell-event or meta-clustering.
returns the cluster means.
already generic in stats
. Here, returns the co-variance
matrices of the clusters.
returns the cluster label, i.e. the assignment of the clustered objects to the clusters.
returns the a posteriori probabilities of cluster membership for the clustered objects.
returns the number of cell-events for the clusters.
alreay generic in stats
. Here, returns an object with
mixture model on a subset of parameters.
already generic in flowCore
. Here, lists the
parameters used for clustering.
Modifies the list of parameters used for clustering.
return an object with transformed mixture model parameters.
returns the bhattacharrya coefficient of meta clusters for a meta level.
returns the bhattacharrya distance of meta clusters for a meta level.
returns the bhattacharrya probability of meta clusters for a meta level.
Till Sörensen [email protected]
The immunoClust
object contains the clustering results in the
immunoClust-pipeline as obtained by cell.process
or
meta.process
.
## S4 method for signature 'immunoClust' summary(object) ## S4 method for signature 'immunoClust' show(object)
## S4 method for signature 'immunoClust' summary(object) ## S4 method for signature 'immunoClust' show(object)
object |
An object of class |
An object of class immunoClust
has the following slots:
expName |
The name of the clustering experiment. |
fcsName |
The path of the clustered FCS-file. |
parameters |
The parameters used for clustering. |
removed.below |
Number of observations removed from below. |
removed.above |
Number of observations removed from above. |
trans.a |
The -dimensional vector of the scaling factors for
the asinh-transformation of each used parameter. A scaling factor of 0 indicates
that a parameter is not transformed. |
trans.b |
The -dimensional vector of the translations for the
asinh-transformation of each used parameter. |
trans.decade |
experimental; should be -1. |
trans.scale |
experimental; should be 1.0. |
K |
The number of clusters. |
N |
The number of observations. |
P |
The number of used parameters. |
w |
The -dimensional vector of the mixture proportions. |
mu |
The -dimensional matrix of the estimated
cluster means. |
sigma |
The -dimensional matrix of the
estimated cluster covariance matrices. |
z |
The -dimensional matrix containing the a-posteriori
probabilities of cluster membership. |
label |
The -dimensional vector containing the maximum a
posteriori estimator for cluster membership. |
logLike |
A vector of length 3 containing the BIC, ICL and the classification likelihood without penalty of the fitted model. |
BIC |
The Bayesian Information Criterion for the fitted mixture model. |
ICL |
The Integrate Classification Likelihood for the fitted model. |
history |
experimental; unused so far. |
state |
experimental; unused so far. |
Till Sörensen [email protected]
Sörensen, T., Baumgart, S., Durek, P., Grützkau, A. and Häupl, T. immunoClust - an automated analysis pipeline for the identification of immunophenotypic signatures in high-dimensional cytometric datasets. Cytometry A (accepted).
data(dat.exp) summary(dat.exp[[1]])
data(dat.exp) summary(dat.exp[[1]])
The immunoMeta
object contains the clustering results in the
immunoClust-pipeline obtained by meta.process
.
Additionally, it offers methods to structure the meta-clusters and
build up a hierarchical annotation tree.
immunoMeta(res,dat,gating) ## S3 method for class 'immunoMeta' summary(object, ...) ## S3 method for class 'immunoMeta' show(object)
immunoMeta(res,dat,gating) ## S3 method for class 'immunoMeta' summary(object, ...) ## S3 method for class 'immunoMeta' show(object)
res |
An |
dat |
The data on which the meta-clustering was performed. |
gating |
a hierarchial structure annotation of the meta-clusters. |
object |
An object of class |
... |
additinal options for underlying methods. |
An object of class immunoMeta
has the following slots:
dat.clusters |
A dat list-object of the cell event clusters
used for meta-clustering. |
res.clusters |
The
immunoClust-object of the fitted
meta-clustering mixture model. |
dat.scatter |
A dat list-object of the scatter parameters for
the cell event clusters used for scatter clustering. |
res.scatter |
The
immunoClust-object of the fitted
scatter-clustering mixture model. |
gating |
A list-object containing the hierarchical annotation-tree. |
The components of the dat
list-objects are:
P |
The number of parameters for the cell event clusters. |
N |
The number of cell-clustering experiments. |
K |
The -dimensional vector with the numbers of cell event
clusters in each experiment. The total number of clusters is
. |
W |
The -dimensional vector with the mixture proportions
of all clusters. |
M |
The -dimensional matrix of all cluster means. |
S |
The -dimensional matrix of all cluster
covariance matrices. |
expNames |
The -dimensional character vector with the
cell-clustering experiment names. |
expEvents |
The -dimensional vector with the numbers of
events in each cell-clustering experiment. |
clsEvents |
The -dimensional vector with the number of
events in each cluster. |
desc |
The -dimensional character vector with the
parameter description. |
Till Sörensen [email protected]
data(dat.meta) summary(dat.meta)
data(dat.meta) summary(dat.meta)
This function provides a direct access to the meta-clustering procedure. The method described and discussed in this manuscript is the EMt-classification (EM-method=20) with the number of events for each cluster as weights. It returns the fitted mixture model parameter in an object of class immunoClust.
meta.Clustering(P, N, K, W, M, S, label=NULL, I.iter=10, B=500, tol=1e-5, bias=0.25, sub.thres = bias, alpha=0.5, EM.method=20, HC.samples=2000, norm.method=0, norm.blur=2, norm.minG=10, verbose=FALSE)
meta.Clustering(P, N, K, W, M, S, label=NULL, I.iter=10, B=500, tol=1e-5, bias=0.25, sub.thres = bias, alpha=0.5, EM.method=20, HC.samples=2000, norm.method=0, norm.blur=2, norm.minG=10, verbose=FALSE)
P |
The number of observed parameters for the cell event clusters. |
N |
The number of cell-clustering experiments. |
K |
The |
W |
The |
M |
The |
S |
The |
label |
Optional initial cluster assignment. If label equla NULL all clusters are assigned in one cluster in the initial clustering step. |
I.iter |
The maximum number of major iteration steps. |
B |
The |
tol |
The tolerance used to assess the convergence of the EM(t)-algorithms. |
bias |
The ICL-bias used in the EMt-iteration of the meta-clustering. |
sub.thres |
Defines the threshold, below which an ICL-increase is meaningless. The threshold is given as the multiple (or fraction) of the costs for a single cluster. |
alpha |
A value between 0 and 1 used to balance the bhattacharrya probabilities calculated with either the full covariance matrices or using only the diagonal elements of it. When working with uncompensated FC data very high correlations between parameters may be observed due to spill over. This leads to a very low bhattacharrya probability for two clusters even if they are located nearby. Using a mixture of the probabilities calculated with the complete covariance matrices and the variance information of each parameter avoids this problem. With a value of alpha=1, only the probabilities with complete covariance matrices are applied. A reasonable value for alpha is 0.5. |
EM.method |
0 = KL-minimization not weighted 1 = BC-maximization not weighted 10 = BC-maximization weighted 2 = EMt-classification not weighted 20 = EMt-classification weighted |
HC.samples |
The number of samples used for initial hierarchical clustering. |
norm.method |
Normalization function; see |
norm.blur |
For the normalization step the a-posteriori probabilites of the cell-clusters belonging to a meta.clusters a used. In order to capture narrow cell-clusters reasonable the co-variance of the cell-clusters is blured for the a-posteriori probabilities in the normalization step. |
norm.minG |
Minimum number of obtained meta-clusters required to process the normalization step in the major iteration loop. |
verbose |
detailed messages during process |
This function is used internally by the meta-clustering procedure
meta.process
in immunoClust.
The fitted model information in an object of class
immunoClust
.
Till Sörensen [email protected]
Sörensen, T., Baumgart, S., Durek, P., Grützkau, A. and Häupl, T. immunoClust - an automated analysis pipeline for the identification of immunophenotypic signatures in high-dimensional cytometric datasets. Cytometry A (accepted).
immunoClust-object
,
meta.SubClustering
, meta.process
data(dat.exp) d <- meta.exprs(dat.exp) res <- meta.Clustering(d$P, d$N, d$K, d$clsEvents, d$M, d$S)
data(dat.exp) d <- meta.exprs(dat.exp) res <- meta.Clustering(d$P, d$N, d$K, d$clsEvents, d$M, d$S)
Thess functions collect the output of the meta.process
and
extracts the event numbers, relative frequencies or mean fluorescence
intensities for each meta-cluster and cell-clustering experiment in a numeric
table.
meta.numEvents(meta, out.all=TRUE, out.removed=FALSE, out.unclassified=TRUE) meta.relEvents(meta, out.all=TRUE, out.removed=FALSE, out.unclassified=TRUE) meta.relParent(meta, out.all=TRUE, out.removed=FALSE, out.unclassified=TRUE) meta.parMFI(meta, par, out.all=TRUE, out.unclassified = TRUE) meta.numClusters(meta, out.all=TRUE) meta.freqTable(meta)
meta.numEvents(meta, out.all=TRUE, out.removed=FALSE, out.unclassified=TRUE) meta.relEvents(meta, out.all=TRUE, out.removed=FALSE, out.unclassified=TRUE) meta.relParent(meta, out.all=TRUE, out.removed=FALSE, out.unclassified=TRUE) meta.parMFI(meta, par, out.all=TRUE, out.unclassified = TRUE) meta.numClusters(meta, out.all=TRUE) meta.freqTable(meta)
meta |
The list-object returned by the function meta.process. |
par |
An integer index to the specific parameter. |
out.all |
A numeric indicator whether the event numbers of all hierarchical gating levels are obtained or only the meta-clusters themselves. |
out.removed |
A numeric indcator whether the number of removed events, which are not used for clustering are exported. |
out.unclassified |
A numeric indicator whether the event numbers of the hierarchical gating levels or all meta-clusters are exported. |
A numberic matrix with
the number of cell events
relative frequencies, i.e. the number of cell events per total meeasured events
relative frequencies according to parent relationship in the annotated hierarchy.
mean fluorecence intensities in one parameter, i.e. the meta-cluster centers in asinh-tranformed scale
the number of cell clusters
relative frequencies with respect to all gating hierarchie levels
in each meta-cluster (and gating hierarchy level) for each cell-clustering experiment.
Till Sörensen [email protected]
Sörensen, T., Baumgart, S., Durek, P., Grützkau, A. and Häupl, T. immunoClust - an automated analysis pipeline for the identification of immunophenotypic signatures in high-dimensional cytometric datasets. Cytometry A (submitted).
data(dat.exp) meta <- meta.process(dat.exp) tbl <- meta.numEvents(meta)
data(dat.exp) meta <- meta.process(dat.exp) tbl <- meta.numEvents(meta)
The function takes a vector of immunoClust
-object obtained
by the cell.process
function and extracts ths information
into a list
object.
meta.exprs(exp, sub=c())
meta.exprs(exp, sub=c())
exp |
The vector of |
sub |
A integer array indicating the parameter subset to be collected. |
A list
object with the following slots:
P |
The number of observed parameters for the cell event clusters. |
N |
The number of cell-clustering samples. |
K |
The |
W |
The |
M |
The |
S |
The |
expNames |
The |
expEvents |
The |
clsEvents |
The |
desc |
The |
Till Sörensen [email protected]
Sörensen, T., Baumgart, S., Durek, P., Grützkau, A. and Häupl, T. immunoClust - an automated analysis pipeline for the identification of immunophenotypic signatures in high-dimensional cytometric datasets. Cytometry A (accepted).
data(dat.exp) d <- meta.exprs(dat.exp, sub=c(1,2))
data(dat.exp) d <- meta.exprs(dat.exp, sub=c(1,2))
Performs agglomerative clustering on cell-clusters. It is used in the interative meta-clustering approach of immunoClust to obtain an initial meta-cluster membership for the EM(t)-iteration.
meta.hclust(P, N, W, M, S)
meta.hclust(P, N, W, M, S)
P |
The number of parameters. |
N |
The number of clusters. |
W |
The |
M |
The |
S |
The |
This function is used internally in meta.TestSubCluster
of
immunoClust.
A numeric -dimensional matrix which gives the
minimum index for observations in each of the two clusters merged at the
ith step in each row.
The merging distances need not to be monotonic increasing.
Till Sörensen [email protected]
Sörensen, T., Baumgart, S., Durek, P., Grützkau, A. and Häupl, T. immunoClust - an automated analysis pipeline for the identification of immunophenotypic signatures in high-dimensional cytometric datasets. Cytometry A (accepted).
meta.TestSubCluster
, meta.process
data(dat.exp) r <- dat.exp[[1]] #hcPairs <- meta.hclust(r@P, r@K, r@w, r@mu, t(apply(r@sigma,1,c))) hcPairs <- meta.hclust(npar(r), ncls(r), weights(r), mu(r), t(apply(sigma(r),1,c)))
data(dat.exp) r <- dat.exp[[1]] #hcPairs <- meta.hclust(r@P, r@K, r@w, r@mu, t(apply(r@sigma,1,c))) hcPairs <- meta.hclust(npar(r), ncls(r), weights(r), mu(r), t(apply(sigma(r),1,c)))
Performs an EM(t)-iteration on cell-clusters given an initial meta-cluster
membership for the cell-clusters and returns the fitted meta-clusters
information in an object of class
immunoClust
.
meta.ME(P, N, K, W, M, S, label, B=100, tol=1e-5, method=20, bias=0.25, alpha=0.5, min.class=0)
meta.ME(P, N, K, W, M, S, label, B=100, tol=1e-5, method=20, bias=0.25, alpha=0.5, min.class=0)
P |
The number of observed parameters for the cell event clusters. |
N |
The number of cell-clustering experiments. |
K |
The |
W |
The |
M |
The |
S |
The |
label |
The |
B |
The |
tol |
The tolerance used to assess the convergence of the EM(t)-algorithms. |
method |
0 = KL-minimization not weighted 1 = BC-maximization not weighted 10 = BC-maximization weighted 2 = EMt-classification not weighted 20 = EMt-classification weighted |
bias |
The ICL-bias used in the EMt-iteration of the meta-clustering. |
alpha |
A value between 0 and 1 used to balance the bhattacharrya probabilities calculated with either the full covariance matrices or using only the diagonal elements of it. |
min.class |
The minimum number of clusters for the final model. |
This function is used internally by the meta-clustering procedures
meta.process
and meta.Clustering
in
immunoClust.
The fitted meta-clusters information in an object of class
immunoClust
.
Till Sörensen [email protected]
Sörensen, T., Baumgart, S., Durek, P., Grützkau, A. and Häupl, T. immunoClust - an automated analysis pipeline for the identification of immunophenotypic signatures in high-dimensional cytometric datasets. Cytometry A (accepted).
data(dat.exp) d <- meta.exprs(dat.exp) r <- meta.ME(d$P, d$N, d$K, d$clsEvents, d$M, d$S, label=rep(1,sum(d$K)))
data(dat.exp) d <- meta.exprs(dat.exp) r <- meta.ME(d$P, d$N, d$K, d$clsEvents, d$M, d$S, label=rep(1,sum(d$K)))
Performs a normalization via linear regression of the cell-cluster samples to the meta-clustering model.
meta.Normalize(P, N, K, W, M, S, G, Z, method=3)
meta.Normalize(P, N, K, W, M, S, G, Z, method=3)
P |
The number of observed parameters for the cell event clusters. |
N |
The number of cell-clustering experiments. |
K |
The |
W |
The |
M |
The |
S |
The |
G |
The number of meta-clusters. |
Z |
The |
method |
Alternative methods used for the normalization routine. Let 0 = no normalization 1 = 2 = 3 = 4 = |
The regression used the cell-cluster and meta-cluster means weighted by the
probabilities for a cell-cluster belonging to the meta-cluster. It builds
a consensus meta-model from all cell-clusters using the a-posteriori
probabilities .
Returns the normalized cell-clusters means and co-variance matrices in a list-object with the following slots:
The number of observed parameters for the cell event clusters.
The number of cell-clustering experiments.
The -dimensional vector with the numbers of cell event
clusters in each experiment. The total number of clusters is
.
The -dimensional vector with weights, i.e. number of
events, of all clusters.
The -dimensional matrix of all cluster means.
The -dimensional matrix of all cluster covariance
matrices.
Till Sörensen [email protected]
data(dat.meta) #dat <- dat.meta$dat.clusters res <- dat.meta$res.clusters dat.norm <- meta.Normalize(npar(dat.meta), nsam(dat.meta), sam_ncls(dat.meta), sam_clsEvents(dat.meta), sam_clsMu(dat.meta), sam_clsSigma(dat.meta), ncls(res), aposteriori(res))
data(dat.meta) #dat <- dat.meta$dat.clusters res <- dat.meta$res.clusters dat.norm <- meta.Normalize(npar(dat.meta), nsam(dat.meta), sam_ncls(dat.meta), sam_clsEvents(dat.meta), sam_clsMu(dat.meta), sam_clsSigma(dat.meta), ncls(res), aposteriori(res))
This function performs iterative model based clustering on the clusters obtained
by cell.process
of several samples. Its input is a vector of the
immunoClust-objects
of the samples.
meta.process(exp, dat.subset=c(), meta.iter=10, tol=1e-05, meta.bias=0.2, meta.alpha=.5, norm.method=0, norm.blur=2, norm.minG=10)
meta.process(exp, dat.subset=c(), meta.iter=10, tol=1e-05, meta.bias=0.2, meta.alpha=.5, norm.method=0, norm.blur=2, norm.minG=10)
exp |
A vector of |
dat.subset |
A numeric vector defining the used observed parameters for the meta-clustering. If unset, all parameters in the cell-clustering results are used. |
meta.iter |
The number of major iterations. |
tol |
The tolerance used to assess the convergence of the EM(t)-algorithms. |
meta.bias |
The ICL-bias used in the EMt-iteration of the meta-clustering. |
meta.alpha |
A value between 0 and 1 used to balance the bhattacharrya probabilities calculated with either the full covariance matrices or using only the diagonal elements of it. When working with uncompensated FC data, very high correlations between parameters may be observed due to spill over. This leads to a very low bhattacharrya probability for two clusters even if they are located nearby. Using a mixture of the probabilities calculated with the complete covariance matrices and the variance information of each parameter avoids this problem. With a value of alpha=1, only the probabilities with complete covariance matrices are applied. A reasonable value for alpha is 0.5. |
norm.method |
A numeric selector for the normalization step to be performed during the major iteration. |
norm.blur |
The bluring constant by which the cell-clusters co-variance matrices are increased within the normalization step. |
norm.minG |
Minimum number of meta-clusters required before processing the normalization step. |
The function returns a immunoMeta
with the
following components:
dat.clusters |
A dat list-object of the cell event clusters
used for meta-clustering. |
res.clusters |
The
immunoClust-object of the fitted
meta-clustering mixture model. |
dat.scatter |
A dat list-object of the scatter parameters for
the cell event clusters used for scatter clustering. |
res.scatter |
The
immunoClust-object of the fitted
scatter-clustering mixture model. |
gating |
A list-object containing the hierarchical gating-tree. |
Till Sörensen [email protected]
Sörensen, T., Baumgart, S., Durek, P., Grützkau, A. and Häupl, T. immunoClust - an automated analysis pipeline for the identification of immunophenotypic signatures in high-dimensional cytometric datasets. Cytometry A (accepted).
immunoMeta-object
,
immunoClust-object
,
meta.Clustering
, meta.export
,
cell.process
data(dat.exp) meta <- meta.process(dat.exp) summary(meta) tbl <- meta.numEvents(meta)
data(dat.exp) meta <- meta.process(dat.exp) summary(meta) tbl <- meta.numEvents(meta)
Performs a normalization via linear regression of the sample clusters in x to the clusters in y.
meta.RegNorm(y, x, method=1, alpha=0.5)
meta.RegNorm(y, x, method=1, alpha=0.5)
y |
immunoClust-object with the destination clusters. |
x |
immunoClust-object with the cluster to normalize. |
method |
Alternative methods used for the normalization routine. 1 = 2 = |
alpha |
A value between 0 and 1 used to balance the bhattacharrya probabilities calculated with either the full covariance matrices or using only the diagonal elements of it. |
Returns the normalized cell-clusters means and co-variance matrices in a list-object with the following slots:
The number of observed parameters for the cell event clusters.
The number of cell-clustering experiments.
The -dimensional vector with the numbers of cell event
clusters in each experiment. The total number of clusters is
.
The -dimensional matrix of all cluster means.
The -dimensional matrix of all cluster covariance
matrices.
Till Sörensen [email protected]
data(dat.meta) data(dat.exp) dat.norm <- meta.RegNorm(dat.meta$res.clusters, dat.exp[[1]])
data(dat.meta) data(dat.exp) dat.norm <- meta.RegNorm(dat.meta$res.clusters, dat.exp[[1]])
The meta.SON.clustering is an extension of the meta-clustering process co-clustering several samples cluster results. It integrates a SONormalization step between the meta-clustering iterations.
meta.SON.clustering( meta, cycles=6, alpha=0.5, scale.factor=2, scale.steps=0, meta.iter=1, meta.bias=0.3, meta.thres=meta.bias, meta.tol=1e-5, SON.cycles=1, SON.rlen=100, SON.deltas=c(1/SON.rlen,1/SON.rlen), SON.blurring=c(2,0.1), batch.samples=nsam(meta)/4, verbose=0 )
meta.SON.clustering( meta, cycles=6, alpha=0.5, scale.factor=2, scale.steps=0, meta.iter=1, meta.bias=0.3, meta.thres=meta.bias, meta.tol=1e-5, SON.cycles=1, SON.rlen=100, SON.deltas=c(1/SON.rlen,1/SON.rlen), SON.blurring=c(2,0.1), batch.samples=nsam(meta)/4, verbose=0 )
meta |
an immunoMeta-object for which the clustering should be refined. |
cycles |
number of major iteration steps. |
alpha |
The alpha value for calculation the bhattacharyya probabilities. |
scale.factor |
scale factor for the internal model scaling step. |
scale.steps |
scale steps for the internal model scaling step. 0 means no model scaling. |
meta.iter |
number of iterations for meta-clustering step |
meta.bias |
ICL bias for meta-clustering step |
meta.thres |
sub.thres for meta-clustering step |
meta.tol |
maximal tolerance for meta-clustering step |
SON.cycles |
number of cycles in SONormalization step |
SON.rlen |
runlength in SON normalization step |
SON.deltas |
deltas parameter in SONormalization step |
SON.blurring |
bluring parameter in SONormalisation step |
batch.samples |
minimal number of sample for meta.clusters used in the SONormalisation step |
verbose |
detailed messages during process |
For the refined meta.SON.clustering
process a simple meta.process
should be performed first. The resulting immunoMeta
-object then serves as
input data for the meta.SON.clustering
.
Within the meta.SON.clustering
between two meta.Clustering steps a
SON normalization step is performed, which shifts the clusters of each sample
towards the meta-clusters. The SON normalization for a sample consists of an
optional first step to scale the model build by meta clusters best possible to
the sample clusters. Afterwards, the meta clusters are moved to towards the
sample clusters. This is done in a similar way to SOM clustering mapping.
Finally, the sample clusters are retracted to the meta-clusters distribution.
For this purpose the Bhattacharyya probabilities of sample and meta clusters
are used.
An immunoMeta-object for the co-clustering result.
Till Sörensen [email protected]
pre-print
data(dat.meta) meta <- meta.SON.clustering(dat.meta, cycles=2)
data(dat.meta) meta <- meta.SON.clustering(dat.meta, cycles=2)
An immunoMeta-object is co-clustered with an immunoClust-object of the same parameter structure. Co-clustering includes SON normalization steps. The returned immnuoCLust-object contians the meta-clusters unchanged in order and numeration.
meta.SON.combineClustering( meta, res, par=seq_len(npar(meta)), map.cluster=seq_len(ncls(meta)), use.cluster=seq_len(ncls(res)), meta.alpha=0.5, meta.bias=0.1, meta.iter=100, meta.tol=1e-5, SON.method=1, SON.cycles=4, SON.rlen=10, SON.deltas=c(1/SON.rlen,1/SON.rlen), SON.blurring=c(2,1), traceG=c(), traceK=c())
meta.SON.combineClustering( meta, res, par=seq_len(npar(meta)), map.cluster=seq_len(ncls(meta)), use.cluster=seq_len(ncls(res)), meta.alpha=0.5, meta.bias=0.1, meta.iter=100, meta.tol=1e-5, SON.method=1, SON.cycles=4, SON.rlen=10, SON.deltas=c(1/SON.rlen,1/SON.rlen), SON.blurring=c(2,1), traceG=c(), traceK=c())
meta |
The annotated immunoMeta-object. |
res |
An immunoClust-object as results from cell-event clustering for a sample |
par |
An integer array with the parameters to be used for SON mapping. |
map.cluster |
The model clusters to be used for SON mapping. |
use.cluster |
the sample clusters to be used for SON mapping. |
meta.alpha |
The alpha value in calculation the bhattacharyya probabilities. |
meta.bias |
The ICL bias for meta co-clustering step. |
meta.iter |
Maximal iterations in the meta co-clustering step. |
meta.tol |
Maximal tolerance for meta co-clustering step. |
SON.method |
Method selection for SON normalization step. |
SON.cycles |
Number cycles in the SON normalization step. |
SON.rlen |
runlength in the SON normalization step. |
SON.deltas |
delta parameter in the SON normalization step. |
SON.blurring |
blurring parameter in the SON normalization step. |
traceG |
An array of model cluster to trace in the process. |
traceK |
An array of sample cluster to trace in the process. |
The co-clustering consists of a normalization and meta-clustering step. A sample cluster is than labeled according to its corresponding meta cluster. The SON-normalization and meta-clustering steps are parameterised by the SON and meta arguments.
An immunoClust-object from meta-clusters and combined observation from meta- and samples-cluster. The first G elements of the label coresponds to the meta-clusters, afterwards the labelling of the samples-clusters indicates the nearest meta-cluster for the sample-cluster.
Till Sörensen [email protected]
in progress
data(dat.exp) data(dat.meta) res <- meta.SON.combineClustering(dat.meta, dat.exp[[1]], SON.cycles=2)
data(dat.exp) data(dat.meta) res <- meta.SON.combineClustering(dat.meta, dat.exp[[1]], SON.cycles=2)
These function tests each meta-cluster of a model for refining it into more sub-clusters and returns the refined cluster memberships in an integer array.s
meta.SubClustering(x, P, N, W, M, S, tol=1e-5, bias=0.25, thres=bias, alpha=1.0, EM.method=20, HC.samples=2000, verbose=FALSE) meta.TestSubCluster(x, P, N, W, M, S, J=8, B=500, tol=1e-5, bias=0.5, alpha=1.0, EM.method=20, HC.samples=2000)
meta.SubClustering(x, P, N, W, M, S, tol=1e-5, bias=0.25, thres=bias, alpha=1.0, EM.method=20, HC.samples=2000, verbose=FALSE) meta.TestSubCluster(x, P, N, W, M, S, J=8, B=500, tol=1e-5, bias=0.5, alpha=1.0, EM.method=20, HC.samples=2000)
x |
An immunoClust object with the initial model parameter
( |
P |
The number of parameters. |
N |
The number of clusters. |
W |
The |
M |
The |
S |
The |
tol |
The tolerance used to assess the convergence of the EM(t)-algorithms in Sub-Clustering. |
bias |
he ICL-bias used in the EMt-algorithm. |
thres |
Defines the threshold, below which an ICL-increase is meaningless. The threshold is given as the multiple (or fraction) of the costs for a single cluster. |
alpha |
A value between 0 and 1 used to balance the bhattacharrya probabilities calculated with either the full covariance matrices or using only the diagonal elements of it. |
J |
The number of sub-models to be builded and tested for a particular cluster. |
B |
The maximum number of EM(t)-iterations in Sub-Clustering. |
EM.method |
0 = KL-minimization not weighted 1 = BC-maximization not weighted 10 = BC-maximization weighted 2 = EMt-classification not weighted 20 = EMt-classification weighted |
HC.samples |
The number of samples used for initial hierarchical clustering. |
verbose |
detailed messages during process |
These function are used internally by the meta-clustering procedures
meta.process
and meta.Clustering
in
immunoClust and are not intended to be used directly.
An integer array of length containing the cell-clusters meta-cluster
memberships of the refined model.
Till Sörensen [email protected]
Sörensen, T., Baumgart, S., Durek, P., Grützkau, A. and Häupl, T. immunoClust - an automated analysis pipeline for the identification of immunophenotypic signatures in high-dimensional cytometric datasets. Cytometry A (accepted).
meta.process
, meta.Clustering
,
meta.hclust
data(dat.exp) d <- meta.exprs(dat.exp) #label <- rep(1,sum(d$K)) #label <- meta.SubClustering(d$P, sum(d$K), d$clsEvents, d$M, d$S, label=label) r0 <- new("immunoClust", K=sum(d$K), label=rep(1,sum(d$K))) label <- meta.SubClustering(r0, d$P, sum(d$K), d$clsEvents, d$M, d$S) r1 <- meta.ME(d$P, d$N, d$K, d$clsEvents, d$M, d$S, label)
data(dat.exp) d <- meta.exprs(dat.exp) #label <- rep(1,sum(d$K)) #label <- meta.SubClustering(d$P, sum(d$K), d$clsEvents, d$M, d$S, label=label) r0 <- new("immunoClust", K=sum(d$K), label=rep(1,sum(d$K))) label <- meta.SubClustering(r0, d$P, sum(d$K), d$clsEvents, d$M, d$S) r1 <- meta.ME(d$P, d$N, d$K, d$clsEvents, d$M, d$S, label)
Documentation of the accessors and methods for immunoClust-objects
object , immunoClust
|
an object of class
|
cls |
cluster subset for retrieved slot values. |
par |
parameter subset for retrieved slot values. |
the number of cell events clustered
Usage:
nobs(immunoClust)
the number of clusters.
Usage:
ncls(immunoClust)
the number of parameters measured, cell-clustered
Usage:
npar(immunoClust)
extracts or replaces the names of measured, cell-clustered parameters
Usage:
parameters(immunoClust)
parameters(immunoClust) <- value
the clustering label, that is the assignment of the cell-events to the clusters.
Usage:
label(immunoClust)
the clustering weights for the cluster selection (all cluster by default)
Usage:
weights(immunoClust,cls=seq_len(ncls(immunoClust)))
the cluster mean values for the cluster and parameter selection (all cluster and all parameter by default)
Usage:
mu(immunoClust, cls=seq_len(ncls(immunoClust)),
par=seq_len(npar(immunoClust)))
the cluster co-variance values for the cluster and parameter selection (all cluster and all parameter by default)
Usage:
sigma(immunoClust, cls=seq_len(ncls(immunoClust)),
par=seq_len(npar(immunoClust)))
the a-posteriori probabilities of cluster membership for each event
Usage:
aposteriori(immunoClust)
the cell-event numbers for the cluster selection (all cluster by default)
Usage:
events(immunoClust, ncls=seq_len(ncls(immunoClust)))
the cell-events indices in the FCS-file for the cluster selection
(all cluster by default). if na.rm ist TRUE the removed events aer
obmitted and the indices fits to the a-posteriori matrix z
in the
immunoClust
-object
Usage:
cells(immunoClust, ncls=seq_len(ncls(immunoClust)), na.rm=FALSE)
Builds the immunoClust
-object for a parameter subset
Usage:
res <- subset(immunoClust, par)
Scales and translates the cluster means of the immunoClust
-object
in each parameter
Usage:
res <- transformParams(immunoClust, scale=c(), offset=c())
Till Sörensen [email protected]
### data(dat.exp) ## cell.clustering result for dat.fcs res <- dat.exp[[1]] nobs(res) ncls(res)
### data(dat.exp) ## cell.clustering result for dat.fcs res <- dat.exp[[1]] nobs(res) ncls(res)
Documentation of the accessors and methods for immunoMeta-objects
object , immunoMeta
|
an object of class
|
cls |
cluster subset for retrieved slot values. |
par |
parameter subset for retrieved slot values. |
pos |
Gives the position in the immunoMeta-hierarchy. |
the number of immunoClust
-objects (samples) which
are co-clustered.
Usage:
nsam(immunoMeta)
the number of cell event clusters in theimmunoClust
-objects
(samples) which are co-clustered.
Usage:
sam_ncls(immunoMeta, for.samples=seq_len(nsam(meta))
the weigths of all cell event clusters which are collected for co-clustering.
Usage:
sam_clsWeights(immunoMeta)
the means of all cell event clusters which are collected for co-clustering.
Usage:
sam_clsMu(immunoMeta)
the co-variance matrices of all cell event clusters which are collected for co-clustering.
Usage:
sam_clsSigma(immunoMeta)
the event numbers of all cell event clusters which are collected for co-clustering.
Usage:
sam_clsEvents(immunoMeta)
the number of cell events clusters from sample cell-clustering which are co-clustered.
Usage:
nobj(immunoMeta)
the number of meta-clusters.
Usage:
ncls(immunoMeta)
the number of parameters measured, cell-clustered and meta-clustered
Usage:
npar(immunoMeta)
extracts or replaces the names of measured, cell-clustered and meta-clustered parameters
Usage:
parameters(immunoMeta)
parameters(immunoMeta) <- value
the meta-clustering label, that is the assignment of the cell-clusters to the meta-clusters.
Usage:
label(immunoMeta, for.sample=NA)
If for.sample is specified, the label part for this sample only.
the meta-clustering weights for the cluster selection (all meta-cluster by default)
Usage:
weights(immunoMets,cls=seq_len(ncls(immunoMeta)))
the meta-cluster mean values for the cluster and parameter selection (all meta-cluster and all parameter by default)
Usage:
mu(immunoMeta, cls=seq_len(ncls(immunoMeta)),
par=seq_len(npar(immunoMeta)))
the meta-cluster co-variance values for the cluster and parameter selection (all meta-cluster and all parameter by default)
Usage:
sigma(immunoMeta, cls=seq_len(ncls(immunoMeta)),
par=seq_len(npar(immunoMeta)))
the a-posteriori probabilities of cluster membership for each cell-cluster
Usage:
aposteriori(immunoMeta)
the cell-event numbers for each sample for the cluster selection (all meta-cluster by default)
Usage:
events(immunoMeta, ncls=seq_len(ncls(immunoMeta)), for.sample=NA)
If for.sample is specified, the cell-event numbers for this sample only.
get or a property value in the hierarchy level given by pos
and
named name
Usage:
prop(immunoMeta, name, pos=c())
prop(immunoMeta, name, pos, for.level=TRUE, for.sublevels=FALSE)
<- value
If the option for.sublevels
is set, the property value will by setted
deep for all sub-levels of the by pos
specified level.
The prop
interface is very basic and no checks for meaningfull
properties and values are performed. It could be used for everything at
any time. Nevertheless, there are some property keys which are used internally
mainly to control the plot routine for the levels.
desc
the name of this level.
M
the mean of all clusters in this level
S
the co-variance matrix of all clusters in this level
pscales
a list of npar
entries for the limits and ticks
information. Normaly, only set on root-level and then used for all
sub-levels. But could set and altered at any level.
plot.subset
an array of parameter indices used as default for the
plot of this level.
plot.color
an index in the palette
or other specified
color used for plots of this level in its parent level.
plot.childs
to be renamed in plot.levels
.
plot.parent
when set, additionally all cluster of the parent level
are plotted in light gray.
Get or set the desc
property in the by pos
specified level.
Usage:
desc(immunoMeta, pos)
desc(immunoMeta, pos) <- value
Gives the full description path for the level given by pos
, i.e. the
concatinate desc
values of this all parent levels.
Usage:
descFull(immunoMeta, pos)
Get or replace the level object at specified pos
,
Usage:
value <- level(immunoMeta, pos)
level(immunoMeta, pos ) <- value
Find the level pos
value for a specific cluster cls
Usage:
pos <- findLevel(immunoMeta, cls)
Retrieves the cluster subset for the level at pos
.
Usage:
cls <- clusters(immunoMeta, pos)
Retrieves the cluster subset for the level at pos
which are classified
in sub-levels.
Usage:
cls <- classified(immunoMeta, pos)
Retrieves the cluster subset for the level at pos
which are not
classified in sub-levels.
Usage:
cls <- unclassified(immunoMeta, pos)
Adds a level at a specified hierarchy position pos
. A level consists
of a name (desc
) and a cluster subset cls
.
Usage:
addLevel(immunoMeta, pos, desc="new level") <- cls
Moves a cluster subset to a specific immunoMeta level. Clusters in cls
are added to parent levels if nessesary and removed from other levels.
Usage:
move(immunoMeta, pos) <- cls
removes a cluster subset from a specific immunoMeta level.
Usage:
remove(immunoMeta, pos) <- cls
sets the parent for this level, or this level as parent for all its sub-levels
Usage:
parent(immunoMeta, pos) <- c()
parent(immunoMeta, pos) <- level
Overtakes the annotation of an immunoMeta-object to this immunoMeta-object
Usage:
transfer(immunoMeta) <- annotatedMeta
After manipulations of a immunoMeta
-object finalize
restructure all levels and returns the finalized object, where the
parent relations are solved and the mean and co-variances of all levels
are build.
Usage:
immunoMeta <- finalize(immunoMeta)
Builds the immunoMeta
-object for a cluster and/or parameter subset
Usage:
subsetMeta <- subset(immunoMeta, cls=seq_len(ncls(meta)),
par=seq_len(npar(meta)))
Scales and translates the cluster means of the immunoMeta
-object
in each parameter
Usage:
transformedMeta <- transformParams(immunoMeta, scale=c(), offset=c())
Calculates the bhattacharrya coefficients of clusters cls
for a level
lvl
in the immunoMeta
-object
Usage:
ret <- clustersCoeff(immunoMeta, cls, lvl,
par=seq_len(npar(immunoMeta))
Calculates the bhattacharrya distances of clusters cls
for a level
lvl
in the immunoMeta
-object
Usage:
ret <- clustersDist(immunoMeta, cls, lvl,
par=seq_len(npar(immunoMeta))
Calculates the bhattacharrya probabilities of clusters cls
for a level
lvl
in the immunoMeta
-object
Usage:
ret <- clustersProb(immunoMeta, cls, lvl,
par=seq_len(npar(immunoMeta))
Till Sörensen [email protected]
### data(dat.meta) npar(dat.meta) ncls(dat.meta) cls <- clusters(dat.meta,c(1)) move(dat.meta,c(2)) <- cls
### data(dat.meta) npar(dat.meta) ncls(dat.meta) cls <- clusters(dat.meta,c(1)) move(dat.meta,c(2)) <- cls
This method generates scatterplot revealing the cluster assignment.
## S4 method for signature 'immunoClust' plot(x, data, subset=c(1,2), ellipse=T, show.rm=F, include=1:(x@K), main=NULL, col=include+1, pch=".", cex=0.6, col.rm=1, pch.rm=1, cex.rm=0.6, ecol=col, elty=1, npoints=501, add=F, ...)
## S4 method for signature 'immunoClust' plot(x, data, subset=c(1,2), ellipse=T, show.rm=F, include=1:(x@K), main=NULL, col=include+1, pch=".", cex=0.6, col.rm=1, pch.rm=1, cex.rm=0.6, ecol=col, elty=1, npoints=501, add=F, ...)
x |
An object of class |
data |
A matrix, data frame of observations, or object of class
|
subset |
A numeric vector of length two indicating which two parameters
are selected for the scatterplot. Alternatively, a character vector containing
the names of the two parameters is allowed if |
ellipse |
A logical value indicating whether the cluster 90% percentil boundary is to be drawn or not. |
show.rm |
A logical value indicating whether filtered observations will be shown or not. |
include |
A numeric vector specifying which clusters will be shown on the plot. By default, all clusters are included. |
main |
Title of the plot. |
col |
Color(s) of the plotting points. May specify a different color for each cluster. |
pch |
Plotting character(s) of the plotting points. May specify a different character for each cluster. |
cex |
Size of the plotting characters. May specify a different size for each cluster. |
col.rm |
Color of the plotting characters denoting filtered observations. |
pch.rm |
Plotting character used to denote filtered observations. |
cex.rm |
Size of the plotting character used to denote filtered observations. |
ecol |
Color(s) of the lines representing the cluster boundaries. May specify a different color for each cluster. |
elty |
Line type(s) drawing the cluster boundaries. May specify a different line type for each cluster. |
npoints |
The number of points used to draw each cluster boundary. |
add |
A logical value. If |
... |
Further graphical parameters passed to the generic function
|
Plots the clustering assignment on an appropriatei plotting device.
Till Sörensen [email protected]
Sörensen, T., Baumgart, S., Durek, P., Grützkau, A. and Häupl, T. immunoClust - an automated analysis pipeline for the identification of immunophenotypic signatures in high-dimensional cytometric datasets. Cytometry A (accepted).
data(dat.fcs) data(dat.exp) dat.res <- dat.exp[[1]] dat.trans <- trans.ApplyToData(dat.res, dat.fcs) plot(dat.res, dat=dat.trans,N=1000)
data(dat.fcs) data(dat.exp) dat.res <- dat.exp[[1]] dat.trans <- trans.ApplyToData(dat.res, dat.fcs) plot(dat.res, dat=dat.trans,N=1000)
This method generates scatterplot revealing the cluster assignment.
## S3 method for class 'immunoMeta' plot(x, pos=c(), main="", plot.childs=TRUE, plot.unclassified=FALSE, plot.subset=c(), inc.childs=c(), plot.ellipse=TRUE, plot.all=FALSE, ...)
## S3 method for class 'immunoMeta' plot(x, pos=c(), main="", plot.childs=TRUE, plot.unclassified=FALSE, plot.subset=c(), inc.childs=c(), plot.ellipse=TRUE, plot.all=FALSE, ...)
x |
An object of class |
pos |
gives the position in the immunoMeta-hierarchy to plot
( |
main |
additional title which is concatenated with the position and description path of the plotted level. |
plot.subset |
an array of indices for the parameter selection to be plotted. |
plot.unclassified |
if set, the unclassified clusters,i.e clusters not assigned into a sub-level, are plotted rather than the classified clusters. |
plot.childs |
colours the clusters by the sub-level rather than the clusters themselves. By default colours are assigned by sub-level index repeated in red, green,blue,cyan,magenta,yellow,gray,black |
inc.childs |
optionally, to restrict to a particular selection of sub-levels to plot. |
plot.ellipse |
surrounds the cell-cluster center by an ellipse reflecting the meta-cluster deviation |
plot.all |
plots all sub-levels. Usefull for a full annotation documentation with a pdf file. |
... |
Further graphical parameters passed to the generic function
|
Plots the clustering assignment on an appropriated plotting device.
Till Sörensen [email protected]
data(dat.meta) plot(dat.meta)
data(dat.meta) plot(dat.meta)
This method generates scatterplot matrix revealing the cluster assignment.
## S4 method for signature 'immunoClust,missing' splom(x, data, include=seq_len(x@K), ...) ## S4 method for signature 'immunoClust,flowFrame' splom(x, data, include=seq_len(x@K), subset=seq_len(length(attributes(x)$param)), N=NULL,label=NULL, desc=NULL, add.param=c(), ...) ## S4 method for signature 'immunoClust,matrix' splom(x, data, include=seq_len(x@K), subset=seq_len(length(attributes(x)$param)), N=NULL, label=NULL, desc=NULL, ...) datSplom(label, data, subset=seq_len(ncol(data)), include=seq_len(nrow(data)), ...)
## S4 method for signature 'immunoClust,missing' splom(x, data, include=seq_len(x@K), ...) ## S4 method for signature 'immunoClust,flowFrame' splom(x, data, include=seq_len(x@K), subset=seq_len(length(attributes(x)$param)), N=NULL,label=NULL, desc=NULL, add.param=c(), ...) ## S4 method for signature 'immunoClust,matrix' splom(x, data, include=seq_len(x@K), subset=seq_len(length(attributes(x)$param)), N=NULL, label=NULL, desc=NULL, ...) datSplom(label, data, subset=seq_len(ncol(data)), include=seq_len(nrow(data)), ...)
x |
An object of class |
data |
Missing, a matrix, or object of class |
include |
A numeric vector specifying which clusters will be shown on the plot. By default, all clusters are included. |
subset |
A numeric vector indicating which parameters are selected for the scatterplot matrix. |
N |
An integer for the maximum number of observations to be plotted. By default all observations are plotted. |
label |
A integer vector for the cluster mebership of the observations. By
default this is |
desc |
A character vector for the parameter description. |
add.param |
A list of additional parameters to plot, which are not used for clustering. |
... |
Further graphical parameters passed to the generic function
|
An object of class trellis
as returned by the generic splom
function of the lattice
-package. The print
method (called by
default) will plot it on an appropriate plotting device.
Till Sörensen [email protected]
Sörensen, T., Baumgart, S., Durek, P., Grützkau, A. and Häupl, T. immunoClust - an automated analysis pipeline for the identification of immunophenotypic signatures in high-dimensional cytometric datasets. Cytometry A (accepted).
data(dat.fcs) data(dat.exp) # cell clustering results of dat.fcs dat.res <- dat.exp[[1]] dat.trans <- trans.ApplyToData(dat.res, dat.fcs) splom(dat.res, data=dat.trans, N=1000)
data(dat.fcs) data(dat.exp) # cell clustering results of dat.fcs dat.res <- dat.exp[[1]] dat.trans <- trans.ApplyToData(dat.res, dat.fcs) splom(dat.res, data=dat.trans, N=1000)
Applies the transformation information of the immunoClust
object to the
raw observed FC dataset.
trans.ApplyToData(x, data, add.param=c(), max.decade=attr(x,"trans.decade"), lin.scale=attr(x,"trans.scale") )
trans.ApplyToData(x, data, add.param=c(), max.decade=attr(x,"trans.decade"), lin.scale=attr(x,"trans.scale") )
x |
The |
data |
The numeric matrix, data frame of observations, or object of class
|
add.param |
A list of additional parameters in the |
max.decade |
A numeric scale for the maximum transformed observation value; if missing or below 0, no scaling of the transformed values is apllied, which is the default in immunoClust. |
lin.scale |
A numeric scaling factor for the linear, i.e. not transformed,
parameters; if missing no scaling, i.e. |
In immunoClust an -transformation
is applied to the
fluorescence parameter in the observed data. The scatter parameter are assumed
to be linear.
A matrix or flowFrame
with replaced transformed oberservation values.
Till Sörensen [email protected]
Sörensen, T., Baumgart, S., Durek, P., Grützkau, A. and Häupl, T. immunoClust - an automated analysis pipeline for the identification of immunophenotypic signatures in high-dimensional cytometric datasets. Cytometry A (accepted).
immunoClust
,
trans.FitToData
, cell.process
data(dat.fcs) data(dat.exp) dat.trans <- trans.ApplyToData(dat.exp[[1]], dat.fcs) # #plot(dat.exp[[1]], data=dat.trans) #
data(dat.fcs) data(dat.exp) dat.trans <- trans.ApplyToData(dat.exp[[1]], dat.fcs) # #plot(dat.exp[[1]], data=dat.trans) #
Performs variance stabilization transformation estimation on the fluorescense parameters of the observed cell events. It is integrated in the interative cell event clustering approach of immunoClust when transformation estimation should be applied.
trans.FitToData(x, data, B=10, tol=1e-5, certainty=0.3, proc="vsHtransAw")
trans.FitToData(x, data, B=10, tol=1e-5, certainty=0.3, proc="vsHtransAw")
x |
The |
data |
The numeric matrix, data frame of observations, or object of class flowFrame. |
B |
The maximum number of BFG2 minimizer iterations. |
tol |
The tolerance used to assess the convergence for the BFG2 minimizer. |
certainty |
Minimum probability for cluster membership of an observation to be taken into account. |
proc |
An experimental switch for alternative procedures; should be "vsHtransAw". |
In immunoClust an -transformation
is applied for all
fluorescence parameter in the observed data.
The transformation optimization trans.FitToData
requires a fitted model
of cluster information together with suitable initial transformation estimation
in an immunoClust
object. It fits the
transformation based on the initial scaling values trans.a
and
translation values trans.b
to the observed data.
It returns the optimized transformation parameter in a
-dimensional matrix, first row for the scaling and
second row for the translation values.
A scaling value of
on input and output indicates, that a parameter
should not be transformed.
The presented transformation optimization ("vsHtransAw") fits only the scaling value. An alternative procedure ("vsHtrans_w") fits both, the scaling and the translation value, but turns out to be less robust.
Optimized transformation scaling and translation values in a
-dimensional matrix, first row for the scaling and
second row for the translation values.
Till Sörensen [email protected]
Sörensen, T., Baumgart, S., Durek, P., Grützkau, A. and Häupl, T. immunoClust - an automated analysis pipeline for the identification of immunophenotypic signatures in high-dimensional cytometric datasets. Cytometry A (accepted).
trans.ApplyToData
, cell.process
data(dat.fcs) data(dat.exp) ## in dat.exp the z-matrices of the immunoClust-object are removed ## so we have to re-calculate it first ... dat.trans <- trans.ApplyToData(dat.exp[[1]], dat.fcs) res <- cell.Classify(dat.exp[[1]], dat.trans) ## ... now the transformation parameter can be optimzed trans.FitToData(res, dat.fcs)
data(dat.fcs) data(dat.exp) ## in dat.exp the z-matrices of the immunoClust-object are removed ## so we have to re-calculate it first ... dat.trans <- trans.ApplyToData(dat.exp[[1]], dat.fcs) res <- cell.Classify(dat.exp[[1]], dat.trans) ## ... now the transformation parameter can be optimzed trans.FitToData(res, dat.fcs)