Is there any reason for differences Weighted Unifrac distances produced in Qiime2 or produced in R (with phyloseq after rarefaction)???

Good afternoon everyone,
I've been analyzing microbiome data in qiime2, but recently, due to the necessity of performing some adjustments to data analyses, I have migrated to R and started to use qiime2R and phyloseq.

Today, due to major differences in the p-values of 2 permanovas performed on weighted_unifrac data ( both non-significant) one preformed in qiime2, and another preformed in phyloseq (with adonis2), I've realized that the two distance matrixes are different...

I've preformed rarefaction in phyloseq prior to distance calculation (with the same sampling depth used in qiime2)
the major difference that I have observed is 1log in the distance values (other variations might be due to rarefaction)... Does anyone have a clue of what might be happening? are the formulas to calculate weighted unifrac distance different between the 2 pipelines???

thank you in davance,
Sara

You wouldn't expect them to be identical, but they should be very close/highly correlated. To diagnose further would require looking at the code you used to generate both.

code in qiime2:
qiime diversity core-metrics-phylogenetic
--i-phylogeny rooted-tree.qza
--i-table table.qza
--p-sampling-depth 4000
--m-metadata-file sample-metadata.tsv
--output-dir core-metrics-results
(the matrix is one of the outputs of this comand)

code in R:
library(qiime2R)
library(phyloseq)
library(vegan)
phy<-qza_to_phyloseq(features="D:/saliva_for_copd/ASV_approach/HOMD/id-filtered-table.qza", metadata="D:/saliva_for_copd/ASV_approach/HOMD/metadata.tsv", taxonomy="D:/saliva_for_copd/ASV_approach/HOMD/taxonomy.qza", tree="D:/saliva_for_copd/ASV_approach/HOMD/rooted-tree.qza", tmp="C:/tmp")
phy_scaled <- rarefy_even_depth(phy,sample.size=4000, replace=FALSE, rngseed = 1)
wU <- phyloseq::distance(phy_scaled, method = "wunifrac")

Hi @smd!

This is a known concern with phyloseq, you can catch up on the discussion over here in this Github Issue:

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