This is probably a simple question and my apologies if that is the case. I have a question regarding the meaning of the "weight" column in the Cytoscape Output Edge File after using WGCNA (this may apply to other output files, but I do not know if the name is the same). Obviously I understand what the weight is, but in this case is the weight the p-value? So a lower number is more significant? Or does a higher weight mean two nodes are more related?
I've looked everywhere but can't find an answer, so apologies if I missed something obvious. Thank you very much in advance!
How have you gone from WGCNA to Cytoscape?, i.e., how did you input your data into Cytoscape?
What is the range of the weights that you're seeing?
Hi Kevin,
I used the Cytoscape export function in WGCNA (the function is exportNetworkToCytoscape) to create an edge file, so I get a file with headers as such: fromNode toNode weight direction fromAltName toAltName. Then in Cytoscape I load that file as a network and select fromNode as the Source Node; toNode as the Target Node; and weight as the Edge Attribute.
The range of weights that I see is from about 0.001 up to 0.5, which leads me believe it is a p-value and I should look for the smaller number to get the best correlation, but I want to be sure! Especially because I like to filter my coexpressors for my bait genes so that I don't have a hair ball when I look at the network (e.g. take the top 30 coexpressors for each bait gene). Therefore it is very important that I am selecting the coexpressors that are most highly correlated, and not the opposite.
Hi! I'm not so sure that it's P value. I believe it is just the edge weight from the adjacency matrix. If you look at the default parameters for the exportNetworkToCytoscape function, it says the following for the parameter
threshold
:The default value for this just so happens to be 0.5, which is the max value that you see for edge weights in Cytoscape.
What do you think?
Hi Kevin,
Yes, that makes sense! With this understanding, I would take values closest to 0.5 to be the "best" edges. Would you agree?
Hi! Yes, that is my interpretation of it. I would just modify the
threshold
parameter to something like 0.1 and then 0.9 just to be sure! It is not entirely clear from the WGCNA manual.Hi Kevin,
That's a great idea! Thanks so much for your discussion.
Okay, it was no problem. Best of luck with the work!