Population genetics with applications in plant-microbe interactions