Filtering MatrixTables where column values do not match

The MatrixTable interface intentionally doesn’t let you query single entries by column value, but instead forces you to write your pipeline in terms of computations applied all entry values as aggregations.

Here are two ways to remove sites that are 0/0 at every sample

Using aggregators:

mts = mts.filter_rows(hl.agg.all(mt.GT.is_hom_ref()), keep=False)

Using variant_qc (which uses aggregators in its implementation):

mts = hl.variant_qc(mts)
mts = mts.filter_rows(mts.variant_qc.AC[0] > 0)