Phyloseq Unifrac Warning

I have a plyloseq object to which i added phylogenetic tree by importing tree using ape library.Tree is in .nwk format.After merging,i pruned some samples that were not required & tried to plot ordination using unifrac distance.However i have got this warning.
Warning message:
In matrix(tree$edge[order(tree$edge[, 1]), ][, 2], byrow = TRUE, :
data length [9005] is not a sub-multiple or multiple of the number of rows [4503]

Should i proceed further with the ordination values or this warning will affect my result?I am not able to resolve the issue.
Kindly help

Hello @Tahseen_Abbas,

After merging,i pruned some samples that were not required & tried to plot ordination using unifrac distance.

Can you post the code you used to do this? It looks like there is a mismatch between the number of features / OTUs / tips in your tree and your OTU table, which could be caused by sample pruning.

Colin
P.S. Here’s more information about the matrix error:
https://thomasleeper.com/Rcourse/Tutorials/matrices.html

1 Like