# Error in hl.split\_multi\_hts() output on UK Biobank data?

**URL:** <https://discuss.hail.is/t/error-in-hl-split-multi-hts-output-on-uk-biobank-data/2977>\
**Category:** Hail Query & hailctl\
**Created:** [December 8, 2022, 9:39am UTC](https://discuss.hail.is/t/error-in-hl-split-multi-hts-output-on-uk-biobank-data/2977 "2022-12-08T09:39:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jbchang](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/jbchang/32/818_2.png) [@jbchang](https://discuss.hail.is/u/jbchang)\
**Post date:** [December 8, 2022, 9:39am UTC](https://discuss.hail.is/t/error-in-hl-split-multi-hts-output-on-uk-biobank-data/2977/1 "2022-12-08T09:39:36Z")

</div>

Hi all—

I’m trying to analyze UK Biobank data with Hail, and I’m getting output from `hl.split_multi_hts(mt)` that doesn’t make sense to me. I was looking more carefully at the entries for the variant depicted below and noticed that the `mt.variant_qc.AC` fields don’t make sense to me.

For the G:A allele, the allele counts are [939595, 5], and for the G:T allele, they are [817215, 122385] (see below for snapshot of the `mt.rows().show()` output). Shouldn’t the allele count for G be the same in the two rows, or am I missing something?

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/hail/original/1X/aca68448f8c06ad89cb839df419e62e8d6735aae.png)

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/hail/original/1X/a10be73d2e77c3b31f2ab1ad01330d4510f69158.png)

Best,  
Jeremy

---

<div class="post-metadata">

**Author:** ![danking](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/danking/32/43_2.png) [@danking](https://discuss.hail.is/u/danking)\
**Post date:** [December 8, 2022, 5:14pm UTC](https://discuss.hail.is/t/error-in-hl-split-multi-hts-output-on-uk-biobank-data/2977/2 "2022-12-08T17:14:26Z")

</div>

> [@jbchang](#):
>
> [939595, 5], and for the G:T allele, they are [817215, 122385]

Those counts look like what I’d expect if you ran variant\_qc after running split\_multi\_hts. A `A/T` genotype, after splitting, becomes two genotypes (one at each site): `G/A` and a `G/T`.

These AC arrays both sum to the same number which makes sense to me: total number of alleles at an autosomal site should be 2N\_{samples}.

If you ran variant\_qc before split\_multi, then you could construct ACs that look the way you want:

```python
# ... variant_qc
# ... split_multi_hts
mt = mt.annotate_rows(AC = [mt.AC[0], mt.AC[mt.a_index]])

```

---

<div class="post-metadata">

**Author:** ![jbchang](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/jbchang/32/818_2.png) [@jbchang](https://discuss.hail.is/u/jbchang)\
**Post date:** [December 10, 2022, 1:50am UTC](https://discuss.hail.is/t/error-in-hl-split-multi-hts-output-on-uk-biobank-data/2977/3 "2022-12-10T01:50:11Z")

</div>

Thank you, Dan! I think I got confused because it seems that after splitting, for example, for the G/A genotype, the number of reference (G) alleles was actually the sum of the number of (G) alleles + the other alternate (T) alleles. This way it could maintain the total number of alleles (AN) and allele frequency (AF) for the A allele.

The way you suggest to annotate the rows makes sense!

Best,  
Jeremy
