Entering edit mode
4.6 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!
Try having just colour names in the vector, modules. e.g "mediumpurple2".
Thank you, it is still the same. As I said in the post,
TOM
object in a step previous to defining modules is empty.