clusterHMMs {AneuFinder} | R Documentation

## Cluster objects

### Description

Cluster a list of `aneuHMM` or `aneuBiHMM` objects by similarity in their CNV-state.

### Usage

    clusterHMMs(hmms, cluster = TRUE, classes = NULL, exclude.regions = NULL)

### Arguments

`hmms` | A list of `aneuHMM` or `aneuBiHMM` objects or a character vector of files that contains such objects.
`cluster` | Either `TRUE` or `FALSE`, indicating whether the samples should be clustered by similarity in their CNV-state.
`classes` | A vector with class labels the same length as `hmms`. If supplied, the clustering will be ordered optimally with respect to the class labels (see `RearrangeJoseph`).
`exclude.regions` | A `GRanges-class` with regions that will be excluded from the computation of the clustering. This can be useful to exclude regions with artifacts.

### Value

An list() with ordered ID indices and the hierarchical clustering.

### Examples

    ## Get results from a small-cell-lung-cancer
    lung.folder <- system.file("extdata", "primary-lung", "hmms", package="AneuFinderData")
    lung.files <- list.files(lung.folder, full.names=TRUE)
    models <- loadFromFiles(lung.files)
    ## Not run:
    # Plot unclustered heatmap
    heatmapGenomewide(models, cluster=FALSE)
    ## End(Not run)
    ## Cluster and reorder the models
    clust <- clusterHMMs(models)
    models <- models[clust$IDorder]
    ## Not run:
    # Plot re-ordered heatmap
    heatmapGenomewide(models, cluster=FALSE)
    ## End(Not run)

[Package AneuFinder version 1.8.0 Index]