Importing X chromosome bgen in Hail

Hi,

it seems Hail doesn’t want to import the chrX.bgen file I have, throwing the following error:

Hail version: 0.1-6e815ac
Error summary: HailException: Hail only supports diploid genotypes. Found min ploidy equals 1' and max ploidy equals2’.

I’ve seen in_X_PAR() and in_X_non_PAR() in variants methods, so surely it should be possible to import the X chromosome, isn’t it? @tpoterba ?

Hail’s infrastructure currently doesn’t support haploid genotypes, which is a big problem. Our internal genotype representation is inherently diploid, and we haven’t really thought about representing and computing on haploid genotypes. There’s some barebones stuff around the X chromosome for variants (is_x_non_par, etc), but nothing on genotypes. We built in a diploid assumption to the bgen import partly due to this infrastructural limitation, and partly because we didn’t think chrX data was being released with the UKBB, the primary bgen use case.

As of right now there aren’t concrete plans to change this, but you should file an issue on github and I’ll flag this issue with the team today.

UKBB imputed X chromosome will be released, though later than autosomes, but genotyped X is released (then people either use it non-imputed, or impute it themselves). There are important genes on the X chromosome, such as several coagulation factors.

Thanks for you help.

That’s good information to know, I’ll see if we can reprioritize haploid infrastructure.

Thank you. Should I raise the issue on Github, as you suggested?

Yes, definitely! That gives us something to track.

Done, issue #2407

Thanks again.