convertAncestry function

Converts the ancestry information to a standardized code