Hierarchically clusters the samples (columns of data.matrix) and writes a
dendrogram to PDF; optionally also a phylogeny-style plot.
Usage
dendrogram_samples(
data.matrix,
hc_metric.var = "euclidean",
hc_method.var = "ward.D2",
type.var = NULL,
output.dir = "results/figures/"
)Arguments
- data.matrix
Numeric matrix (features x samples).
- hc_metric.var
Distance metric for clustering (e.g.
"euclidean").- hc_method.var
Agglomeration method (e.g.
"ward.D2").- type.var
Optional
ape::plot.phylo()layout ("phylogram","fan","unrooted","radial"); ifNULLonly the standard dendrogram is drawn.- output.dir
Directory to write the PDF(s) into (created if needed). Use
NULLto skip writing.