How to update or recalculate AF, AC and AN from info field after applying some filters (DP<10)?


#1

Hello all,

I am trying to update AF,AC and AN from info field after applying some filters. I am wondering if there is a way to do it in Hail 0.2 version (other than variant qc method).
Thanks in advance.


#2

why not use variant qc?


#3

I would like to have my data in vcf file format after the update and it seems variant qc data cannot be exported to vcf format.


#4

ah, so it’s a matter of copying data to INFO -

mt = mt.annotate_rows(info = mt.info.annotate(AC = mt.variant_qc.AC, AN = mt.variant_qc.AN, AF = mt.variant_qc.AF))

Note that you’ll lose some information – these will be exported as “Number=.” instead of “Number=A”


#5

Thanks a lot