Filter variants close to indels


I am trying to find a way to filter variants that have at least one indel within a window (with a width parameter) around them and annotate the corresponding rows with a specific value. Is there a way to do this efficiently in Hail?

Roughly how large are these windows? The approach I can think of right now is to take all the indels, turn them into intervals, and then annotate the SNPs using those intervals. However, I think this might not check the “efficiently” box.

The windows will be approx. 200 bp wide. Annotating the SNPs with intervals is a good idea, although I agree that it may not be very efficient. It may be worth a try though.