PCoA are different between qiime2 and physeq r package.

Hi friends in qiime2,

I used qiime2 and R to generate PCoA matrix on the same beta diversity matrix.
PCoA matrix generated from two methods are different.
Has anyone met the same issue before or does anyone have an opinion on it? Thanks.

Way1. The unweighted UniFrac pcoa was generated in qiime2 using codes below.

qiime diversity pcoa \ --i-distance-matrix $diversity_dir/unweighted_unifrac.qza \ --o-pcoa $pcoa_dir/unweighted_unifrac_pcoa.qza
Then unweighted_unifrac_pcoa.qza was loaded into R using codes below
uufp=read_qza('unweighted_unifrac_pcoa.qza')$data$Vectors

Way2. The unweighted UniFrac pcoa was generated in phyloseq r package using codes below.
`physeq<-qza_to_phyloseq(features=“asv_table.qza”,
tree=‘tree.qza’,
taxonomy=‘taxa_assignments.qza’,
metadata =“dat.tsv”)

uufp_phy= ordinate(physeq, “PCoA”, “unifrac”, weighted=FALSE)``

Then I compared the uufp and uufp_phy, these two objects are different.

best,
Yun

Hi @11132,
This is a known issue with phyloseq: https://github.com/joey711/phyloseq/issues/956

See also these QIIME 2 forum topics for relevant discussion and description of testing and validation of the UniFrac implementation used in QIIME 2.


3 Likes

hi @ Nicholas_Bokulich,

Thanks for your reply.
Based on the discussion points, i think i’ll use qiime2-generated matrix, rather than phyloseq r package since it doesn’t check the assumptions.

Best,
Yun

1 Like