Learn R Programming

MineICA (version 1.12.0)

clusterSamplesByComp_multiple: Cluster samples from an IcaSet

Description

This function allows to cluster samples according to the results of an ICA decomposition. Several clustering functions and several levels of data for clustering can be performed by the function.

Usage

clusterSamplesByComp_multiple(icaSet, params, funClus = c("Mclust", "kmeans", "pam", "pamk", "hclust", "agnes"), filename, clusterOn = c("A", "S"), level = c("genes", "features"), nbClus, metric = "euclidean", method = "ward", ...)

Arguments

icaSet
An IcaSet object
params
A MineICAParams object
funClus
The function to be used for clustering, must be several of c("Mclust","kmeans","pam","pamk","hclust","agnes")
filename
A file name to write the results of the clustering in
clusterOn
Specifies the matrix used to apply clustering, can be several of:
"A":
the clustering is performed in one dimension, on the vector of sample contributions,

"S":
the clustering is performed on the original data restricted to the contributing individuals.

level
The level of projections to be used when clusterOn="S", either "features" or "genes".
nbClus
The number of clusters to be computed, either a single number or a numeric vector whose length equals the number of components. If missing (only allowed if funClus is one of c("Mclust","pamk"))
metric
Metric used in pam and hclust, default is "euclidean"
method
Method of hierarchical clustering, used in hclust and agnes
...
Additional parameters required by the clustering function funClus.

Value

A list consisting of three elements
resClus:
the complete output of the clustering function(s),
comparClus:
the adjusted Rand indices, used to compare the clusterings obtained for a same component.

Details

One clustering is run independently for each component.

See Also

Mclust, adjustedRandIndex, kmeans, pam, pamk, hclust, agnes, cutree

Examples

Run this code
data(icaSetCarbayo)
params <- buildMineICAParams(resPath="carbayo/", selCutoff=3)

## compare kmeans clustering applied to A and data restricted to the contributing genes
## on components 1 to 3
res <- clusterSamplesByComp_multiple(icaSet=icaSetCarbayo[,,1:3], params=params, funClus="kmeans",
                                     nbClus=2, clusterOn=c("A","S"), level="features")
head(res$clus)

Run the code above in your browser using DataLab