groupClusters {goSTAG} | R Documentation |
Groups similar leaves of a hierarchical cluster analysis into clusters.
groupClusters(hclust_results, distance_threshold = 0.2)
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. |
A list of vectors. Each element of the list corresponds to a cluster, and each vector contains the GO terms in the cluster.
Brian D. Bennett
Pierre R. Bushel
Bennett BD and Bushel PR. goSTAG: Gene Ontology Subtrees to Tag and Annotate Genes within a set. Source Code Biol Med. 2017 Apr 13.
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 )