WGCNA to Cytoscape Error
1
0
Entering edit mode
3.8 years ago
evelyn ▴ 230

Hello,

After creating the heatmap, I want to export the WGCNA module information to Cytoscape to create a network. I used:

options(stringsAsFactors = FALSE)
allowWGCNAThreads()
lnames = load(file = "Input.RData");
lnames
lnames=load(file = "networkConstruction-auto.RData");
TOM = TOMsimilarityFromExpr(datExpr, power = 6)  
modules = c("MEmediumpurple2", "MEpalevioletred3", "MEthistle1", "MEthistle2", "MElavenderblush3", "MEdarkturquoise", "MEgreenyellow", "MEskyblue1", "MEorangered4", "MEgrey60", "MEblack")
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 checked that the CytpScapeInput_edges0 file is empty and when I traced back object TOM is also empty in the very beginning. I am not sure what is going wrong. Thank you for the help!

R • 1.5k views
ADD COMMENT
0
Entering edit mode

Try having just colour names in the vector, modules. e.g "mediumpurple2".

ADD REPLY
0
Entering edit mode

Thank you, it is still the same. As I said in the post, TOM object in a step previous to defining modules is empty.

ADD REPLY
0
Entering edit mode
3.8 years ago
evelyn ▴ 230

So, I think the error is got. I used:

softPower <- 7 ;
adjacency <- adjacency(datExpr, power = softPower) ;
TOM <- TOMsimilarity(adjacency) ;

to create TOM object and it is not empty.

ADD COMMENT

Login before adding your answer.

Traffic: 1870 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