Consider an m x n genotype matrix of m haploid samples and n SNPs where each value is an allele encoded by an integer (0,1,2,3).
Is there a good/standard way to encode the alleles in order to perform a PCA on this matrix to investigate population structure ?
I have seen this with matrices of diploid samples where each SNP is encoded as 0/1/2 to represent the number of non-reference allele, but is there a way to consider more than 2 alleles ?
e.g. difference between alleles 1 and 3 should be equal to difference between alleles 1 and 2