How to create a file from WGCNA to Cytoscape
0
0
Entering edit mode
3.7 years ago
evelyn ▴ 230

Hello,

I have 50 traits and WGCNA analysis identified 97 modules. I want to make a network figure using Cytoscape for all the traits. I found this code to use for this purpose:

load(file = "dataInput.RData"); 
load(file = "networkConstruction.RData");
softPower <- 7 ;
adjacency <- adjacency(datExpr, power = softPower) ;
TOM <- TOMsimilarity(adjacency) ;
modules = c(---)
probes = colnames(datExpr) 
inModule = is.finite(match(moduleColors, modules));
modProbes = probes[inModule];
modTOM = TOM[inModule, inModule];
dimnames(modTOM) = list(modProbes, modProbes)
cyt = exportNetworkToCytoscape(modTOM,
                               edgeFile = paste("CytoscapeInput-edges0-", paste(modules, collapse="-"), ".txt", sep=""),
                               nodeFile = paste("CytoscapeInput-nodes0-", paste(modules, collapse="-"), ".txt", sep=""),
                               weighted = TRUE,
                               threshold = 0,
                               nodeNames = modProbes,
                               nodeAttr = moduleColors[inModule]);

I have both .RData files. I am not sure which modules to add in this code. Do I need to add all the identified modules, then how can I extract their names. Thanks!

next-gen • 1.8k views
ADD COMMENT
0
Entering edit mode

So, your previous issue has been solved? - WGCNA to Cytoscape Error

ADD REPLY
0
Entering edit mode

Yes, it was solved. TOM is not empty now.

ADD REPLY
0
Entering edit mode

Great - I have marked it as accepted. Also, I just assume that it's coincidence that your question is remarkably similar to this one: https://support.bioconductor.org/p/132734/

In relation to your original question (above), you may need to explain better what you want to do. You are already passing module information via nodeAttr = moduleColors[inModule]

ADD REPLY
0
Entering edit mode

Hi Kevin Blighe,

I have done WGCNA analysis and wanted to export the network for WGCNA Analysis but its so large that I could not open it in Cytoscape. Even I tried to export a single module but it is also too large. if I put the threshold high then I can reduce the size and open it in Cytoscape but it also eliminates the hub gene detected by chooseTopHubInEachModule() function.

What should I do?

Thanks

ADD REPLY
1
Entering edit mode

Hi, sounds like an issue for Cytoscape, and / or your own computer's hardware limitations. Your decision about what to do is better than mine, as you know better your own data.

ADD REPLY

Login before adding your answer.

Traffic: 2385 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6