Entering edit mode
Hi All,
I am using WGCNA build a coexpression network. Here is the thing: I use blockwiseModules
to build network, and saved TOM to a file. Then I want to calculate connectivity of genes by using the TOM data. I load TOM file into R workspace, it is a large dist class object. How can I transfer it into a matrix that both rows and columns are genes and values are the weights of gene pairs? So that I can use rowSum
of colSum
to calculate connectivity of each gene. Thanks!
I found it. I can use as.matrix function. TOM data is a dist object.