Closed melissaszy closed 1 year ago
Most importantly: procrustes
and protest
compare two configurations. It does not handle dissimilarities, but only configurations. Functions stats::cmdscale
and vegan::wcmdscale
can be used to map dissimilarities into configurations. It seems that functions works smoothly with dissimilarities, but the results are meaningless.
About your specific questions:
Thank you so much for your reply, @jarioksa.
I made the following edits to my script
Thank you once again for your help. If I misunderstood anything, please kindly inform me.
Cheers!
Hello,
I am trying to calculate the similarity between two matrices using the procustes and protest functions. I am working on comparing host phylogeny to host-associated microbes.
host_dist: a dist object. Derived phylogenetic distances from MEGA11 software, imported into R using read.csv. Removed outgroup and then used as.dist() to change the data.frame to dist object
microbe_dist_wuf: a dist object. Used UniFrac() to calculate weighted unifrac distances from a phyloseq object.
After deriving both dist objects, I placed them into procrustes() and protest() as such: procrustes(X = host_dist, Y = microbe_dist_wuf, symmetric = TRUE) protest(X = host_dist, Y = microbe_dist_wuf, scores = "sites", permutations = 999)
my questions are:
Thank you for your time.