The effects of natural selection and random genetic drift in structured populations