Is the asv beta diversity plot on Emperor the same as if I made a PCoA plot myself?

Using emperor, I have the output as below for unweighted unifrac.


But when i manually use the unweighted unifrac distances and run a PCOA, i do not get the same plot.

should they be equivalent?

Edit: I think i figured out why. In QIIME2 Emperor, I can subset the PCOA plot. So i have all 100 samples, but i can subset by body site to only look at a subet. In R, I was filtering the distance matrix first to the subset AND THEN running the PCOA afterward on the filtered distance matrix.

If I run the PCOA on the full distance matrix, and then filter the PCOA results afterward to the subset, then it looks the same as on emperor.

Is it not valid to subset the PCOA afterward like on QIIME/Emperor? They are all the same type of sample (Primer, extraction etc), but from different sites.

it is strange because beta diversity was very significant when i did permanova on the subset of distance matrix samples i was interested in. but it does not look so on the PCOA at all.

Hi Kevin,

This makes sense. PCoA is a solution to maximize Eigenvectors. Slight differences will lead to slightly different looking plots. So while we don't expect them to look identical...

... yes, they should be biologically equivalent.

Want to post the other plot so we can compare them? If the other plot only has three points in it, them something went wrong!

1 Like

Thank you so much. I think i figured out what the difference was.

In QIIME2 Emperor, I can subset the PCOA plot. So i have all 100 samples, but i can subset by body site to only look at a subet. In R, I was filtering the distance matrix first to the subset AND THEN running the PCOA afterward on the filtered distance matrix.

If I run the PCOA on the full distance matrix, and then filter the PCOA results afterward to the subset, then it looks the same as on emperor.

Is it not valid to subset the PCOA afterward like on QIIME/Emperor? They are all the same type of sample (Primer, extraction etc), but from different sites.

1 Like

it is strange because beta diversity was very significant when i did permanova on the subset of distance matrix samples i was interested in. but it does not look so on the PCOA at all.

Hi @kkl45, You're correct, it's not valid to subset the PCoA after generating it. That is possible in Emperor for exploratory purposes, but you should always re-compute PCoA with only the samples you want to include in the distance matrix (you can use qiime diversity filter-distance-matrix to help with that).

it is strange because beta diversity was very significant when i did permanova on the subset of distance matrix samples i was interested in. but it does not look so on the PCOA at all.

Because the PCoA is a dimensionality reduction, it is possible to have a significant difference from beta-group-significance that you don't clearly see in your PCoA plot, but it will generally be a fairly weak (small effect size) difference in that case.

3 Likes

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