WGCNA tutorial II
1
4
Entering edit mode
@bahmanikmsuedu-23146
Last seen 4.2 years ago
Michigan State University

Hi, I have 2 questions about WGCNA on female and male datasets (tutorial II). 1-In the tutorial II shows female modules (from tutorial one) has been used vs the consensus modules from both female and male data. Does that make any difference if I use male modules vs the consensus modules? If it does, how can we decide which one should we use? 2-When you find the consensus modules, how can I export edge and node info for cytoscape? On the website, it shows it for only when we have female data. Thank you,

WGCNA female and male datasets • 5.2k views
ADD COMMENT
1
Entering edit mode
Kevin Blighe ★ 4.0k
@kevin
Last seen 6 weeks ago
Republic of Ireland

Hey again,

The first tutorial on the main WGCNA tutorials page, i.e., 'I. Network analysis of liver expression data from female mice: finding modules related to body weight', is just generic and can be used for any dataset that you have.

In Tutorial II, 'II. Consensus analysis of female and male liver expression data', the steps will take you through the processing of both the male and female datasets, and then, also, the consensus analysis of these.

For exporting to Cytoscape, you just need the WGCNA::exportNetworkToCytoscape() function, as elaborated in '6. Export of networks to external software' under the first main tutorial on the WGCNA page.

The tutorials are located at: https://horvath.genetics.ucla.edu/html/CoexpressionNetwork/Rpackages/WGCNA/Tutorials/

Kevin

ADD COMMENT
0
Entering edit mode

So it doesn't matter female or male modules vs consensus modules, it is just to see how the consensus modules are different in male and female sets (to find preserved modules also), right? About cytoscape, since female and male each one is going to have different weights in the consensus network, so do I need to draw cytoscape network separately for each? How can I export expression data for each module to be used in cytoscape? Thank you,

ADD REPLY
0
Entering edit mode

Yes, well, the consensus modules are derived from an analysis of both the male and female datasets. It is about looking for differences between these, and also similarities. If you follow each section in Tutorial II, then it should become more clear about what is happening.

Regarding Cytoscape, I wonder could you take a look at the input parameters to the WGCNA::exportNetworkToCytoscape() function, and then see what you have in your workspace that could be passed to this? In fact, I have just found my own previous answer on Biostars about how to do it: https://www.biostars.org/p/361286/#361701

It would also be worth your time to explore the male and female datasets on their own.

Keep in mind that WGCNA is not a Bioconductor package, but we generally answer questions relating to WGCNA here anyway.

ADD REPLY
0
Entering edit mode

OK so I used this "consensusTOM <- consensusDissTOMandTree(multiExpr, softPower = 22, TOM = NULL)" to get TOM, and then I used this "cyt=exportNetworkToCytoscape(consensusTOM$consensusTOM)" to get edge and node data as a list. The weight for edges are kind of weird they are all close to 1 (not sure that is what we expect to see or not). If what I got is right, how am I going to input this to cytoscape, since it is not like a dataframe to be write in txt or csv file? Thank you,

ADD REPLY
0
Entering edit mode

The problem is that WGCNA is a weighted network, i.e., every node (gene) is, technically, connected to every other node, but these connections (the edges) are weighted by a correlation coefficient. When you export it to Cytoscape, [I believe] Cytoscape does not consider such weighting immediately; so, during the export, a threshold is used to keep or discard edges. Can you check all of the parameters for exportNetworkToCytoscape() in order to learn more about this?

ADD REPLY
0
Entering edit mode

In one word: RTM. In more detail: the call to consensusDissTOMandTree returns consensus TOM dissimilarity which equals 1-TOM. The output component consensusTOM has an unfortunate name because it's really the dissimilarity, not TOM similarity that is returned as documented in the help for the function. So you should perhaps use cyt=exportNetworkToCytoscape(1-consensusTOM$consensusTOM). Furthermore, if you want to input the network into cytoscape, you need to instruct exportNetworkToCytoscape to save the tables into files by supplying suitable file names (again, RTM). Cytoscape can then import the files. If you have a large network (thousands of genes) and you set the threshold at 0, you will get monstrous files; the threshold allows you to prefilter the connections. (The default value 0.5 is too high for TOM matrices; set it something like 0.1 or 0.05 for TOM.) If your network is of manageable size, set the threshold at 0 and filter the edges interactively in cytoscape.

ADD REPLY
0
Entering edit mode

I didn't understand what RTM is. The code "cyt=exportNetworkToCytoscape(1-consensusTOM$consensusTOM)" worked, and then I used these 2 codes "write.table(cyt$edgeData, file = "edge.txt", sep = "\t", quote = F)" and "write.table(cyt$nodeData, file = "node.txt", sep = "\t", quote = F)" to get the 2 files of edges and nodes to be input in cytoscape. The edge file has "fromNode", "toNode" and "weight" columns, and the node file has "nodeName" and "nodeAttr[nodesPresent, ]" columns. Just the edge file by itself in cytoscape gives me a network, but I am not sure that is all I need to have from cytoscape, plus when I input the node file in cytoscape it says "no edge will be created in the network, the source column is not selected". I have selected the "nodeName" column as source column, but it just keeps saying the same thing.Thank you

ADD REPLY
0
Entering edit mode

Dear Bahmanik,

thank for your post. I think I have the same problem of how to load both node and edge file into the cytoscape. I loaded edge file alone and I got a beautiful network and so far no one has clearly explained how to load the node file at all. or how to incoporate node and egde file togeter in the cytoscape. Have you solve the issue? if so, could you kinldy give some details how to do it.

Kind Regards,

synat

ADD REPLY

Login before adding your answer.

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