AMOVA with unbalanced groups/Adonis permanova #675
-
Hi I want to do permutational analysis of variance to calculate variation between nematode haplotypes of the same species in samples , i have unbalanced haplotypes in samples and in regions (108 samples, 3 regions, sharing 27 haplotypes). Each sample has a range of between 1 to 9 haplotypes, I have built a pairwise distance matrix (hamming) for all haplotypes. I want to build an R script for performing analysis of molecular variance within samples and between samples in a regions and between regions (I have 3 regions). I guess my challenge is to build the correct dataframe shape ..i tried the nested design making Region and SampleID for each Haplotype so the rows match the dist_matrix but it just give errors, and also i realize that i have to build it using the permute function over samples??? I also want to do an ordination for the different sample to show how they vary between the 3 regions |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 8 replies
-
You're asking to do at least three different things here. I'm not going to do your analysis for you and I doubt Jari will either. Please focus your question to one thing at a time. Do you want help with PERMANOVA, AMOVA, or designing a permutation test? |
Beta Was this translation helpful? Give feedback.
-
That's really messy. I wouldn't touch anything with that many |
Beta Was this translation helpful? Give feedback.
-
Thank you so much Gavin I was able to run the adonis2() call after matching the the LHS and RHS rows. It turns out I just had work the LHS dist_matrix(with redundant rows for haplotypes) and of course the RHS df. Now I just have to figure out restricted permutations and I am done. Thank you so much. |
Beta Was this translation helpful? Give feedback.
The work around is to get a data frame with 1 row per Haplotype if that's what you say the distance matrix represents. In which case you would have a model where the distances between haplotypes are decomposed into a component due to
Region
andSampleID
.