Inference of ancestry: constructing hierarchical reference populations and assigning unknown individuals