Code

I have a bunch of code (unix, R, python) which I’ve used to do specific tasks for previous papers which may be useful to some people. These will be uploaded here periodically.

Genomic and spatial analyses
Data and code for genomic (RAD-seq) and spatial analysis. Input and output files for all analyses – ADMIXTURE, DAPC, BEAST, SNAPP, EEMS, dadi. Also included are STACKS output files and ENMs from Barratt et al. 2018

Merging large files
Python script to merge multiple excel files. I recently had to merge several hundred excel files from a large collection of independent datasets in order to create a homogenous data structure of species distribution points that I could work with. I wrote a simple script using python which can do this, just change directory into the location where your data is stored and then run. In the code is a specifier for which worksheet to take as the data in case excel files have multiple tabs.  You can modify the script to point to your own data files/worksheet structures and run python python_xls_merge.py.

Stability mapping of SDM outputs
Data and code for mapping stability surfaces based on time series SDM outputs. R scripts for 1) calculating stability surfaces (static and dynamic stability), 2) investigating correlations between stability surfaces using different modelling approaches, 3) plotting an animated GIF image of habitat suitability over time, 4) plotting summary maps of multiple analyses.