0
$\begingroup$

I am following the tutorials on the WGCNA website for creating a coexpression network. It is taking way too long. Is there a way to speed up execution? All I need is to create the co-expression graph. I will then export to Python and do my analysis there. In particular, the step "calculating module eigengenes" is taking a lot of time. I do not really care about the modules. All I want is the graph with the genes and the weighted edges.

$\endgroup$
0
$\begingroup$

You can use the "manual network construction" approach. Calculate TOM, then use exportNetworkToCytoscape or exportNetworkToVisANT to export the network (or simply save the TOM matrix as a table and load it in Python).

$\endgroup$
  • $\begingroup$ I tried doing exportNetworkToCytoscape(TOM), but I get Error in exportNetworkToCytoscape(TOM) : Cannot determine node names: nodeNames is NULL and adjMat has no dimnames. How can you let it just use the names that were used when creating the graph? $\endgroup$ – An Ignorant Wanderer May 16 '20 at 21:53
  • 1
    $\begingroup$ Supply the names in the argument nodeNames. $\endgroup$ – Peter Langfelder May 17 '20 at 22:08
  • $\begingroup$ So I did as suggested, I ran the command exportNetworkToCytoscape(TOM, nodeNames = names(datExpr), edgeFile = "edges.csv", nodeFile = "nodes.csv") but I'm curious about the result. edges.csv seems to have been populated correctly (though I'm not 100% sure, there are 5237 edges, which sounds reasonable), but nodes.csv not so much. In particular, the nodes.csv file has only 151 node entries, but I'm not sure why, since in the tutorial there are 3600 genes and so I expected 3600 entries. $\endgroup$ – An Ignorant Wanderer May 18 '20 at 3:36
  • $\begingroup$ If you want the entire network, you also need to set argument threshold to zero. otherwise you will only get edges whose weight are above the (default) value of threshold which is 0.5. Just be prepared to see large edge file. $\endgroup$ – Peter Langfelder May 19 '20 at 4:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.