# Why does hclust gives a different cluster than pvclust in r?

I am trying to get the p-values for hierarchical clustering analysis on the following dataset.The dendrograms generated by pvclust and hclust are completely different.Because the pvclust mentioned they used the same method as hclust, it should be identical.

>test=read.delim("test1.txt", header=T)
> test

S1 S2 S3 S4 S5 S6 S7 S8 S9 S10
1  1  1  1  1  1  1  0  1  1   0
2  0  0  1  0  0  0  0  0  0   0
3  1  0  0  1  1  0  0  0  1   1
4  1  0  1  0  1  1  0  1  0   1
5  0  1  0  1  0  0  0  0  1   0
6  1  0  1  0  1  1  0  0  0   1
7  1  1  0  1  0  0  1  0  1   0
8  1  1  0  1  0  1  1  0  1   0
9  1  0  1  0  1  1  0  1  0   0

> div.norm=decostand(test,"normalize")
> div.ch=vegdist(div.norm,"bray")
> div.ch.UPGMA=hclust(div.ch,method = "average")
> plot(div.ch.UPGMA)


This generates the following dendrogram:

Then I tried to run the same dataset using pvclust.

> test.tr=t(test)
> result=pvclust(test.tr, method.dist="cor", method.hclust="average", nboot=1000)
> plot(result)


I get the following dendrogram which is different from the one generated by hclust. Some suggested that I should not transpose the data. But that produces a dendrogram where the columns are clustered (I don't want that).

Any help would be greatly appreciated!

• The dendograms are almost identical. Why do you think they are completely different? – Peter Flom Aug 10 '16 at 13:11
• @Peter: In this particular case of a small dataset, they are not very different. For other large datasets, they are quite different. Anyway, they should be identical and they are not. – user127213 Aug 10 '16 at 13:31