Hello all. I am trying to process the Hail table from gnomAD v4. In the hail table, there is a row field called freq with this schema:
Row fields:
'locus': locus<GRCh38>
'alleles': array<str>
'freq': array<struct {
AC: int32,
AF: float64,
AN: int32,
homozygote_count: int64
}>
I want to annotate a new row that aggregates the entire array of ht.freq.AC per row, I tried it with this method but it didn’t work:
ht = ht.annotate(freq_AC_sum=hl.agg.array_sum(ht.freq.AC))
ExpressionException: 'Table.annotate: field 'freq_AC_sum'' does not support aggregation
May I please get some advice on how I can do that? Thank you very much.