Local adaptation and the evolution of inversions on sex chromosomes and autosomes. (5th October 2018)