How to define mt.altAllele.isIndel in hail2

Hi,

I am trying to rewrite my old hail0.1 qc script into hail0.2 format.
my dataset is 1KG similar dataset.

I try to set conditions like: quality by depth (QD) for for indels and for snp are num1 and num2

in the hail0.1 I can use: v.altAllele.isIndel and v.altAllele.isSNP
I searched hail0.2 doc, I have two idea but not sure which one is right or both?

hl.is_indel(mt.alleles[0], mt.alleles[1])
or
mt.alleles.is_indel()

Thanks a lot.

This should work:

hl.is_indel(mt.alleles[0], mt.alleles[1])

for example:

mt = mt.filter_rows(hl.is_indel(mt.alleles[0], mt.alleles[1]))

Will filter the dataset such that only indels remain.

1 Like