This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Dynamic tree cut results

Hello everyone, I was doing some differential gene expression and I want to explore the clustering of my genes for further functional analysis using the hierarchical clustering method. Visually, I can detect 40 clusters but I want to be more objective so I used cutreeDynamic from the R package "dynamicTreeCut" which gave me 38 clusters. The problem is the result should be a named vector where the names are the gene IDs and the value is the cluster assignment, however, the vector names are numerical themselves and redundant "If I have 11000 genes I should have 11000 unique numerical values but instead I get 38 unique numerical values in the name of the vector", looked at the documentation of the package found this

"Value A vector of numerical labels giving assignment of objects to modules. Unassigned objects are labeled 0, the largest module has label 1, next largest 2 etc."

This is my R code running this and sample of the output

clusters <- cutreeDynamic(dendro = clust.rows,
                          distM = as.matrix(as.dist(1 - cor(t(clust.data)))), 
                          method = "hybrid",verbose = 0)
clusters[1:5]
 1 14  1  3  1 
 4 14  4  2  4 
length(unique(names(clusters)))
[1] 38
length(unique(clusters))
[1] 38

Clust.rows object is a the return value of hclust on a count matrix does anyone have a clue?

clustering deg

0 answers

No answers yet.

Log in to answer this question.