clusterSamplesByComp: Cluster samples from an IcaSet

Description Usage Arguments Value Author(s) See Also Examples

View source: R/functions_comp2annot.R

Description

This function allows to cluster samples according to the results of an ICA decomposition. One clustering is run independently for each component.

Usage

1
2
3
4
5
  clusterSamplesByComp(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 one 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:

"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.res <- clusterSamplesByComp(icaSet=icaSetCarbayo, params=params, funClus="kmeans",

Value

A list consisting of three elements

clus:

a list specifying the sample clustering for each component,

resClus:

the complete output of the clustering function,

funClus:

the function used to perform the clustering.

. When clusterOn="S", if some components were not used because no contributing elements is selected using the cutoff, the icaSet with the corresponding component deleted is also returned.

Author(s)

Anne Biton

See Also

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
data(icaSetCarbayo)
params <- buildMineICAParams(resPath="carbayo/", selCutoff=4)

## cluster samples according to their contributions
# using Mclust without a number of clusters
res <- clusterSamplesByComp(icaSet=icaSetCarbayo, params=params, funClus="Mclust",
                            clusterOn="A", filename="clusA")

# using kmeans
res <- clusterSamplesByComp(icaSet=icaSetCarbayo, params=params, funClus="kmeans",
                            clusterOn="A", nbClus=2, filename="clusA")

Bioconductor-mirror/MineICA documentation built on May 29, 2017, 8:30 a.m.