meringlab / FlashWeave.jl

Inference of microbial interaction networks from large-scale heterogeneous abundance data
Other
70 stars 8 forks source link

Interpretation of high amount of edges where weight = 0 #8

Closed morten-hoppe closed 4 years ago

morten-hoppe commented 4 years ago

Hello,

When generating a network with homogenous and sensitive FlashWeave, the majority of edges have a weight of zero. I am having trouble interpreting this result, as I would think a weight of zero means there should not have been created an edge in the first place. Am I misunderstanding the result? Or can it be due to insufficiencies in the dataset? When generating the network I get several cases of the following error:

Postprocessing.. ┌ Warning: Opposite signs for edge 828 <-> 1178 detected. Arbitarily choosing one

which possibly indicates the dataset is not analyzed properly, but I am unable to figure out the exact problem.

I apologize if this is trivial, I can provide more info if needed. Thanks in advance!

jtackm commented 4 years ago

Thanks a lot for the feedback, this is definitely a bug. I was able to reproduce small numbers of such zeros in my datasets and tracked down the issue. Could you try

]add FlashWeave#master

to get the latest patch and let me know if things work now? I would then make a new release for this and other recent changes.

I still find it curious that you see so many of these zeros since I only detected them for variable pairs with unusually high association strengths (so strong, in fact, that all other variables were excluded and the bug was triggered). As variables get more similar - and statistically harder to distinguish - results from conditional independence tests can become more difficult to interpret. I found it useful in such situations to pre-cluster variables using a strict cutoff and then treat highly similar groups (e.g. obligate symbionts) as single ecological units - just a thing to keep in mind should you run into further issues.