This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Generating taxa-wise unifrac distance Matrix using phyloseq

Dear All, I have OTU table obtained from qiime2 analysis and imported into phyloseq. I would like to get the unifrac distance between pair-wise species (not between the samples). in the output, I need distance matrix between the OTUs

      OTU1  OTU2  OTU3  OTU4  OTU5 
OTU1   1   0.023  0.045  0.12   0.034 
OTU2   :    :       :      :      :
OTU3   :    :       :      :      :     
OTU4   :    :       :      :      :           
OTU5   :    :       :      :      :

So I tried as follows:

unifrac_distance<-distance(ps, method="unifrac", type = "taxa")
  

But still I am getting matrix between the samples. How do I achieve OTU-wise unifrac distance matrix?

phyloseq r metagenomics unifrac

I searched found this: UniFrac distance and DPCoA cannot be calculated for taxa-wise distances, because they use a taxa-wise tree as part of their calculation between samples, and there is no transpose-equivalent for this tree.

0 answers

No answers yet.

Log in to answer this question.