1

I am pretty new to R so I am struggling with the following: I have a dataset where I am clustering several organ`s expresion values per patient. Like this I build 10 individual dendrograms. NOW, I would like to perform a consensus analysis and see how these individually built trees agree.

For the individual trees I have been using dendextend package. And I wanted to use the ape consensus function but I dont know how to transform my outcome from dendextend such that it is accepted in the consensus.

Like this I can plot the 10 individual trees

dend <- RawData[,4:ncol(RawData)] %>%
  dist %>%
  hclust(method = "average")%>%
  as.dendrogram

labels(dend) <- TMA_TT
dev.new()
dend %>% plot(main="dend")

I d like to use this:

consensus(..., p = 1, check.labels = TRUE)

....either (i) a single object of class "phylo", (ii) a series of such objects separated by commas, or (iii) a list containing such objects.

But I am not sure how to get my dendextend results to this format.

Tal Galili
  • 24,605
  • 44
  • 129
  • 187
  • Hi. In general, look at this: https://cran.r-project.org/web/packages/dendextend/vignettes/introduction.html#comparing-two-dendrograms . . Specifically you probably want the as.phylo function. – Tal Galili Sep 30 '19 at 16:34

0 Answers0