groupClusters: Group Clusters

Description Usage Arguments Value Author(s) References Examples

View source: R/groupClusters.R

Description

Groups similar leaves of a hierarchical cluster analysis into clusters.

Usage

1
groupClusters(hclust_results, distance_threshold = 0.2)

Arguments

hclust_results

An object of class "hclust" containing a tree produced by hierarchical clustering.

distance_threshold

The distance threshold at which to group leaves into clusters. Leaves whose distance is less than or equal to this threshold will be grouped together. A larger distance threshold will produce fewer clusters with more members, whereas a smaller one will produce more clusters with fewer members.

Value

A list of vectors. Each element of the list corresponds to a cluster, and each vector contains the GO terms in the cluster.

Author(s)

Brian D. Bennett
Pierre R. Bushel

References

Bennett BD and Bushel PR. goSTAG: Gene Ontology Subtrees to Tag and Annotate Genes within a set. Source Code Biol Med. 2017 Apr 13.

Examples

1
2
3
4
5
6
7
data( goSTAG_example_gene_lists )
go_terms <- loadGOTerms()
enrichment_matrix <- performGOEnrichment( goSTAG_example_gene_lists, go_terms )
hclust_results <- performHierarchicalClustering( enrichment_matrix )

clusters <- groupClusters( hclust_results )
lapply( head( clusters ), head )

goSTAG documentation built on Nov. 17, 2017, 1:15 p.m.