# Which factor level to compare with

**URL:** <https://forum.biobakery.org/t/which-factor-level-to-compare-with/1014>\
**Category:** MaAsLin\
**Created:** [September 13, 2020, 7:14am UTC](https://forum.biobakery.org/t/which-factor-level-to-compare-with/1014 "2020-09-13T07:14:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Qiuyu-dot](https://avatars.discourse-cdn.com/v4/letter/q/73ab20/32.png) [@Qiuyu-dot](https://forum.biobakery.org/u/Qiuyu-dot)\
**Post date:** [September 13, 2020, 7:14am UTC](https://forum.biobakery.org/t/which-factor-level-to-compare-with/1014/1 "2020-09-13T07:14:24Z")

</div>

Hi,

I want to find the associations of taxons with disease status (two status, Non-critical/Critical). And at the same time, I also have healthy controls. I ran MaAsLin, and the result seems to be always compared to Critical status. But i want to compare among these three groups or both compared to Healthy controls? How should i prepare the input?

---

<div class="post-metadata">

**Author:** ![himel.mallick](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/himel.mallick/32/1757_2.png) [@himel.mallick](https://forum.biobakery.org/u/himel.mallick)\
**Post date:** [September 16, 2020, 1:49pm UTC](https://forum.biobakery.org/t/which-factor-level-to-compare-with/1014/2 "2020-09-16T13:49:29Z")

</div>

Hi @Qiuyu-dot - this is something we have recently added. If you install the latest development version from Github ([https://github.com/biobakery/Maaslin2](https://github.com/biobakery/Maaslin2)), you will see that there is an option called `reference` which can be used to specify references for categorical variables.

---

<div class="post-metadata">

**Author:** ![roghaieh\_ashrafi](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/roghaieh_ashrafi/32/960_2.png) [@roghaieh\_ashrafi](https://forum.biobakery.org/u/roghaieh_ashrafi)\
**Post date:** [August 2, 2021, 10:56pm UTC](https://forum.biobakery.org/t/which-factor-level-to-compare-with/1014/3 "2021-08-02T22:56:39Z")

</div>

Hi himel

continuing this question, even after reference level we would not be able to see all pairwise comparisons in one heat map correct?  
For example, If I want to essentially do pairwise comparisons and also learn what taxa in B and C are different from each other, as I understand it, I would re-run the analysis with level B (or C) as the reference. Is this correct? But in this case I need to run 7 times same analysis to get all pairwise comparisons that I need to check! But I would like to see all comparisons in one heat map instead of several? Is this possible with Maaslin2?

Thanks a lot, Rogi

---

<div class="post-metadata">

**Author:** ![himel.mallick](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.biobakery.org/himel.mallick/32/1757_2.png) [@himel.mallick](https://forum.biobakery.org/u/himel.mallick)\
**Post date:** [August 4, 2021, 7:49pm UTC](https://forum.biobakery.org/t/which-factor-level-to-compare-with/1014/4 "2021-08-04T19:49:17Z")

</div>

Hi @roghaieh_ashrafi - as replied in the other [thread](https://forum.biobakery.org/t/pairwise-comparisons/2387), once you get the appropriately adjusted p-values and q-values, you can use an external package like `Complexheatmap` or `pheatmap` to create a heatmap that includes all the individual comparisons in the same figure. Unfortunately, this is currently not possible with the default MaAsLin 2 workflow.
