# Statistical methods using ANCOM

**URL:** <https://forum.qiime2.org/t/statistical-methods-using-ancom/870>\
**Category:** User Support\
**Tags:** gneiss, ancom\
**Created:** [July 21, 2017, 8:52pm UTC](https://forum.qiime2.org/t/statistical-methods-using-ancom/870 "2017-07-21T20:52:23Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![saatkinson](https://forum.qiime2.org/user_avatar/forum.qiime2.org/saatkinson/32/6074_2.png) [@saatkinson](https://forum.qiime2.org/u/saatkinson)\
**Post date:** [July 21, 2017, 8:52pm UTC](https://forum.qiime2.org/t/statistical-methods-using-ancom/870/1 "2017-07-21T20:52:23Z")

</div>

Hello,

I'm trying to run the differential abundance script on my data and have run into some issues. I am trying to use one of the statistical methods other than f\_oneway and I receive errors for the others:

mannwhitneyu: Plugin error from composition:  
alternative should be None, 'less', 'greater' or 'two-sided'

wilcoxon: Plugin error from composition:  
Zero method should be either 'wilcox' or 'pratt' or 'zsplit'

kruskal: Plugin error from composition:  
All numbers are identical in kruskal

I'm unsure how to fix the parameters (alternative and Zero method) and I looked at the frequency table and all the numbers are not identical, so I'm unsure why kruskal is having problems. I did notice that there is a cmd-config option in the help of the script. Is this file similar to the parameters file from QIIME 1? If so, could I get an example file to base mine off of?

Thanks,  
Samantha

---

<div class="post-metadata">

**Author:** ![thermokarst](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@thermokarst](https://forum.qiime2.org/u/thermokarst)\
**Post date:** [July 24, 2017, 8:17pm UTC](https://forum.qiime2.org/t/statistical-methods-using-ancom/870/2 "2017-07-24T20:17:58Z")

</div>

Hi @saatkinson, can you please provide an example of how you are attempting to run this step? Copy-and paste from your terminal is fine. Also, please note we are planning on releasing QIIME 2 2017.7 this week, which drops `q2-composition`, in favor of `q2-gneiss`, which uses the [`gneiss`](https://github.com/biocore/gneiss) software package. Thanks!

---

<div class="post-metadata">

**Author:** ![saatkinson](https://forum.qiime2.org/user_avatar/forum.qiime2.org/saatkinson/32/6074_2.png) [@saatkinson](https://forum.qiime2.org/u/saatkinson)\
**Post date:** [July 24, 2017, 8:25pm UTC](https://forum.qiime2.org/t/statistical-methods-using-ancom/870/3 "2017-07-24T20:25:56Z")

</div>

Hi @thermokarst, here is an example for the kruskal and wilcoxon:

```bash
qiime composition ancom \
  --i-table proj_1/comp-table.qza \
  --m-metadata-file valery_mapping.txt \
  --m-metadata-category Description \
  --p-statistical-test kruskal \
  --o-visualization proj_1/ancom-kruskal-treat_day.qzv

```

```bash
qiime composition ancom \
  --i-table proj_1/comp-table.qza \
  --m-metadata-file valery_mapping.txt \
  --m-metadata-category Description \
  --p-statistical-test wilcoxon \
  --o-visualization proj_1/ancom-wilcoxon-treat_day.qzv 

```

I'll look forward to the new method of analyzing differential abundances!

Thanks,  
Samantha

---

<div class="post-metadata">

**Author:** ![thermokarst](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@thermokarst](https://forum.qiime2.org/u/thermokarst)\
**Post date:** [July 25, 2017, 5:50pm UTC](https://forum.qiime2.org/t/statistical-methods-using-ancom/870/5 "2017-07-25T17:50:00Z")

</div>

Hi @saatkinson! It looks like you identified some bugs here (it appears that some of the non-default stats aren't wired up correctly in `q2-composition`, I was able to independently reproduce your reported errors). At this point we aren't going to worry about fixing this, because as I mentioned earlier, QIIME 2 2017.7 will drop `q2-composition` in favor of `q2-gneiss`. Thank you so much for reporting this, I am sorry the outcome isn't more satisfying, but we are really excited about `q2-gneiss`!

---

<div class="post-metadata">

**Author:** ![jairideout](https://forum.qiime2.org/user_avatar/forum.qiime2.org/jairideout/32/9_2.png) [@jairideout](https://forum.qiime2.org/u/jairideout)\
**Post date:** [July 25, 2017, 10:03pm UTC](https://forum.qiime2.org/t/statistical-methods-using-ancom/870/7 "2017-07-25T22:03:26Z")

</div>

QIIME 2 2017.7 is now live and includes the changes @thermokarst mentioned above 🎉

---

<div class="post-metadata">

**Author:** ![vrbana](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/v/977dab/32.png) [@vrbana](https://forum.qiime2.org/u/vrbana)\
**Post date:** [July 25, 2017, 10:35pm UTC](https://forum.qiime2.org/t/statistical-methods-using-ancom/870/8 "2017-07-25T22:35:36Z")

</div>

Will ANCOM still be available in q2-gneiss? I don't see it in the documentation

---

<div class="post-metadata">

**Author:** ![jairideout](https://forum.qiime2.org/user_avatar/forum.qiime2.org/jairideout/32/9_2.png) [@jairideout](https://forum.qiime2.org/u/jairideout)\
**Post date:** [July 25, 2017, 10:40pm UTC](https://forum.qiime2.org/t/statistical-methods-using-ancom/870/9 "2017-07-25T22:40:31Z")

</div>

ANCOM isn't included in q2-gneiss; q2-gneiss provides its own methods for differential abundance analysis. There will be a q2-gneiss tutorial posted on the forum soon, and the tutorial will be integrated into the QIIME 2 docs during the next release cycle. Stay tuned!

---

<div class="post-metadata">

**Author:** ![vrbana](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/v/977dab/32.png) [@vrbana](https://forum.qiime2.org/u/vrbana)\
**Post date:** [July 26, 2017, 12:07am UTC](https://forum.qiime2.org/t/statistical-methods-using-ancom/870/10 "2017-07-26T00:07:47Z")

</div>

So ANCOM will not be implemented in qiime 2 then? Any plans for other differential abundance methods?

---

<div class="post-metadata">

**Author:** ![thermokarst](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@thermokarst](https://forum.qiime2.org/u/thermokarst)\
**Post date:** [July 26, 2017, 12:22am UTC](https://forum.qiime2.org/t/statistical-methods-using-ancom/870/11 "2017-07-26T00:22:10Z")

</div>

Hi @vrbana: at this time we aren't planning on continuing to support ANCOM in the officially distributed plugins. Pinging @mortonjt to comment on the benefits of utilizing the differential abundance methods available in the new [`q2-gneiss`](https://docs.qiime2.org/2017.7/plugins/available/gneiss/) plugin. I also recommend looking at the [`gneiss` docs](https://biocore.github.io/gneiss/), to learn more about the differential abundance methods implemented there (`q2-gneiss` is a wrapper plugin around `gneiss`). Please let us know if you have any questions!

Since QIIME 2 is decentralized, a [plugin developer](https://docs.qiime2.org/2017.7/plugins/developing/) that is interested in developing their own plugin that implements ANCOM is a real possibility --- this is actually one of the main reasons that QIIME 2 is decentralized! We have left the deprecated plugin [code up and available](https://github.com/qiime2-graveyard/q2-composition) if anyone is interested in forking it. Thanks!

---

<div class="post-metadata">

**Author:** ![vrbana](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/v/977dab/32.png) [@vrbana](https://forum.qiime2.org/u/vrbana)\
**Post date:** [July 26, 2017, 3:45am UTC](https://forum.qiime2.org/t/statistical-methods-using-ancom/870/12 "2017-07-26T03:45:59Z")

</div>

No worries, I actually work with Jaime and have heard about the benefits of balances 🙂 I was just curious as they have a bit of a learning curve for interpretation

---

<div class="post-metadata">

**Author:** ![mortonjt](https://forum.qiime2.org/user_avatar/forum.qiime2.org/mortonjt/32/3488_2.png) [@mortonjt](https://forum.qiime2.org/u/mortonjt)\
**Post date:** [July 27, 2017, 4:46pm UTC](https://forum.qiime2.org/t/statistical-methods-using-ancom/870/13 "2017-07-27T16:46:27Z")

</div>

Concerning the benefits of using balances, I'd take a look at the original paper: [http://msystems.asm.org/content/2/1/e00162-16](http://msystems.asm.org/content/2/1/e00162-16)

There are multiple benefits -- namely

1. It doesn't make the assumption that few species are changing
2. Standard statistics can be applied directly to balances, since balances can follow proper normality assumptions
3. It can counter issues with both sparsity and compositionality by averaging together groups of features

We already have put together a number of tutorials here  
[https://biocore.github.io/gneiss/docs/v0.4.0/index.html](https://biocore.github.io/gneiss/docs/v0.4.0/index.html)

And there will be another tutorial that posted on the qiime2 forums shortly.

---

<div class="post-metadata">

**Author:** ![system](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/3X/2/1/21af5fe23cb6f4579467c66a9ed94e55274ca7bd.svg) [@system](https://forum.qiime2.org/u/system)\
**Post date:** [August 27, 2017, 10:46pm UTC](https://forum.qiime2.org/t/statistical-methods-using-ancom/870/14 "2017-08-27T22:46:27Z")

</div>

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.

---

<div class="post-metadata">

**Author:** ![jairideout](https://forum.qiime2.org/user_avatar/forum.qiime2.org/jairideout/32/9_2.png) [@jairideout](https://forum.qiime2.org/u/jairideout)\
**Post date:** [August 30, 2017, 8:55pm UTC](https://forum.qiime2.org/t/statistical-methods-using-ancom/870/15 "2017-08-30T20:55:21Z")

</div>

The QIIME 2 2017.8 release is live and includes an [updated ANCOM tutorial](https://docs.qiime2.org/2017.8/tutorials/moving-pictures/#differential-abundance-testing-with-ancom) and a new [q2-gneiss tutorial](https://docs.qiime2.org/2017.8/tutorials/gneiss/)! 🎉

---

<div class="post-metadata">

**Author:** ![thermokarst](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@thermokarst](https://forum.qiime2.org/u/thermokarst)\
**Post date:** [August 30, 2017, 9:17pm UTC](https://forum.qiime2.org/t/statistical-methods-using-ancom/870/16 "2017-08-30T21:17:18Z")

</div>

> [@saatkinson](#):
>
> mannwhitneyu: Plugin error from composition:
> 
> alternative should be None, ‘less’, ‘greater’ or ‘two-sided’
> 
> wilcoxon: Plugin error from composition:
> 
> Zero method should be either ‘wilcox’ or ‘pratt’ or ‘zsplit’
> 
> kruskal: Plugin error from composition:
> 
> All numbers are identical in kruskal

Just following up on the initial problem here, we have filed a [bug report](https://github.com/qiime2/q2-composition/issues/44) to track development here. Thanks!

---

<div class="post-metadata">

**Author:** ![jairideout](https://forum.qiime2.org/user_avatar/forum.qiime2.org/jairideout/32/9_2.png) [@jairideout](https://forum.qiime2.org/u/jairideout)\
**Post date:** [November 29, 2017, 7:53pm UTC](https://forum.qiime2.org/t/statistical-methods-using-ancom/870/17 "2017-11-29T19:53:27Z")

</div>

As of the QIIME 2 2017.9 release the original issue referenced by @thermokarst has been resolved! 🎉
