SNP dosages to numpy/pandas?

Hi Guys,
Do you have a recommendation for how to best export SNP dosages from a MatrixTable to a numpy/pandas object?

The goal is to filter subjects and create a numpy matrix of 0/1/2 alt allele counts for use as input to a TensorFlow model. The overall data size isn’t astronomical and can fit into RAM.

Subject filtering isn’t an issue, but I’ve been toying with the “n_alt_alleles” function, combined with collect() / take(), and haven’t identified a good solution.

I would appreciate any thoughts or advice you might have!


try mt.GT.n_alt_alleles().export('path...') then ingesting that with numpy/pandas