CANCOR
The CANCOR test was based on scripts by (Blanco-Pastor et al., 2021).
The CANCOR test was used to analyse both environmental and phenotypic
data to find loci responsible for adaptations. Environmental and
phenotypic data were scaled using scale() function in R and then run
against the genotypic data using the CCorA function in the R package
vegan [34]. Then the significance of outlier loci was tested using
an χ2 test on Mahalanobis distances. Loci were
considered an outlier if the FDR=0.1. The best represented loci in the
first two canonical dimensions were selected. To simplify results we
removed soil parameters as their projection norms weren’t above 0.9 for
any soil parameter, meaning few significant loci could be found. Loci
with an alternative allele frequency that was relativly high
(|r |>0.25) were kept. This
resulted in lists of loci that were positively or negatively correlated
with a trait of environmental parameter.