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:
For whatever reason, after merging samples, the new OTU table had group names as rows instead of OTU IDs! So once I transposed the new OTU table the UniFracs work.
I am trying to merge samples as in the tutorial to see what is the group-level response to the explanatory variable.
The command works fine, and I am able to calculate the Bray-Curtis and Jaccard distances but trying to run UniFrac :
rbiom::unifrac(biom=as.matrix(phyloseq::otu_table(ps_merged)), weighted=FALSE, tree=phy_tree(ps_merged))
gives this error:
The command works fine with the unmerged file, and the trees and taxonomy tables are identical.
Is there a fix for this?