clusterHMMs: Cluster objects

Description Usage Arguments Value Examples

View source: R/clusterHMMs.R

Description

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

Usage

1
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

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
## 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)

AneuFinder documentation built on Nov. 1, 2018, 2:36 a.m.