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/
579 stars 188 forks source link

Different p-values permanova using phyloseq? #1078

Open Stabilo12 opened 5 years ago

Stabilo12 commented 5 years ago

Hi,

I don't understand why I got a different result (p-value) when I use phyloseq to calculate a distance matrix? I hope somebody can explain it to me..

metadata <- as(sample_data(ps), "data.frame") dist.bc <- phyloseq::distance(ps, method = "bray") permanova <- adonis(dist.bc ~ Group, data = metadata, perm=9999) Pr(>F) = 0.0415 *

pseq <- microbiome::transform(ps, "compositional") meta <- meta(pseq) otu <- abundances(pseq) permanova <- adonis(t(otu) ~ Group, data = meta, permutations=9999, method = "bray") Pr(>F) =0.185

mikemc commented 5 years ago

Did you similarly transform the abundances of ps to proportions before using phyloseq::distance, and just forgot to show it here? If not, that would probably explain it.

Stabilo12 commented 5 years ago

Thanks! That did expain it!