Hi all!
I am permuting (1000 times) the columns of my matrix containing gene expression data and then using hierarchical clustering to cluster the data in R. I don't understand how to make a consensus tree out of my results and plot it. Someone told me about consensus function in maanova but it works only for a specific type of object with fitted ANOVA model so I don't want to use that. Can anyone suggest anything else in R? Here's my code:
make.permuted.clust <- function(i)
{
permuted <- data.matrix[,sample(ncol(data.matrix), 12, replace=TRUE)]
d = dist(permuted, method = "euclidean", diag = FALSE, upper = FALSE, p = 2)
clust = hclust(d, method = "complete", members=NULL)
clust
}
all.clust <- lapply(1:1000, make.permuted.clust)
Thanks!!