stefpeschel / NetCoMi

Network construction, analysis, and comparison for microbial compositional data
GNU General Public License v3.0
141 stars 24 forks source link

Understanding netConstruct() output #123

Open wfgui opened 1 month ago

wfgui commented 1 month ago

Hi Stefanie, Quick questions about output netConstruct(). I used the example from the tutorial and got a data frame:

net_pears <- netConstruct(amgut2.filt.phy,  
                          measure = "pearson",
                          normMethod = "clr",
                          zeroMethod = "multRepl",
                          sparsMethod = "threshold",
                          thresh = 0.3,
                          verbose = 3)
> head(net_pears$edgelist1)
      v1     v2       asso      diss      adja
1 326792 305760 -0.3452608 0.8201405 0.1798595
2 326792 191547  0.3026941 0.5904684 0.4095316
3 326792 119010 -0.3913381 0.8340678 0.1659322
4 326792   9715 -0.3347796 0.8169393 0.1830607
5 326792 188236  0.4154089 0.5406437 0.4593563
6 326792 302025 -0.4061556 0.8384973 0.1615027

What do the names of the last three columns(asso、diss、adja) mean? And I have a problem about how we know the consequence network is reliable? Can we get a result similiarly p-value?

Thank you!

stefpeschel commented 1 month ago

Hi! I highly recommend reading the NetCoMi paper for an understanding of what steps the functions do. Then it would be clear what the vectors mean. As written in the help page of netConstruct(), the columns mean the following:

The reliability of an edge is difficult to assess. There are different sparsification methods with different approaches to "decide" which edges should occur in the network and which not. You could set the "sparsMethod" argument to "t-test" to perform a Student's t-test for each edge so that an edge only remains in the network if the corresponding correlation is significantly different from zero. Other package like SpiecEasi and SPRING perform a stability-based approach for sparsification. So, there is no general answer to your question.