Viewing all values of an entry field

Hi! I’m a new user, and I’ve encountered an entry field ‘RNC’ while working with the UK Biobank WES data. This is a basic question I am sure, but how can I easily view all of the different possible values of RNC in my matrix table?

I know RNC is an array of strings, but beyond that, I’m having a hard time aggregating all possible values so I can get a sense of what this field represents.

I tried running mt.aggregate_entries(hl.agg.counter(mt.RNC)) but I got a type error (TypeError: unhashable type: ‘list’).

Apologies if this is very elementary, I’m just having a hard time finding answers in the Hail documentation!

Hey @lb61!

What version of Hail are you using? I believe this issue was fixed as far back as 0.2.63. If you update to the latest version of Hail it should not be a problem.

Can you share a bit about how you got such an old version of Hail?

Thanks for the response! I’m using 0.2.78, which is the version configured by DNAnexus for use in JupyterLab.

Ah, I see the issue now. Let me dig into this.

Oof. You could work around the issue with:

mt.aggregate_entries(hl.agg.counter(hl.delimit(mt.RNC)))

hl.delimit will convert an array value to a string similarly to ','.join(values) in python. Default delimiter is comma, can be overriden.

And I have a PR to fix this issue. I expect it to land in 0.2.102. I heartily encourage you to ask the DNANexus folks to update the version of Hail once that’s released!