hclustWrapper: Wrapper for hierarchical clustering

View source: R/hclustWrapper.R

hclustWrapperR Documentation

Wrapper for hierarchical clustering

Description

This fuction is a wrapper for the hclust, dist, and cutree functions. It outputs a string of a concatenated vector of 1's and 2's indexed by column. This function is not meant to be run individually, but as a 'clustFunc' argument for running 'K2preproc()', 'runK2Taxonomer()', and 'K2tax()'.

Usage

hclustWrapper(dataMatrix, clustList)

Arguments

dataMatrix

An P x N numeric matrix of data.

clustList

Named list of objects to use for clustering procedure. Or ‘NULL' to use Euclidean distance with Ward’s method.

  • 'distMetric'Distance method to use. See ?dist.

  • 'aggMethod'Agglomerative method to use. See ?hclust.

Value

A character string of concatenated 1's and 2's pertaining to the cluster assignment of each column in dataMatrix.

References

\insertRef

reed_2020K2Taxonomer

Examples


## Read in sample ExpressionSet
require(Biobase)
data('sample.ExpressionSet')

## Extrat subset of data matrix
dm <- exprs(sample.ExpressionSet)[seq_len(50),]

## Create list of objects for clustering procedure.
cL <- list(distMetric='euclidean', aggMethod='ward.D2')

## Generate K=2 split with hierarchical clustering
hclustWrapper(dm, cL)


montilab/K2Taxonomer documentation built on Nov. 8, 2024, 2:36 a.m.