HClust 对象的顺序是否给出了标签在树上出现的顺序?

Does the order of a HClust object give the order in which the labels are appearing on a tree?

我正在对表达数据进行 WGCNA,并且我使用 hclust 函数进行了聚类:

hierADJ=hclust(as.dist(dissADJ), method="average" )

然后我绘制此聚类(使用来自模块检测的一些额外颜色)

plotDendroAndColors(hierADJ, colors = colorStaticADJ,
                dendroLabels = FALSE, abHeight = 0.99,
                main = "Gene dendrogram and module colors")

查看下图中的结果

我的问题是:当我有 hclust 对象 hierADJ 时,如果我这样做:

hierADJ$labels[hierADJ$order]

它是否告诉我提示出现的顺序(从左到右)?在进一步分析之前,我真的需要确定这一点

下面是使用部分 iris 数据集的测试,以查看标签是否匹配:

library(WGCNA)
data(iris)
iris.sub <- iris[c(1:5, 51:55, 101:105), ]
iris.hcl$labels[iris.hcl$order]
# [1] "1"   "5"   "2"   "3"   "4"   "54"  "102" "51"  "53"  "52"  "55"  "103" "101" "104" "105"
clr <- as.numeric(iris.sub$Species) + 1
plotDendroAndColors(iris.hcl, colors=clr)

请注意,绘图上的标签与上面列出的标签匹配。