Conditional annotate_entries

Thanks Tim,

It looks like annotate_entries(passes_filters = …) is similar to what I was doing, using a blank GT as the filtered state. I’ll try wrapping in the hl.agg.filter a go, thanks.

I would very much like to use preboxed functions like the variant_QC, can I just make sure I understand what you have there?

mt = mt.annotate_entries(raw_GT = mt.GT, GT = hl.if_else(filter_condition_ab, hl.null(hl.tcall), mt.GT))

First off, I didn’t realize you could define >1 annotation at once, that might come in handy.

So in this case I would have an example of the raw_GT. Once I apply variant and sample QC on this, would it ignore all the blanked genotypes or would the Depth and other metrics still be calculated and would also need to be altered?

A similar thing that I am interested in doing in run variant and sample QC seperately on cases and controls. For example, I would want to remove variants with bad call rates in cases or controls as sometimes one set might have a particular bias.

A quick search has shown me that this has been asked before : Issues with sample and variant QC by group

Actually, I’ll put my question on that thread to keep things separate.

Thanks again,

Dan