joey711 / phyloseq

phyloseq is a set of classes, wrappers, and tools (in R) to make it easier to import, store, and analyze phylogenetic sequencing data; and to reproducibly share that data and analysis with others. See the phyloseq front page:
http://joey711.github.io/phyloseq/
582 stars 187 forks source link

Unifrac distances are all zeros (0) #944

Open mstagliamonte opened 6 years ago

mstagliamonte commented 6 years ago

Dear Phyloseq developers,

Thank you for the great package and documentation! I am moving my first steps in 16S analyses, and successfully gone through a few tutorials. I am now analyzing a "real" dataset, but I am having problems with unifrac distances. I created the deseq biom file using the Qiime python scripts, then imported it and merged with the treefile, taxonomy table and samples metadata into a phyloseq object. I am now trying to perform PCoA on my dataset. When calculating distances with the weighted unifrac, I can create a plot; when using unweighted unifrac though, all distances result to be = 0

myData_unifracDist<- distance(
  physeq = myPhyloSeq, method = "Unifrac")
unique(myData_unifracDist)
[1]  0

Can you please point me in the right direction to check my data and try to understand the issue?

Thank you for your kind attention, Max

cyklee commented 6 years ago

I'm encountering this problem. I'm using ASV data processed with DADA2. Unifrac(ps, weighted=F) generated a matrix that's entirely 0 while Unifrac(ps, weighted=T produced a workable matrix.