Invalid AD field


Hi All,
I was trying to import vcf.bgz with HailContext and got errors about “invalid AD field”. Here is an example:
at xxxx.vcf.bgz: invalid AD field `24,0’: expected 1 values, but got 2.
offending line: chr1 103436956 . A . 49.38 VQSRTrancheSNP99.90to100.00 AN=1988;BaseQRankSum=-1.059;ClippingRankSum=0.35;DP=166377;ExcessHet=3.0143;FS=31.395;InbreedingCoeff=-0.0005;MQ=57.98;MQRankSum=-2.374;QD=0.87;ReadPosRankSum=0.744;SOR=4.976;VQSLOD=-15.75;culprit=SOR GT:AD:DP:GQ:PGT:PID:PL 0/0:24,0:24:65:.:.:0 0/0:29,0:29:63:.:.:0 0/0:23,0:23:60:.:.:0 0/0:32,0:32:63:.:.:0 0/0:30,0:30:62:.:.:0 0/0:22,0:22:60:.:.:0 0/0:28,0:28:67:.:.:0 0/0:25,0:25:64:.:.:0 0/0:29,0:29:76:.:.:0 0/0:26,0:26:60:.:.:0 0/0:28,0:28:66:.:.:0 0/0:53,0:53:96:.:.:0 0/0:23,0:23:62:.:.:0 0/0:38,0:38:60:.:.:0 0/0:26,0:26:67:.:.:0 0/0:23,0:23:60:.:.:0 0/0:28,0:28:70:.:.:0 0/0:29,0:29:62:.:.:0 0/0:25,0:25:40:.:.:0 …

I have checked the data and it seems that data is fine. Please give some suggestions.

Kind regards,



Hi Jiaowei,
This VCF is malformed. The AD field is “R”-numbered, which means it should have one value for each allele, including the reference. This site only has one allele, since there are no alternate alleles, and so should only have one value in each AD array.

If you want to proceed beyond this error, you can use the skip_bad_ad=True option in import_vcf. This will ignore (set to missing) any AD fields with the wrong number of values.