ancestral_groups_tbl function

Creates an ancestral groups table.