Hl.is_indel issues

I’ve noticed some discrepancies using hl.is_indel vs hl.is_snp when it comes to very large alleles.

For example:
example = ['AGGCTGACCTCTGTCCGCGTGGGAGGGGCCGGTGTGAGGCAAGGGGCTCAGGCTGACCTCTGTCCGCGTGGGAGGGGCCGGTGTGAGGCAAGGGGCTCAGGCTGACCTCTGTCCGCGTGGGAGGGGCCGGGGTGAGGCAAGGGCTCACACTGACCTCTCTCAGCGTGGGAGGGGCCGGTGTGAGGCAAGGGGCTCGGGCTGACCTCTCTCAGCGTGGGAGGGGCCGGTGTGAGGCAAGGGGCTCGGGCTGACCTCTCTCAGCGTGGGAGGGGCCGGTGTGAGGCAAGGGGCTCG', 'G']

(~(hl.is_snp(example[0], example[1]))).show()

hl.is_indel(example[0], example[1]).show()

Should give the same output: True, since I expect the example to be an indel, and not a snp. On hail version version 0.2.57-582b2e31b8bd, I instead get this output:

Is there something subtle about the two functions that I’m not realizing? Thanks.

We should improve documentation, but the reason this isn’t a deletion is that the first base of the two allele strings differs. Hail expects indels to be left-aligned, and this polymorphism is not (the left aligned version would start 1 base earlier: XAGGCT... / X.

I believe this constitutes a complex allele, according to Hail’s definition. I’m reluctant to relax the definitions without thinking through the potential consequences when users do have left-aligned variants.

Thanks for the clarification, I’ll keep the specificities of how Hail handles each type in mind.