2
$\begingroup$

I have a question related with the most popular frameworks for network construction: WGCNA for weighted networks and igraph package for unweighted networks.

What are the advantages or disadvantages of applying these approaches and when it is recommended to use one over another.

$\endgroup$
2
  • $\begingroup$ Hi, this is a very open-ended discussion question that doesn't work well for the Stack Exchange format. Do you have a particular application in mind that could be linked to your question to make it more targeted? $\endgroup$
    – gringer
    Nov 30, 2022 at 11:19
  • $\begingroup$ I suspect the OP has been recommended an igraph recipe or concept for an unweighted graph theory calculation of co-expression and they believe this represents a "plug and play" package like WGCNA (albeit thats a guess). The answer is they are not really the same thing. $\endgroup$
    – M__
    Nov 30, 2022 at 13:22

1 Answer 1

3
$\begingroup$

igraph is a serious general network theory framework for any given data science application. It permits full directionality and describes vertices (nodes), edges (branches) and does cool stuff like De Bruijn graphs and Laplacian graphs. Understanding graph theory would be helpful and will be a steep learning curve. It's a serious data science package.

WGCNA is a specific ready made RNA expression package which appears to be network theory and is undirectional, i.e. no directionality which is fine for RNA expression. It will have far less overall power but if you've a load of RNA-seq data and want 'plug and play' type stuff WGCNA is the only way. It's a correlation network, based on r2 (Pearson's correlation), to assess co-expression. I would assume the weighting is geared towards identifying co-expression. There is an error in Fig. 2 legend BTW Langfelder & Horvath (2008): the legend states r^2 what they mean is r2. I guess they messed up on their LaTeX.

If this is a one of coexpression analysis WGCNA. If this is a big project, graph theory is central to that effort and you're looking towards developing a data science tool set then its igraph. There are other graph theory packages BTW.


In case my answer wasn't clear igraph will do weighted edges via is_weight. The information is here, basically it will do anything.

If your question is "what does weighting contribute to coexpression analysis", that is a good question. I know graph theory, I dunno the biology of gene expression versus the maths. What WGCNA is doing is statistically is simple if weighting is excluded ... my reasoning is it must be pivotal to its success.


To address the OPs comments.

Statistical power In the pure sense, I was incorrect to use this term because technically 'lack of power' is the inability to reject a hypothesis when it is false. For example, parametric statistics are more powerful than non-parametric statistics for this reason.

What I meant was two things:

  1. In graph theory you can do anything within the "network", what is called a "graph", e.g. find the centre of the graph, minimal distance across the "graph", cyclisation, anything you can think of.

1a. WGCNA is fixed it only does what is described in Langfelder & Horvath (2008). Nothing can be done outside that without rewriting the underlying code and it would be better to use igraph instead if that was the objective in my opinion.

Thus igraph is more "powerful" because it will do a lot more stuff.

  1. My concern of WGCNA is its over-reliance on r2. This is a parametric statistic and may not always be applicable but from my reading of the paper (albeit briefly) it was entirely dependent on that. To centre everything on r2, personally I would at a minimum use r in addition (Spearman's correlation). This is extremely complex data and there is a risk of over-simplification. r and r2 can certainly give different results.

The answer to the question however it is not what I think but everyone else thinks and Langfelder & Horvath (2008) has almost 10000 citations. I am not aware that the calculation has been overturned, e.g. DSeq2 has been overturned and demonstrated to be inappropriate. So I would assume it must be capturing the overall picture, so the positives outweigh potential negatives.

$\endgroup$
2
  • 1
    $\begingroup$ thanks @M__ for your insights into both packages, it has been very useful and it has been explained in a very concise way the objectives, do you know why WGCNA present less statistical power. $\endgroup$ Nov 30, 2022 at 10:19
  • $\begingroup$ @MaríaJosé I've updated updated the post. $\endgroup$
    – M__
    Nov 30, 2022 at 13:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.