# Non-left-aligned variant in sparse\_split\_multi Error

**URL:** <https://discuss.hail.is/t/non-left-aligned-variant-in-sparse-split-multi-error/1723>\
**Category:** Hail Query & hailctl\
**Created:** [October 5, 2020, 8:13pm UTC](https://discuss.hail.is/t/non-left-aligned-variant-in-sparse-split-multi-error/1723 "2020-10-05T20:13:22Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jinasong](https://avatars.discourse-cdn.com/v4/letter/j/9fc348/32.png) [@jinasong](https://discuss.hail.is/u/jinasong)\
**Post date:** [October 5, 2020, 8:13pm UTC](https://discuss.hail.is/t/non-left-aligned-variant-in-sparse-split-multi-error/1723/1 "2020-10-05T20:13:22Z")

</div>

Hi,

I am trying to export only non-reference rows from the MT merging 5k gvcfs.  
My pipeline is as below.

read.table  
hl.experimental.densify  
hl.len(densified\_mt.alleles) \> 1  
hl.experimental.sparse\_split\_multi  
hl.vep  
MT.write

But in the MT.write() function execution, I got an error at the very last minute.

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

Please let me know how to correct it or recommend another pipeline if you have.

-Jina

---

<div class="post-metadata">

**Author:** ![jinasong](https://avatars.discourse-cdn.com/v4/letter/j/9fc348/32.png) [@jinasong](https://discuss.hail.is/u/jinasong)\
**Post date:** [October 8, 2020, 11:00pm UTC](https://discuss.hail.is/t/non-left-aligned-variant-in-sparse-split-multi-error/1723/2 "2020-10-08T23:00:01Z")

</div>

Hi Hail team,

I am looking forward to your advice eagerly. If you need any more information, please let me know. Thank you always.

-Jina

---

<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:** [October 9, 2020, 12:34am UTC](https://discuss.hail.is/t/non-left-aligned-variant-in-sparse-split-multi-error/1723/3 "2020-10-09T00:34:31Z")

</div>

This is an unexpected input – Hail’s sparse matrix utilities work against left-aligned variants. What caller generated your GVCFs?

---

<div class="post-metadata">

**Author:** ![jinasong](https://avatars.discourse-cdn.com/v4/letter/j/9fc348/32.png) [@jinasong](https://discuss.hail.is/u/jinasong)\
**Post date:** [October 9, 2020, 1:11am UTC](https://discuss.hail.is/t/non-left-aligned-variant-in-sparse-split-multi-error/1723/4 "2020-10-09T01:11:53Z")

</div>

Hi @tpoterba,

Thank you for your response. We applied the same variant calling pipeline including Haplotypecaller (GATK) for all genomes. By the way, this error occurred not in the “hl.experimental.sparse\_split\_multi” step, but in the “MT.write” step. Why does it happen?

Please suggest possible solutions you think. Thank you.

-Jina
