R/gene_selection.R
ClusterGenes.RdPerforms agglomerative hierarchical clustering on a gene distance matrix,
cuts the tree dynamically with dynamicTreeCut::cutreeDynamic, tightens
clusters by removing outliers with tighten_modules(), and drops
singleton/small clusters.
ClusterGenes(
gene_dist,
clustering_method = "average",
min_gene = 2,
deepSplit = 1,
z_thresh = 3
)A dist object (or symmetric matrix coercible to one)
of pairwise gene distances.
Character. Linkage method passed to hclust().
Default "average".
Integer. Minimum cluster size to retain. Default 2.
Integer (0–4). Controls the sensitivity of dynamic tree
cutting; higher values produce more, smaller clusters. Default 1.
Numeric. MAD outlier threshold passed to tighten_modules().
Default 3.
A named factor of cluster assignments (levels re-indexed as consecutive integers). Genes removed as singletons or outliers are dropped from the result.
if (FALSE) {
gene_partition <- ClusterGenes(as.dist(gene.dist.mat))
}