# Comparing Relative Abundance according to a metadata category

**URL:** https://forum.qiime2.org/t/comparing-relative-abundance-according-to-a-metadata-category/1647
**Category:** User Support
**Tags:** taxa, ancom
**Created:** [October 27, 2017, 9:51pm UTC](https://forum.qiime2.org/t/comparing-relative-abundance-according-to-a-metadata-category/1647 "2017-10-27T21:51:16Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![fstudart](https://forum.qiime2.org/user_avatar/forum.qiime2.org/fstudart/32/6430_2.png) [@fstudart](https://forum.qiime2.org/u/fstudart)
#### Post date: [October 27, 2017, 9:51pm UTC](https://forum.qiime2.org/t/comparing-relative-abundance-according-to-a-metadata-category/1647/1 "2017-10-27T21:51:16Z")

</div>

Hi Everyone,

Just wondering if there is a way of comparing the relative abundance of a specific genus (e.g. Haemophilus) according to a metadata category (e.g. Survivors vs. Non-survivors)? I'm also interested in creating plots (boxplots) with these kinds of comparisons.

Thanks in advance,  
FS

---

<div class="post-metadata">

### Author: ![Nicholas\_Bokulich](https://forum.qiime2.org/user_avatar/forum.qiime2.org/nicholas_bokulich/32/19937_2.png) [@Nicholas\_Bokulich](https://forum.qiime2.org/u/Nicholas_Bokulich)
#### Post date: [October 31, 2017, 12:11am UTC](https://forum.qiime2.org/t/comparing-relative-abundance-according-to-a-metadata-category/1647/3 "2017-10-31T00:11:21Z")

</div>

Hi @fstudart,

> [@fstudart](#):
>
> Just wondering if there is a way of comparing the relative abundance of a specific genus (e.g. Haemophilus) according to a metadata category

Yes! After you [`collapse`](https://docs.qiime2.org/2017.10/plugins/available/taxa/collapse/) your feature table to the taxonomic level of interest, you can input the resulting feature table to [`ANCOM`](https://docs.qiime2.org/2017.10/tutorials/moving-pictures/#differential-abundance-testing-with-ancom) to test for taxa that are differentially abundant between groups (e.g., survivor/non-survivor). There are no QIIME2 actions that allow you to test a single taxon at a single time point.

There are a bunch of forum posts discussing interpretation and troubleshooting of ANCOM if you run into trouble with ANCOM during your analysis or have trouble interpreting the output, e.g., [here](https://forum.qiime2.org/t/interpreting-values-from-an-ancom-percentile-abundance-table/1497).

> [@fstudart](#):
>
> I’m also interested in creating plots (boxplots) with these kinds of comparisons.

QIIME2 has no such action for a single taxon at a single time point. However, ANCOM outputs median/quartile abundance data for each group, which can be used to easily generate plots in R, Excel, or whatever external program you favor.

I hope that helps!

---

<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: [December 1, 2017, 6:11am UTC](https://forum.qiime2.org/t/comparing-relative-abundance-according-to-a-metadata-category/1647/5 "2017-12-01T06:11:34Z")

</div>

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