Last data update: 2014.03.03

R: immunoClust Model Refinement Step in iterative Cell-events...
cell.SubClusteringR Documentation

immunoClust Model Refinement Step in iterative Cell-events Clustering

Description

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.

Usage

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") 

Arguments

x

An immunoClust object with the initial model parameter (K, w, mu, sigma).

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 "MEt" for EMt-iteration or "ME" for EM-iteration without test step.

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 mvt for a t-mixture model or mvn for a Gaussian Mixture model.

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.

Details

These function are used internally by the cell-clustering procedures of cell.process in immunoClust and are not intended to be used directly.

Value

The cluster parameters of the refined model in an object of class immunoClust.

Author(s)

Till Sörensen till-antoni.soerensen@charite.de

References

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).

See Also

cell.process, cell.hclust

Examples

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)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(immunoClust)
Loading required package: grid
Loading required package: lattice
Loading required package: flowCore
> png(filename="/home/ddbj/snapshot/RGM3/R_BC/result/immunoClust/cell.SubClustering.Rd_%03d_medium.png", width=480, height=480)
> ### Name: cell.SubClustering
> ### Title: immunoClust Model Refinement Step in iterative Cell-events
> ###   Clustering
> ### Aliases: cell.SubClustering cell.TestSubCluster
> ### Keywords: cluster
> 
> ### ** Examples
> 
> 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)
** Experiment Information ** 
Experiment name: immunoClust Experiment 
Data Filename:    
Parameters:   FSC-A SSC-A FITC-A PE-A APC-A APC-Cy7-A Pacific Blue-A 
Description:  

** Data Information ** 
Number of observations: 10000 
Number of parameters:   7 
Removed observations:   0 (0%)

** Transformation Information ** 
htrans-A:   0.000000 0.000000 0.007202 0.004932 0.008136 0.015128 0.023041 
htrans-B:   0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 
htrans-decade:   -1 

** Clustering Summary ** 
Number of clusters: 13 
Cluster     Proportion  Observations
       1      0.037166           366
       2      0.054083           518
       3      0.001495            14
       4      0.005117            59
       5      0.040246           389
       6      0.035741           344
       7      0.015130           151
       8      0.007298            71
       9      0.114354          1107
      10      0.282377          2653
      11      0.007320           187
      12      0.014736           193
      13      0.384937          3948

    Min.      0.001495            14
    Max.      0.384937          3948

** Information Criteria ** 
Log likelihood: -265726.4 -266964.5 -182707.8 
BIC: -265726.4 
ICL: -266964.5 
> r2 <- cell.SubClustering(r1, dat.trans)
Test cluster 1 for sub-clustering
EM takes 0 mins minutes
Test cluster 2 for sub-clustering
EM takes 0 mins minutes
Test cluster 3 for sub-clustering
EM takes 0 mins minutes
Test cluster 4 for sub-clustering
EM takes 0 mins minutes
Test cluster 5 for sub-clustering
EM takes 0.017 mins minutes
Test cluster 6 for sub-clustering
EM takes 0 mins minutes
Test cluster 7 for sub-clustering
EM takes 0 mins minutes
Test cluster 8 for sub-clustering
EM takes 0.017 mins minutes
Test cluster 9 for sub-clustering
EM takes 0.017 mins minutes
Test cluster 10 for sub-clustering
EM takes 0.05 mins minutes
Test cluster 11 for sub-clustering
EM takes 0 mins minutes
Test cluster 12 for sub-clustering
EM takes 0.017 mins minutes
Test cluster 13 for sub-clustering
EM takes 0.05 mins minutes
cluster 11 has 2 sub-cluster at 5, ICL=1255
cluster 10 has 2 sub-cluster at 2, ICL=1249
cluster 12 has 3 sub-cluster at 3, ICL=512
cluster 5 has 2 sub-cluster at 2, ICL=29
cluster 4 has 2 sub-cluster at 3, ICL=21
cluster 9 has 2 sub-cluster at 2, ICL=12
cluster 8 has 2 sub-cluster at 2, ICL=6.9
split cluster 4 into 2 sub-cluster
split cluster 5 into 2 sub-cluster
split cluster 10 into 2 sub-cluster
split cluster 11 into 2 sub-cluster
split cluster 12 into 3 sub-cluster
Model Refinement takes 0.17 mins minutes

> summary(r2)
** Experiment Information ** 
Experiment name: Model Refinement 
Data Filename:    
Parameters:   FSC-A SSC-A FITC-A PE-A APC-A APC-Cy7-A Pacific Blue-A 
Description:  

** Data Information ** 
Number of observations: 0 
Number of parameters:   7 
Removed observations:   0 (NaN%)

** Transformation Information ** 
htrans-A:   0.000000 0.000000 0.007202 0.004932 0.008136 0.015128 0.023041 
htrans-B:   0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 0.000000 
htrans-decade:   -1 

** Clustering Summary ** 
Number of clusters: 19 
Cluster     Proportion  Observations
       1      0.037166             0
       2      0.054083             0
       3      0.001495             0
       4      0.004417             0
       5      0.000701             0
       6      0.018496             0
       7      0.021750             0
       8      0.035741             0
       9      0.015130             0
      10      0.007298             0
      11      0.114354             0
      12      0.009874             0
      13      0.272503             0
      14      0.002901             0
      15      0.004419             0
      16      0.008497             0
      17      0.004017             0
      18      0.002222             0
      19      0.384937             0

    Min.      0.000701             0
    Max.      0.384937             0

** Information Criteria ** 
Log likelihood:  
BIC:  
ICL:  
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>