Translation from hail 0.1 to 0.2 about keep only on-target

Hi,

In hail 0.1 the following syntax works for keeping only variants within my capture bed file:

ontarget = KeyTable.import_bed(‘myregion.bed’)
vds_ontarget = vds.filter_variants_table(ontarget, keep=True)

What’s the equivalent for hail 0.2? Thanks.

see here:

https://hail.is/docs/0.2/guides/genetics.html#filter-loci-by-a-list-of-locus-intervals

It will be hl.import_bed instead of hl.import_interval_list