clusterSamplesByComp_multiple {MineICA} | R Documentation

## 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`.

### Details

One clustering is run independently for each component.

### Value

A list consisting of three elements

clus:

  a data.frame specifying the sample clustering for each component using the different ways of clustering,

resClus:

  the complete output of the clustering function(s),

comparClus:

  the adjusted Rand indices, used to compare the clusterings obtained for a same component.

### Author(s)

Anne

### See Also

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

### Examples

    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)

[Package MineICA version 1.32.0 Index]