I am attempting to annotate rows in a matrix table using a large number of annotations. In order to do this I am looping through a set of numbered annotations. I am running into an issue where I’d like to be able to assign keywords for these annotations dynamically when using mt.annotate_rows(), for example:
for i in range(1, 101):
an_table = hl.import_bed(“an”+str(i)+“.bed.bgz”)
mt = mt.annotate_rows(‘AN_’+str(i) = an_table[mt.locus][‘target’])
However I get the error:
keyword can’t be an expression
Is there a way to dynamically assign keywords using a e.g. a string expression? Thank you for any insight.