Adds alternate encodings of sequences for PCA inputs including:
genotype binary encoding for all alleles (N x 4L) also referred to as one-hot encoding (e.g., “A” is represented as [1, 0, 0, 0], “C” as [0, 1, 0, 0], etc.)
simplex encoding (N x 3L) based on Stormo 2011 (e.g., “A” is represented as [1, -1, -1], “C” as [-1, 1, -1], etc.)
biallelic genotype binary encoding (N x L_b for b biallelic sites) following the McVean 2008 approach used for human genomics (the first sequence in the alignment defines the “reference” allele at each site with an encoding of 0 while the alternate allele is encoded as 1)
Names the original encoding as "integer", since that encoding maps each ACGT to an integer (1, 2, 3, 4) and any other characters to 5. The default encoding remains "integer", so this change is backward compatible. However, initial tests suggest that the simplex encoding may be a better default.
Adds alternate encodings of sequences for PCA inputs including:
[1, 0, 0, 0]
, “C” as[0, 1, 0, 0]
, etc.)[1, -1, -1]
, “C” as[-1, 1, -1]
, etc.)Names the original encoding as "integer", since that encoding maps each ACGT to an integer (1, 2, 3, 4) and any other characters to 5. The default encoding remains "integer", so this change is backward compatible. However, initial tests suggest that the simplex encoding may be a better default.
Closes #22