Emperor for... dummies?

Hi! I’m having a hard time trying to understand the emperor plots.

So… any documentation suggested to achieve this goal?

Hi!

Great question!

Yeah, the official explanation is pretty technical. Like in this paper...

QIIME calculates the beta diversities between each pairs of input samples, forming a distance matrix. The distance matrix then can be visualized with methods such as Principal Coordinate Analysis (PCoA) (Mardia, Kent, & Bibby, 1979) and hierarchical clustering (Tryon, 1939), both of which have been widely used for data visualization for decades. PCoA transforms the original multidimensional matrix to a new set of orthogonal axes that explain the maximum amount of inertia in the dataset

Yikes! :scream_cat:


Here's how I would say this:

In a PCoA plot, each point is one sample.
If points are close together, then those samples are biologically similar.

Then you might start to see clusters of similar samples in your data set and connect that to a metadata factor like Location or HostSpecies.

Let's say I make this PCoA plot of my 8 samples:

:white_circle::white_circle::white_circle::white_circle::white_circle::white_circle::white_circle:
:white_circle::white_circle::white_circle::white_circle::white_circle::black_circle::white_circle:
:black_circle::black_circle::white_circle::white_circle::white_circle::white_circle::white_circle:
:black_circle::black_circle::white_circle::white_circle::black_circle::white_circle::white_circle:
:white_circle::white_circle::white_circle::white_circle::white_circle::white_circle::black_circle:
:white_circle::black_circle::white_circle::white_circle::white_circle::white_circle::white_circle:
:white_circle::white_circle::white_circle::white_circle::white_circle::white_circle::white_circle:

OK, so those four samples are very, very close! And what does that mean?
:man_shrugging: :woman_shrugging:

I should explain my study design:

SampleID Location HostSpecies
1 :arrow_left: :snail:
2 :arrow_left: :snail:
3 :arrow_left: :bird:
4 :arrow_left: :bird:
5 :arrow_right: :snail:
6 :arrow_right: :snail:
7 :arrow_right: :bird:
8 :arrow_right: :bird:

Let's label samples based on Location (:arrow_left:, :arrow_right:). This way, we can see if Location is changing microbial community structure.

:white_circle::white_circle::white_circle::white_circle::white_circle::white_circle::white_circle:
:white_circle::white_circle::white_circle::white_circle::white_circle::arrow_left::white_circle:
:arrow_left::arrow_right::white_circle::white_circle::white_circle::white_circle::white_circle:
:arrow_left::arrow_left::white_circle::white_circle::arrow_right::white_circle::white_circle:
:white_circle::white_circle::white_circle::white_circle::white_circle::white_circle::arrow_right:
:white_circle::arrow_right::white_circle::white_circle::white_circle::white_circle::white_circle:
:white_circle::white_circle::white_circle::white_circle::white_circle::white_circle::white_circle:

So... that's something. Looks like the top half of our PCoA is :arrow_left:, and the bottom is more :arrow_right:. Cool! Location has an effect on microbial community structure.

Now let's label this same PCoA by HostSpecies:

:white_circle::white_circle::white_circle::white_circle::white_circle::white_circle::white_circle:
:white_circle::white_circle::white_circle::white_circle::white_circle::bird::white_circle:
:snail::snail::white_circle::white_circle::white_circle::white_circle::white_circle:
:snail::snail::white_circle::white_circle::bird::white_circle::white_circle:
:white_circle::white_circle::white_circle::white_circle::white_circle::white_circle::bird:
:white_circle::bird::white_circle::white_circle::white_circle::white_circle::white_circle:
:white_circle::white_circle::white_circle::white_circle::white_circle::white_circle::white_circle:

:smile_cat: :100: :nature-paper:

Remember, PCoA rearranges your samples so that similar samples are close together, and different samples are far apart.

So here, we can make two conclusions:

  1. :bird: and :snail: are different from each other
  2. :snail: are very similar to each other, while each :bird: is different from :bird:

Importantly, PCoA is not looking at my metadata factors when it rearranges my samples, so any clustering we see here is coming only from the microbial community structure itself, as measured by your distance matrices.

So now that we see this relation between microbes and HostSpecies, how do we test it?
:point_right: qiime diversity beta-group-significance or vegan::adonis()


Let's try an example. Take Figure 2 from this paper. Panel C is a PCoA plot:

c, Between-community (beta) diversity among in n = 23,828 biologically independent samples: principal coordinates analysis (PCoA) of unweighted UniFrac distance, PC1 versus PC2 and PC1 versus PC3, coloured by EMPO levels 2 and 3. Clustering of samples could be explained largely by environment.

Does that help?

Colin


P.S. In my example, I have 8 samples, for only two reps per group. This is bad, and I feel bad. PCoA works great for millions of samples, so I should get more than 8!
P.S.S. This article is great: PCa and PCoA explained | Deep thoughts and silliness

10 Likes

Thanks a lot! :100:
I’ll check the papers :smile:

PD: Thanks for the extended explanation, it maked easier to understand the basics of the plots, (Like an “ELI5 from reddit”)

2 Likes

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