qiime2 / q2-composition

BSD 3-Clause "New" or "Revised" License
5 stars 28 forks source link

Upgrade to ANCOM-BC #76

Closed jwdebelius closed 2 years ago

jwdebelius commented 3 years ago

Improvement Description I think rather than upgrading from ANCOM, it might make sense to upgrade to ANCOM-BC, although I'm open to both. Having been through the ANCOM-BC paper once, I think it will be the next big method and its worth figuring out how to integrate it in qiime2.

Current Behavior Currently, qiime2 uses the scikit-bio implementation of ANCOM I with a pseudocount of 1

Proposed Behavior An Implementation of ANCOM-BC separating out the zero substitution step and introducing the statistical test. I'd love to see the test separated from visualization and/or the ability to extract the full results table programatically. (Actually, this is a behavior I'd like to see on a lot of the visualizers).

References This is semi an update/response to #48. I think @mortonjt mentioned at one point that he was interested if he could figure out the table transformation, but I'm happy to collaborate on it

ebolyen commented 3 years ago

I have some great news then, @mortonjt is already on the case! https://github.com/mortonjt/q2-ancombc

mortonjt commented 3 years ago

We have the ANCOM-BC plugin already sketched out here : https://github.com/mortonjt/q2-ancombc So feel free to check it out - it runs, but the documentation needs some work (support with that would be very helpful).

There are a couple of notable differences between ANCOM and ANCOM-BC, namely ANCOM-BC does return log-fold changes whereas ANCOM doesn't. In the q2-ANCOMBC plugin, the method returns a differential type. Ideally, we would have the volcano plots that would be decoupled that can also accept a differential type as input (that way ANCOM-BC would be also compatible with qurro).

jwdebelius commented 3 years ago

Should this issue be closed then? Sorry

I'd love to see ANCOM decoupled, which is pretty simple here... although I think the other question for users is where differential plots should go. Personally, from where I sit in the user/developer continuum, I'd rather they be in a plugin that gets installed automatically, mostly because remembering and managing plugin installation can be a challenge if installations are shared across systems or there are weird update issues?

mortonjt commented 3 years ago

Thoughts @ebolyen @thermokarst ? I'm not opposed to ANCOM-BC being in the core distribution, but also note that this is still a rapidly developing ecosystem. One possibility is to aggregate multiple statistical tools (i.e. qurro, deicode, CTF, mmvec ...) into a single environment.yml and sync their dependencies with qiime2.

jwdebelius commented 3 years ago

If that happens, can we (you) also re-do the gneiss tutorial for songbird or some alternative? I went to run Gneiss for reasonsTM (mostly because I'm trying to teach ILR and I have a dataset where ILR makes potential sense) and there's not much left in that plugin that's useful. ...Although I guess that means a major refactor of songbird for python 3.8 and pandas 1 which is another issue 🙂

mortonjt commented 3 years ago

Yes, that is also on the way. See https://github.com/knightlab-analyses/empress-analyses/pull/16

On Mon, Apr 19, 2021 at 9:26 AM Justine Debelius @.***> wrote:

If that happens, can we (you) also re-do the gneiss tutorial for songbird or some alternative? I went to run Gneiss for reasonsTM (mostly because I'm trying to teach ILR and I have a dataset where ILR makes potential sense) and there's not much left in that plugin that's useful. ...Although I guess that means a major refactor of songbird for python 3.8 and pandas 1 which is another issue 🙂

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/qiime2/q2-composition/issues/76#issuecomment-822603804, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA75VXMXZR53UJHL2SCIMALTJRKTVANCNFSM43BZNGSA .

lizgehret commented 2 years ago

Hey @jwdebelius and @mortonjt ! I am currently working on an ANCOM-BC wrapper for Huang's R package, which you can view progress on in this branch, and this working PR.

I'm anticipating that this should be completed and ready for the November 2022 release, so I'm going to close out your PR @jwdebelius and you are both welcome to follow progress on this at the above locations. Let me know if you have any questions! 🙂