# Export only biallelic variants

**URL:** <https://discuss.hail.is/t/export-only-biallelic-variants/1793>\
**Category:** Hail Query & hailctl\
**Created:** [November 18, 2020, 11:07am UTC](https://discuss.hail.is/t/export-only-biallelic-variants/1793 "2020-11-18T11:07:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![krithika\_s](https://avatars.discourse-cdn.com/v4/letter/k/d6d6ee/32.png) [@krithika\_s](https://discuss.hail.is/u/krithika_s)\
**Post date:** [November 18, 2020, 11:07am UTC](https://discuss.hail.is/t/export-only-biallelic-variants/1793/1 "2020-11-18T11:07:06Z")

</div>

Hi all,

I used “hl.summarize\_variants(data)” to get summary of my input. In this result, I am getting 2 alleles, 3 alleles and till 7 alleles. My question is there any option I can export only biallelic variants or triallelic variants?

---

<div class="post-metadata">

**Author:** ![tpoterba](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/tpoterba/32/61_2.png) [@tpoterba](https://discuss.hail.is/u/tpoterba)\
**Post date:** [November 18, 2020, 2:00pm UTC](https://discuss.hail.is/t/export-only-biallelic-variants/1793/2 "2020-11-18T14:00:51Z")

</div>

If you want to remove variants that are multiallelic, try something like:

```python
data = data.filter_rows(hl.len(data.alleles) < 3)

```

If you want to split multiallelics, take a look at [split\_multi\_hts](https://hail.is/docs/0.2/methods/genetics.html#hail.methods.split_multi_hts)

---

<div class="post-metadata">

**Author:** ![krithika\_s](https://avatars.discourse-cdn.com/v4/letter/k/d6d6ee/32.png) [@krithika\_s](https://discuss.hail.is/u/krithika_s)\
**Post date:** [November 19, 2020, 4:34am UTC](https://discuss.hail.is/t/export-only-biallelic-variants/1793/3 "2020-11-19T04:34:24Z")

</div>

Thank you @tpoterba
