PCoA dimensions

Hello,

I'm new to QIIME2. I'm trying to make a PCoA plot in both QIIME2 and R. I have some questions regarding the dimensions of pcoa plots.

Take the Jaccard distance matrix of beta diversity as an example.

In QIIME2, I run qiime diversity core-metrics and got the jaccard_pcoa_results.qza for pcoa results. When I opened this file using R and found that it has PC155, which means QIIME2 generated 155 dimensions. When I viewed the jaccard_emperor.qzv through QIIME2 view, the default number of the axis was 3.

Then I wanted to use jaccard_pcoa_results.qza (the one that has 155 dimensions/axes) and make a PCoA plot that only has two dimensions/axes using ggplot in R. Can I still use jaccard_pcoa_results.qza file to do so as I can just choose to use PC1 and PC2?

Because this looks suspicious to me, I ran these commands in QIIME2 to make sure that my PCoA file only has 2 dimensions:

(qiime2-2023.5) busihan@SihandeMacBook-Pro Rerun_3rd_final % qiime diversity pcoa \
    --i-distance-matrix  core-metrics-results-decontam-genus/jaccard_distance_matrix.qza \
    --p-number-of-dimensions 2 \
    --o-pcoa core-metrics-results-decontam-genus/jaccard_pcoa_2_dimensions.qza

Saved PCoAResults to: core-metrics-results-decontam-genus/jaccard_pcoa_2_dimensions.qza
(qiime2-2023.5) busihan@SihandeMacBook-Pro Rerun_3rd_final % qiime emperor plot --i-pcoa core-metrics-results-decontam-genus/jaccard_pcoa_2_dimensions.qza --m-metadata-file Mapping_File.tsv --o-visualization core-metrics-results-decontam-genus/jaccard_emperor_2_dimensions_plot.qzv

Saved Visualization to: core-metrics-results-decontam-genus/jaccard_emperor_2_dimensions_plot.qzv

It turned out that my jaccard_emperor.qzv (the one that has 155 dimensions in PCoA file) and jaccard_emperor_2_dimensions_plot.qzv(the one that has only 2 dimensions in PCoA file) look very different through QIIME2 view, even though I chose to present only 2 axes in jaccard_emperor.qzv. Could you please explain this to me?

I attached my files here:
jaccard_emperor_2_dimensions_plot.qzv (963.1 KB)
jaccard_emperor.qzv (968.1 KB)
jaccard_pcoa_results.qza (415.4 KB)
jaccard_pcoa_2_dimensions.qza (184.1 KB)

Thank you for your help!!

Hi @Sihan_Bu,

Absolutely! There a lot of dimensions in the PCOA results but qiime diversity core-metrics just chooses 3 dimensions that explain the most variations in the data. It is completely reasonable to use 2 of the dimensions!

I disagree that they looks very different. Although there are likely to be minor differences between the PCOA represented in 2 axis and the PCOA represented in 3 axis. I think your emperors look relevantly similar, it just seems that the cluster is inverted.

When I look at these plots and make the 3 axis PCOA line up so that you can only see Axis 1 and Axis 2. They look almost identical but the cluster is just flipped!



Hope that helps!
:turtle:

1 Like

Thank you so much Chloe!!

1 Like

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