Using the population genealogies to map rare variants