sgkit-dev / sgkit

Scalable genetics toolkit
https://sgkit-dev.github.io/sgkit
Apache License 2.0
235 stars 32 forks source link

Displaying alleles when using `sgkit.display_genotypes(ds)` #1240

Open hyanwong opened 4 months ago

hyanwong commented 4 months ago

When calling sgkit.display_genotypes(ds), I get a list of zeros and ones, but no clue as to what these correspond to. IMO it would be nice to have an extra column at the end of the display that gives the allele list to which the genotypes correspond?

samples    S0   S1   S2
variants                 alleles
0         0|1  1|0  1|1  A,T
1         0|0  0|1  0|1  ...
2         0|1  0|1  0|1
3         0|0  0|0  1|0
4         0|0  0|1  1|0
5         0|0  1|0  1|0
6         0|0  1|1  1|0
7         0|0  1|0  1|1
8         0|0  1|1  1|0
9         0|1  0|0  1|1

If not, some other way to show the actual alleles would be useful, e.g.

samples    S0   S1   S2
variants                
0         A|T  T|A  T|T