# Deicode RPCA biplot - Are the vectors distorting the plot?

**URL:** <https://forum.qiime2.org/t/deicode-rpca-biplot-are-the-vectors-distorting-the-plot/9497>\
**Category:** Library Support\
**Created:** [May 2, 2019, 9:58pm UTC](https://forum.qiime2.org/t/deicode-rpca-biplot-are-the-vectors-distorting-the-plot/9497 "2019-05-02T21:58:17Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![yakshi.ortiz](https://forum.qiime2.org/user_avatar/forum.qiime2.org/yakshi.ortiz/32/4170_2.png) [@yakshi.ortiz](https://forum.qiime2.org/u/yakshi.ortiz)\
**Post date:** [May 2, 2019, 9:58pm UTC](https://forum.qiime2.org/t/deicode-rpca-biplot-are-the-vectors-distorting-the-plot/9497/1 "2019-05-02T21:58:17Z")

</div>

Hi,

I am using DEICODE on my 16S samples and I believe something weird is happening, as you can see in this plot - [aitch-biplot-rarefied.qzv](https://cdck-file-uploads-global.s3.dualstack.us-west-2.amazonaws.com/flex002/uploads/qiime21/original/2X/8/803a074a1fa005e5fd6d9dfe1b83a99ef0f031c6.qzv) (1.7 MB). It seems that the vectors are somehow influencing the first axis of the PCOA and the variation I used to see is shifted to the second and third axes.

 ![emperor](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/2X/5/5079662dedeb3815ccac7f6a59ea380761a3db9d.jpeg)

I re-did the PCOA biplot following the instructions in this other [qiime2 post](https://forum.qiime2.org/t/how-to-use-pcoa-biplot/7953), and this was my resulting biplot- [emperor-vis-biplot-pcoa-aitch.qzv](https://cdck-file-uploads-global.s3.dualstack.us-west-2.amazonaws.com/flex002/uploads/qiime21/original/2X/0/0d5882c6473444618a27ecbdea31b7516b537105.qzv) (1.7 MB). For this last plot, I used aitchison as the metric for the qiime diversity beta step (to produce the distance matrix).

 ![emperor-2](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/2X/8/80959bdb7383c01e98a058c8de9ca987d7b008ef.jpeg)

That being said, I have three questions:

1. Why are the vectors of the DEICODE biplot interfering with the results of the ordination?
2. What exactly is the aitchison metric doing when I select it through the qiime diversity beta method? I don't really know what where to look for that info- as well as for the rest of the metrics [here](https://docs.qiime2.org/2019.1/plugins/available/diversity/beta/).
3. Are the plots generated from the two approaches supposed to be similar? Or should I expect some differences on the resulting ordinations?

Yakshi

---

<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:** [May 2, 2019, 10:14pm UTC](https://forum.qiime2.org/t/deicode-rpca-biplot-are-the-vectors-distorting-the-plot/9497/2 "2019-05-02T22:14:45Z")

</div>

1. I'm not exactly sure what you mean that this ...
2. The Aitchison metric is computed using pseudocounts (since you can't take logs of zeros). This is expected to give you an arbitrarily bad bias. DEICODE has a more robust way to deal with missing values, so we recommend to use that one instead.
3. No.

---

<div class="post-metadata">

**Author:** ![yakshi.ortiz](https://forum.qiime2.org/user_avatar/forum.qiime2.org/yakshi.ortiz/32/4170_2.png) [@yakshi.ortiz](https://forum.qiime2.org/u/yakshi.ortiz)\
**Post date:** [May 2, 2019, 10:34pm UTC](https://forum.qiime2.org/t/deicode-rpca-biplot-are-the-vectors-distorting-the-plot/9497/3 "2019-05-02T22:34:28Z")

</div>

Hi @mortonjt,

Thanks for your quick reply.

Regarding the first question, what I mean is that all the vectors are going in the same direction, and as a result, my samples are clumped on the left side of the plot. This is not seen on the plot that I produced with the other method, or any other ordination that I have produced before. I just want to know if perhaps this plot is supposed to look that way, or if my data have problems.

 ![emperor](https://forum-qiime2-org.s3.dualstack.us-west-2.amazonaws.com/original/2X/5/5079662dedeb3815ccac7f6a59ea380761a3db9d.jpeg)

As for the second question, thanks for clarifying that. I know what decoide is supposed to be doing, but I didn't have enough information to understand what the aitchison metric implemented in the _qiime diversity beta method_ is supposed to be doing. Again, if anyone knows a source where the metrics implemented in _qiime diversity beta_ are explained, then we could do a more informed selection of the metrics. Anyhow, do you know if the aitchison metric does a ilr or a clr transformation? I just want to compare both methods, although I am more inclined to use deicode.

Thanks,

Yakshi

---

<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:** [May 2, 2019, 10:50pm UTC](https://forum.qiime2.org/t/deicode-rpca-biplot-are-the-vectors-distorting-the-plot/9497/4 "2019-05-02T22:50:47Z")

</div>

> [@yakshi.ortiz](#):
>
> Regarding the first question, what I mean is that all the vectors are going in the same direction, and as a result, my samples are clumped on the left side of the plot. This is not seen on the plot that I produced with the other method, or any other ordination that I have produced before. I just want to know if perhaps this plot is supposed to look that way, or if my data have problems.

That I'm not sure about - that probably has to do properly centering the data. There may just be bias issues. @yoshiki may have more insights on this.

> [@](#):
>
> As for the second question, thanks for clarifying that. I know what decoide is supposed to be doing, but I didn't have enough information to understand what the aitchison metric implemented in the _qiime diversity beta method_ is supposed to be doing. Again, if anyone knows a source where the metrics implemented in _qiime diversity beta_ are explained, then we could do a more informed selection of the metrics. Anyhow, do you know if the aitchison metric does a ilr or a clr transformation? I just want to compare both methods, although I am more inclined to use deicode.

It doesn't matter -- the Euclidean distance between ilr / clr are equivalent (which is also known as the Aitchison distance). More can be found in Chapter 3 and 4 in the Modelling and Analysis of Compositional Data textbook (link [here](https://onlinelibrary.wiley.com/doi/book/10.1002/9781119003144)).

---

<div class="post-metadata">

**Author:** ![Mehrbod\_Estaki](https://forum.qiime2.org/user_avatar/forum.qiime2.org/mehrbod_estaki/32/4001_2.png) [@Mehrbod\_Estaki](https://forum.qiime2.org/u/Mehrbod_Estaki)\
**Post date:** [May 3, 2019, 12:06am UTC](https://forum.qiime2.org/t/deicode-rpca-biplot-are-the-vectors-distorting-the-plot/9497/5 "2019-05-03T00:06:12Z")

</div>

Hi @yakshi.ortiz,

> [@yakshi.ortiz](#):
>
> Again, if anyone knows a source where the metrics implemented in _qiime diversity beta_ are explained

You can find a brief summary of sorts [here](https://forum.qiime2.org/t/alpha-and-beta-diversity-explanations-and-commands/2282). To read a more detailed explanation of each you'll have to research those on your own however as those concepts go deep into ecology and are a bit beyond the scope of a bioinformatics-focused environment.

---

<div class="post-metadata">

**Author:** ![yakshi.ortiz](https://forum.qiime2.org/user_avatar/forum.qiime2.org/yakshi.ortiz/32/4170_2.png) [@yakshi.ortiz](https://forum.qiime2.org/u/yakshi.ortiz)\
**Post date:** [May 3, 2019, 3:36pm UTC](https://forum.qiime2.org/t/deicode-rpca-biplot-are-the-vectors-distorting-the-plot/9497/6 "2019-05-03T15:36:59Z")

</div>

Hi @Mehrbod_Estaki,

Thank you a lot for the link. That works perfectly!

Yakshi

---

<div class="post-metadata">

**Author:** ![yoshiki](https://forum.qiime2.org/user_avatar/forum.qiime2.org/yoshiki/32/16_2.png) [@yoshiki](https://forum.qiime2.org/u/yoshiki)\
**Post date:** [May 3, 2019, 4:49pm UTC](https://forum.qiime2.org/t/deicode-rpca-biplot-are-the-vectors-distorting-the-plot/9497/7 "2019-05-03T16:49:21Z")

</div>

> [@mortonjt](#):
>
> > Regarding the first question, what I mean is that all the vectors are going in the same direction, and as a result, my samples are clumped on the left side of the plot. This is not seen on the plot that I produced with the other method, or any other ordination that I have produced before. I just want to know if perhaps this plot is supposed to look that way, or if my data have problems.
> 
> That I’m not sure about - that probably has to do properly centering the data. There may just be bias issues. @yoshiki may have more insights on this.

I don't believe this has to do with the centering. But I can double-check this, if you can send me the artifact you used to create that plot.

---

<div class="post-metadata">

**Author:** ![prayle1](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/p/dfb087/32.png) [@prayle1](https://forum.qiime2.org/u/prayle1)\
**Post date:** [May 3, 2019, 6:41pm UTC](https://forum.qiime2.org/t/deicode-rpca-biplot-are-the-vectors-distorting-the-plot/9497/8 "2019-05-03T18:41:35Z")

</div>

If you're in need a more in depth look at various ecological metrics, I would recommend the book Measuring Biological Diversity (Magurran 2004). It's not perfect, but it does discuss most of the options currently available in QIIME 2 and their pros and cons on different types of data. I've found it incredibly helpful.

---

<div class="post-metadata">

**Author:** ![yakshi.ortiz](https://forum.qiime2.org/user_avatar/forum.qiime2.org/yakshi.ortiz/32/4170_2.png) [@yakshi.ortiz](https://forum.qiime2.org/u/yakshi.ortiz)\
**Post date:** [May 3, 2019, 8:32pm UTC](https://forum.qiime2.org/t/deicode-rpca-biplot-are-the-vectors-distorting-the-plot/9497/9 "2019-05-03T20:32:52Z")

</div>

@yoshiki, thanks for offering to help. I just sent you a message with the artifact.

@prayle1, thank you too for the suggestion. I will definitely look into that.

---

<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:** [May 6, 2019, 6:24pm UTC](https://forum.qiime2.org/t/deicode-rpca-biplot-are-the-vectors-distorting-the-plot/9497/13 "2019-05-06T18:24:35Z")

</div>

@yakshi.ortiz, see the post here: [QIIME 2 2019.4 is now available! - #11 by Nicholas\_Bokulich](https://forum.qiime2.org/t/qiime-2-2019-4-is-now-available/9513/11)

It is likely that the beta diversity results posted here are wrong due to a bug

---

<div class="post-metadata">

**Author:** ![yakshi.ortiz](https://forum.qiime2.org/user_avatar/forum.qiime2.org/yakshi.ortiz/32/4170_2.png) [@yakshi.ortiz](https://forum.qiime2.org/u/yakshi.ortiz)\
**Post date:** [May 7, 2019, 2:44pm UTC](https://forum.qiime2.org/t/deicode-rpca-biplot-are-the-vectors-distorting-the-plot/9497/14 "2019-05-07T14:44:56Z")

</div>

@mortonjt, Thanks for letting me know about the update/bug. I will try with the newest version of QIIME 2 and keep you posted.

---

<div class="post-metadata">

**Author:** ![cmartino](https://forum.qiime2.org/user_avatar/forum.qiime2.org/cmartino/32/3700_2.png) [@cmartino](https://forum.qiime2.org/u/cmartino)\
**Post date:** [July 8, 2019, 2:36pm UTC](https://forum.qiime2.org/t/deicode-rpca-biplot-are-the-vectors-distorting-the-plot/9497/15 "2019-07-08T14:36:41Z")

</div>

Hi @yakshi.ortiz,

I think this may have been a centering issue with the biplot that was recently fixed in DEICODE v0.2.3. Could you try again after updating to the newest version? I think your problem should be fixed.
