I have been using the following code to do some basic filtering:
ab = mt.AD / hl.sum(mt.AD) filter_condition_ab = (((mt.GT.is_hom_ref() & (ab < 0.1)) |(mt.GT.is_het() & (ab > 0.1) & (ab < 0.9)) | (mt.GT.is_hom_var() & (ab > 0.9))) & (mt.GQ>=30)& (mt.DP>=10)) mt = mt.filter_entries(filter_condition_ab)
Instead of filtering, I would like to try and add an annotation alongside the GT field
mt = mt.annotate_entries(GTF = hl.null(hl.tcall) )
How would I do this conditional on the filter as above? i.e. where the entry would be filtered it would instead receive a GTF of ./.
Thanks a lot