Efficient way to read & write KeyTables with Locus key (or KeytTables in general)


#1

It would be great if KeyTables were as easy to read/write efficiently as VDS’s - eg. where you could do something like

kt.write(“coverage.kt”)

and have it write out the schema and partitions, and then use .read(…) to read it in.

I’m currently working with gnomAD coverage files which are stored in per-chromosome tsv’s and which take a relatively long time to read into KeyTables. I know I could use hail to re-split them into 1000+ files, but it’d be nicer if hail would manage the split files, and there could be one shared copy.


#2

Hey @bw2! There is a KeyTable.write, and a corresponding read_table on HailContext. Let me know if those don’t do what you want.


#3

Thanks!

Totally missed that, and looks like we already have coverage data stored as .kt