Learn R Programming

Mergeomics (version 1.0.0)

tool.cluster.static: Static hierarchical clustering

Description

tool.cluster.static takes dendrogram (clustering tree) and its cutting height; then, obtains cluster labels for the nodes of the tree.

Usage

tool.cluster.static(dendro, hlim)

Arguments

dendro
dendrogram (tree)
hlim
cutting height of the dendrogram

Value

clusters
cluster labels of the components after static clustering

References

Shu L, Zhao Y, Kurt Z, Byars S, Tukiainen T, Kettunen J, Ripatti S, Zhang B, Inouye M, Makinen VP, Yang X. Mergeomics: integration of diverse genomics resources to identify pathogenic perturbations to biological systems. bioRxiv doi: http://dx.doi.org/10.1101/036012

Examples

Run this code
set.seed(1)
## assume that we have a dataset including several samples 
## with distinct features
dataset <- matrix(rnorm(20), ncol=5) ## 4 samples with 5 features
## Find the distances between each sample pair to cluster them
d <- dist(dataset, method = "euclidean", upper=TRUE, diag=TRUE)
tree <- hclust(d)
## Height cutoff.
hlim <- max(tree$height)
## Find clusters.
clusters <- tool.cluster.static(tree, hlim)

Run the code above in your browser using DataLab