So I have ran SAMOVA and made calculations regarding haplotype diversity and nucleotide diversity of several populations. I have also made raster data regarding geographical data like slope, ruggedness etc. Is there a program/package that allows me to combine these to types of data into a map, so I can study if there is a correlation between these indexes and the diversity?


1 Answer 1


Update I looked into modern use of Mantel's test and it will not accept categorical variables. I now remember the null hypothesis of Mantel's ... the association is random between the matrices, i.e. no genetic structure. Therefore p < 0.05 excluding degrees of freedom (so in practice its smaller).

The options are:

  1. Fst implementing that is easy but interpreting is complicated because it's about what constitutes genetic structure
  1. General linear modelling;
  2. Machine learning for example random forest, SVM etc ...

I would use points 1 and point 3, 2 is old school now. I would use point 1 to datamine the ML.

The key to Fst is that 0.2 comprises population structure for complicated reasons. Implementing ML is not trivial but is the trendiest analysis going. It is not simply implementation its checking and verifying the associations and avoiding overtraining, which would be the major criticism.

The ML would permits the genetic structure to be predicted across broad geographic regions and those predictions are tested and used to reformulate the model. However, you'd need significant expertise in ML (and coding).

The technical word for this is allopatry and if that doesn't mean much, please do read on the subject because that is central to the theory behind the calculations you are performing. There is a HUGE bank of theory on the subject and is the central alternative to Darwinian selection, yep it's that big. So this is not a passing calculation but a fundamental calculation at the heart of the model of speciation of the organisms within your study. What you want to show is your species does not demonstrate allopatry but niche selection. Ultimately this may not be precisely decipherable (depends on the geographic distances).

Very briefly the analysis to perform now is the Mantel's test. This should be within the Arlequin package. Mantel's test will assess if there is a 'cline' in your data, i.e. an association with gene frequency and geographic distance - in an allele frequency package (genetic distance of point mutation otherwise).

Geological data versus geographic distance ... Mantel's test will cover both calculations, however I think that a simple numerical code will be needed for categorical data. I'd need to check that carefully, because I get that wrong the calculation with be wrong. Basically you need to tell the matrix correlation test that this categorical data being tested.

The next level of analysis in allele frequency calculations involves plotting the pairwise (not global) Fst against against geographic distance and geological type - if the association in Mantel's test is not linear. If the association is linear the Mantel's will be positive, i.e. null hypothesis will be accept, p > 0.05.

I'll check the location of the calculations in various packages later (not necessarily today). I need to check the categorical variable for Mantel's - I've never done that calculation so am not sure.

What you are looking for is Mantel's to reject geographic distance and accept geological data type. That would be a decisive and very publishable result. Fst will be the fall-back to shift between the hypotheses.

If you have loads of SNPs there are phylogenetic tree solutions based on modelling point mutation. The next layer of biophylo-geographic analysis involves packages within the Beast framework. I'm sure that would work here because the number of mutations would be low, also this is really just geographic distance rather than niche. If you've loads of SNPs this would be a good analysis to perform however, but for intraspecifies mtDNA particularly involving cox1 I personally wouldn't think it would be informative. It is perfectly doable though.

A positive Mantel's test is a rare result, but generally allopatry is very common so it is a VERY strong null hypothesis for the data. What I am trying to say is you can't just reject allopatry without testing it. ... well you can but not if you want to publish in e.g. Molecular Ecology.

Good luck with the study and again I'll update the post later. It looks really good and is more than interesting.

  • $\begingroup$ I forgot to mention in my original post that I did run a mantel's test, and in fact it's results are what prompted me to check geographical data in the first place. For two of my 4 species there was no correlation between genetic and geographical distance (p value>0.05) , so my thought process is that diversity comes from other geological factors. $\endgroup$
    – Nickmofoe
    Dec 30, 2022 at 17:48
  • $\begingroup$ I did the test in R using the packages ape vegan and geodist, due to not wanting to complicate things even more with arlequin. I am pretty sure the p value needs to be above 0.005 for it to be significant but I might be wrong. $\endgroup$
    – Nickmofoe
    Dec 30, 2022 at 19:09
  • $\begingroup$ @Nickmofoe I've answered the question, as far as I practically can. $\endgroup$
    – M__
    Dec 30, 2022 at 19:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.