Reconstructing ancestors to find functional loci in cancer