Apply different QC conditions on haploid calls after run_combiner()

Hi Hail team,

I am trying to apply different QC conditions on haploid calls on sex chromosomes after the run_combiner() function with multiple gvcfs. For the process, I wanted to use mt_chrx.GT.is_haploid(), but it did not work as I expected. Here is my code.

## Load the SMT from run_combiner()
mt0 = hl.read_matrix_table('smt_file')
mt0 = mt0.key_rows_by(mt0.locus, mt0.alleles)

## density the SMT
densified_mt=hl.experimental.densify(mt0)

## Extract the multi-allelic and bi-allelic sites
vcf_mt = densified_mt.filter_rows(hl.len(densified_mt.alleles) > 1)

## Split multi-allelic sites
split_mt=hl.experimental.sparse_split_multi(vcf_mt,filter_changed_loci=True)

## Remove positions with only reference calls
mt = hl.variant_qc(split_mt)
mt = mt.filter_rows(mt.variant_qc.AC[1] > 0)

## Apply a QC condition to chrX
mt_chrx = hl.filter_intervals(mt,[hl.parse_locus_interval('chrX:start-end', rebference_genome='GRCh38')])
filter_DP1_chrx = hl.if_else(mt4_chrx.GT.is_haploid(), True, False)
fraction_filtered_chrx = mt_chrx.aggregate_entries(hl.agg.fraction(filter_DP1_chrx))
print(f'Filtering {fraction_filtered_chrx * 100:.2f}% entries out of the downstream analysis.(chrx)')

I got the result: Filtering 0.00% entries out of the downstream analysis.(chrx)

It seems that all calls in chrX are considered diploid. Could you please share the best way to apply different QC conditions for non_par regions on sex chromosomes in males? And if you can find some problematic parts in my code for the process dealing with the matrix table combining gvcfs, please let me know.

Thanks a lot.
Jina