Characterising functionally important and ecologically meaningful genetic diversity using a candidate gene approach