These script accompany the paper "Global biogeography of warning colouration in the butterfly Danaus chrysippus" by Liu et al. (link to be added).
- Number and spelling mistakes check
- Full data process
- Environmental value add and check
- Convert full data to 4DB data
- Trait/phenotype/genotype frequency, allele frequency and sex frequency calculation
- Trait/phenotype/genotype frequency, sex frequency and number of records distribution maps
- Number of records maps
- Allele frequency maps and Transects file made for cline analysis
- Cline analysis
- GLS (generalized least-squares) analysis
- Residual Map of Trait frequency between research and citizen datasets
- Polymorphism of Trait frequency and location identification
R: raster, rgeos, rgdal, maptools, wrld_simpl, maps, ggplot2, mapproj, geosphere, Viridis (Colorblind-Friendly Color Maps for R), PerformanceAnalytics, AICcmodavg, ape, gridExtra, lme4, nlme, raster, RColorBrewer, rworldxtra, rworldmap, scales, corrplot, fmsb, MuMIn, ggpubr, hzar, doMC, png
Python: numpy, pandas, matplotlib
Arcmap
It will be posted here after publication.
Most of the core codes were contributed by Simon Martin(https://github.com/simonhmartin) and part by Wanzhen Liu.
Some codes for Cline and GLS analysis adapted from HZAR paper https://onlinelibrary.wiley.com/doi/10.1111/1755-0998.12209 and a Falcons paper https://royalsocietypublishing.org/doi/10.1098/rsbl.2021.0116.