While I am trying WGCNA package to get modules of the candidate genes without expression data but distance matrix derived from sequence alignment. The distance matrix was converted from newick file with python script.
Asking Dr Steve Horvath about this situation I was told:
The WGCNA package does not require gene expression data. Rather many functions directly apply to an adjacency matrix (or conversely a distance matrix). e.g. dissTOM, networkConcepts, flashClust.
Regarding your question: Intramodular hub genes are equivalent to module eigengenes (as shown in Horvath Dong 2008)
Thus, you can simply represent a module by the most highly connected intramodular node.
Toward this end, you can use the following function from the link
> intramodularConnectivity(adjMat, colors, scaleByMax = FALSE)
but I am still not clear about the next steps following the tutorial stuck from this step:
# MEList = moduleEigengenes(datExpr, colors = dynamicColors) > MEList <- intramodularConnectivity(distMatrix, colors, scaleByMax = FALSE) > MEs = MEList$eigengenes # Calculate dissimilarity of module eigengenes > MEDiss <- 1-cor(MEs); # Cluster module eigengenes > METree <- hclust(as.dist(MEDiss), method = "average"); > MEDissThres = 0.25 # Plot the cut line into the dendrogram > abline(h=MEDissThres, col = "red") # Call an automatic merging function > merge = mergeCloseModules(distMatrix, dynamicColors, cutHeight = MEDissThres, verbose = 3) > mergedColors = merge$colors; # Eigengenes of the new merged modules: > mergedMEs = merge$newMEs; > plotDendroAndColors(geneTree, cbind(dynamicColors, mergedColors), c("Dynamic Tree Cut", "Merged dynamic"), dendroLabels = FALSE, hang = 0.03, addGuide = TRUE, guideHang = 0.05) > # dev.off()
To be more specific, my questions are:
1) How do I get adjacency matrix from the distance matrix for intramodularConnectivity() function as, again, I do not have expression data;
2) If distance matrix can be used for adjacency matrix, how do I get "eigengenes" from intramodularConnectivity() function which output 4 column of a dataframe that does not have "eigengenes" and feed to the next steps?
3) How to handle another step with mergeCloseModules() which needs datExpr object but I have distance Matrix?
I am aware that the whole issue is to handle distance matrix as input instead of expression data. Appreciate if anyone has experience with similar scenario, which I thought this might be useful for phylogenetic study.
Thanks a lot!