Genealogical trees from genetic distances