Hi,
I run WGCNA for my study.Now, I want to import my network in Cytoscape for visualization. based on WGCNA tutorial, for that purpose I have to run below code:
# select modules modules = c("blue","brown")
# Select module probes
inModule=is.finite(match(moduleColorsFemale,modules))
modProbes=probes[inModule]
match1=match(modProbes,GeneAnnotation$substanceBXH)
modGenes=GeneAnnotation$gene_symbol[match1]
# Select the corresponding Topological Overlap
modTOM = TOM[inModule, inModule]
dimnames(modTOM) = list(modProbes, modProbes)
# Export the network into edge and node list files for Cytoscape
cyt = exportNetworkToCytoscape(modTOM,
edgeFile=paste("CytoEdge",paste(modules,collapse="-"),".txt",sep=""), nodeFile=paste("CytoNode",paste(modules,collapse="-"),".txt",sep=""),
weighted = TRUE, threshold = 0.02,nodeNames=modProbes,
altNodeNames = modGenes, nodeAttr = moduleColorsFemale[inModule])
when I want to run:
modTOM = TOM[inModule, inModule]
I got below error:
Error: object 'TOM' not found.
So, my question is what is TOM.should I calculate TOM via below code:
> TOM = TOMsimilarityFromExpr(datExpr, power=7)
I appreciate if anybody share his/her comment with me.
Best Regards,
Mohammad
For Your Information (FYI): double-posted at Bioconductor: https://support.bioconductor.org/p/110777/