Genome scans for selection and introgression based on k‐nearest neighbour techniques