An object of class "MetaCluster
" represents a collection of biologically similar clusters from a set of FC samples. A metacluster is formed by matching clusters across samples and merging the matched clusters. An object of class "ClusteredSample
" stores the estimated parameter of the whole metacluster as well as a list of clusters participating in the metacluster.
An object of class MetaCluster
is usually created when constructing an object of class Template
.
Unless you know exactly what you are doing, creating an object of class "MetaCluster
" using new
or using the constructor is discouraged.
An object of class "MetaCluster
" can be created using the following constructor
MetaCluster(clusters)
where the argument "clusters" is a list of object of class Cluster
from which the metacluster is created.
An object of class "MetaCluster
" contains the following slots:
num.clusters
The number of clusters in the metacluster.
clusters
A list of length num.clusters
storing the clusters (cell populations) participating in this metacluster. Each cluster is stored as an object of class Cluster
.
size
Number of cells in the metacluster (summation of all cluster sizes).
center
A numeric vector denoting the center of the metacluster.
cov
A matrix denoting the covariances of the underlying normal distribution of the metacluster.
All the slot accessor functions take an object of class MetaCluster
. I show usage of the first accessor function. Other functions can be called similarly.
get.size
:The number of cells in the metacluster(summation of all cluster sizes).
Usage: get.size(object)
here object
is a MetaCluster
object.
get.num.clusters
Returns the number of clusters in the metacluster.
get.clusters
Returns the list of clusters (cell populations) participating in this metacluster. Each cluster is stored as an object of class Cluster
.
get.size
Returns the number of cells in the metacluster (summation of all cluster sizes).
get.center
Returns the center of the metacluster.
get.cov
Returns the covariances matrix of the metacluster.
Display details about the Metacluster
object.
Return descriptive summary for the MetaCluster
object.
Usage: summary(MetaCluster)
We plot a metacluster as a contour plot of the distribution of the underlying clusters or the combined metacluster.
We consider cells in clusters or in the metacluster are normally distributed and represent the distribution with ellipsoid.
The axes of an ellipsoid is estimated from the eigen values and eigen vectors of the covariance matrix ("Applied Multivariate Statistical Analysis" by R. Johnson and D. Wichern, 5th edition, Prentice hall).
We then plot the bivariate projection of the ellipsoid as 2D ellipses.
Usage:
plot(mc, alpha=.05, plot.mc=FALSE, ...)
the arguments of the plot function are:
mc
An object of class MetaCluster
for which the plot function is invoked.
alpha
(1alpha)*100% quantile of the distribution of the clusters or metacluster is plotted.
plot.mc
TRUE/FALSE, when TRUE the functions draws contour of the combined metacluster and when FALSE the function draws the contours of the individual clusters.
...
Other usual plotting related parameters.
Ariful Azad
Azad, Ariful and Pyne, Saumyadipta and Pothen, Alex (2012), Matching phosphorylation response patterns of antigenreceptorstimulated T cells via flow cytometry; BMC Bioinformatics, 13 (Suppl 2), S10.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36  ## 
## load data
## 
library(healthyFlowData)
data(hd)
## 
## Retrieve each sample, cluster it and store the
## clustered samples in a list
## 
cat('Clustering samples: ')
clustSamples = list()
for(i in 1:length(hd.flowSet))
{
cat(i, ' ')
sample1 = exprs(hd.flowSet[[i]])
clust1 = kmeans(sample1, centers=4, nstart=20)
cluster.labels1 = clust1$cluster
clustSample1 = ClusteredSample(labels=cluster.labels1, sample=sample1)
clustSamples = c(clustSamples, clustSample1)
}
## 
## Create a template from the list of clustered samples and retrieve the metaclusters
## 
template = create.template(clustSamples)
#retrieve metaclusters from template
mc = get.metaClusters(template)[[1]]
summary(mc)
# plot all participating cluster in this metacluster
plot(mc)
# plot the outline of the combined metacluster
plot(mc, plot.mc=TRUE)

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
Please suggest features or report bugs with the GitHub issue tracker.
All documentation is copyright its authors; we didn't write any of that.