Question: How to export a network of a specific module to Cytoscape - Consensus modules / multiExpr
0
gravatar for Apprentice
2.1 years ago by
Apprentice50
Apprentice50 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 • 1.5k views
ADD COMMENTlink modified 10 months ago by Kevin Blighe71k • written 2.1 years ago by Apprentice50

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 only what you want to export.

ADD REPLYlink modified 10 months ago • written 2.1 years ago by Kevin Blighe71k

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 2.1 years ago • written 2.1 years ago by Apprentice50

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 2.1 years ago • written 2.1 years ago by Kevin Blighe71k

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 2.1 years ago • written 2.1 years ago by Apprentice50
2
gravatar for Kevin Blighe
2.1 years ago by
Kevin Blighe71k
Republic of Ireland
Kevin Blighe71k wrote:

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 COMMENTlink written 2.1 years ago by Kevin Blighe71k
1

Thank you for your advice. I did it!

ADD REPLYlink written 2.0 years ago by Apprentice50
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: 1809 users visited in the last hour
_