Question: How to export a network of a specific module to Cytoscape
0
gravatar for Apprentice
11 weeks ago by
Apprentice20
Apprentice20 wrote:

Hi

I constructed a consensus network based on six data sets of gene expression profiles. To construct the network, I used blockwiseConsensusModules function of WGCNA package. And then, I extracted a module associated with outcome from the network.

Because I would like to draw a network of the module, I need to export the network data of the module to Cytoscape.

Could you tell me how to export a network of a specific module obtained from blockwiseConsensusModules function to Cytoscape?

gene expression wgcna • 193 views
ADD COMMENTlink written 11 weeks ago by Apprentice20
0
gravatar for Kevin Blighe
11 weeks ago by
Kevin Blighe41k
Guy's Hospital, London
Kevin Blighe41k wrote:

Take a look at the exportNetworkToCytoscape function, in particular, the parameters that are passed to this function. Looking at nodeNames, for example, you should be able to export aonly what you want to export.

ADD COMMENTlink written 11 weeks ago by Kevin Blighe41k

Thank you for your quick reply.

I have tried to use the exportNetworkToCytoscape function as below.


mods = blockwiseConsensusModules(multiExpr, maxBlockSize = 30000, corType = "bicor", power = STPowers, networkType = "signed hybrid", TOMDenom = "mean", checkMissingData = FALSE, deepSplit = 3, reassignThresholdPS = 0, pamRespectsDendro = FALSE, mergeCutHeight = 0.25, numericLabels = TRUE, getTOMScalingSamples = TRUE, consensusQuantile = 0.25, verbose = 3, indent = 2);

exportNetworkToCytoscape(mods,nodeNames=geneNames)


However, It doesn't work. I got a error message " adjacency is not numeric".

Could you tell me why it doesn't work?

ADD REPLYlink modified 11 weeks ago • written 11 weeks ago by Apprentice20

blockwiseConsensusModules() returns many objects that are all stored in the single return variable. Take a look at the working example here: WGCNA exportNetworkToCytoscape issue!!

Also, you may simple need this function to produce the adjacency matrix, which is expected by exportNetworkToCytoscape(): https://rdrr.io/cran/WGCNA/man/adjacency.html

ADD REPLYlink modified 11 weeks ago • written 11 weeks ago by Kevin Blighe41k

Thank you for your kindly comments.

I could know that the adjacency matrix was needed to do exportNetworkToCytoscape. However, I can't find how to get the adjacency matrix from expression data in the multi-set format.

The link, which you suggested, explains how to get the adjacency matrix from expression data in the single-set format.

Could you tell me how to get the matrix from expression data in the multi-set format?

ADD REPLYlink modified 11 weeks ago • written 11 weeks ago by Apprentice20
1

I see. For multi-set data, I believe you can achieve it with these commands:

consensusTOM <- consensusDissTOMandTree(multiExpr, softPower = 8, TOM = NULL)
exportNetworkToCytoscape(consensusTOM$consensusTOM)

You will want to take a look at the other parameters, particularly the values of TOM that are passed to consensusDissTOMandTree()

ADD REPLYlink written 11 weeks ago by Kevin Blighe41k
1

Thank you for your advice. I did it!

ADD REPLYlink written 9 weeks ago by Apprentice20
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1388 users visited in the last hour