R scripts for population structure (CH1.pop.struc.scripts) and gene-environment association analyses (CH1.geaa.scripts).
Input allele frequency files (af.freq.txt) are named by species: CP= Cyclograpsus punctatus, PA= Parechinus angulosus, SG= Scutellastra granularis.
Note: To get the allele frequencies for the input files, use the population differentation 'rc' file produced by Popoolation2, then re-name the first column with the contig and position as 'scaffold'.ย