# Issue with split\_multi and/or split\_multi\_hts

**URL:** <https://discuss.hail.is/t/issue-with-split-multi-and-or-split-multi-hts/2760>\
**Category:** Hail Query & hailctl\
**Created:** [July 22, 2022, 10:31am UTC](https://discuss.hail.is/t/issue-with-split-multi-and-or-split-multi-hts/2760 "2022-07-22T10:31:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hdjc90](https://yyz2.discourse-cdn.com/flex036/user_avatar/discuss.hail.is/hdjc90/32/641_2.png) [@hdjc90](https://discuss.hail.is/u/hdjc90)\
**Post date:** [July 22, 2022, 10:31am UTC](https://discuss.hail.is/t/issue-with-split-multi-and-or-split-multi-hts/2760/1 "2022-07-22T10:31:57Z")

</div>

Hi,

I am new to hail 0.2, having previously used hail 0.1.

I am having an issue with using split\_multi and/or split\_multi\_hts on my imported .vcf file. The .vcf file is a multisample (approx 300) file of trios containing WGS data, that I want ultimately run de novo calls on. I am running hail 0.2 in jupyter notebooks.

I am able to import the vcf and I can run split\_multi or split\_multi\_hts. However the problem comes when I either run sample\_qc or de\_novo. I get this same error:

HailUserError Traceback (most recent call last)  
 in   
----\> 1 results.export(output=‘/scratch/c.sbi9hc/DRAGEN\_analysis/hail\_de\_novo.tsv’,delimiter = “\t”)

in export(self, output, types\_file, header, parallel, delimiter)

/apps/genomics/hail/0.2/el7/AVX512/gnu-7.3/hail/typecheck/check.py in wrapper(\_\_original\_func, \*args, \*\*kwargs)  
575 def wrapper(_original\_func, \*args, \*\*kwargs):  
576 args, kwargs_ = check\_all(\_\_original\_func, args, kwargs, checkers, is\_method=is\_method)  
 → 577 return _original\_func(\*args, \*\*kwargs_)  
578  
579 return wrapper

/apps/genomics/hail/0.2/el7/AVX512/gnu-7.3/hail/table.py in export(self, output, types\_file, header, parallel, delimiter)  
1044 parallel = ir.ExportType.default(parallel)  
1045 Env.backend().execute(  
 → 1046 ir.TableWrite(self.\_tir, ir.TableTextWriter(output, types\_file, header, parallel, delimiter)))  
1047  
1048 def group\_by(self, \*exprs, \*\*named\_exprs) → ‘GroupedTable’:

/apps/genomics/hail/0.2/el7/AVX512/gnu-7.3/hail/backend/py4j\_backend.py in execute(self, ir, timed)  
94 ‘Hail stack trace:\n’  
95 f’{better\_stack\_trace}')  
—\> 96 raise HailUserError(message\_and\_trace) from None  
97  
98 raise e

## HailUserError: Error summary: HailException: array index out of bounds: index=2, length=2

Hail stack trace:  
File “”, line 1, in   
mt = hl.split\_multi\_hts(mt)

File “/apps/genomics/hail/0.2/el7/AVX512/gnu-7.3/hail/methods/statgen.py”, line 2322, in split\_multi\_hts  
(hl.range(0, 3).map(lambda i:

File “/apps/genomics/hail/0.2/el7/AVX512/gnu-7.3/hail/methods/statgen.py”, line 2326, in   
).map(lambda j: split.PL[j]))))))

File “/apps/genomics/hail/0.2/el7/AVX512/gnu-7.3/hail/methods/statgen.py”, line 2326, in   
).map(lambda j: split.PL[j]))))))

File “/apps/genomics/hail/0.2/el7/AVX512/gnu-7.3/hail/expr/expressions/typed\_expressions.py”, line 481, in **getitem**  
return self.\_method(“indexArray”, self.dtype.element\_type, item)

File “/apps/genomics/hail/0.2/el7/AVX512/gnu-7.3/hail/expr/expressions/base\_expression.py”, line 596, in \_method  
x = ir.Apply(name, ret\_type, self.\_ir, \*(a.\_ir for a in args))

File “/apps/genomics/hail/0.2/el7/AVX512/gnu-7.3/hail/ir/ir.py”, line 2138, in **init**  
self.save\_error\_info()

I have looked at these threads:

> [@Error split multiallelic](https://discuss.hail.is/t/error-split-multiallelic/1719):
>
> Hi, when I split multiallelic variants I get an error in one case: hail.utils.java.FatalError: HailException: RVD error! Keys found out of order: Current key: { locus: { contig: chr3, position: 16902883 }, alleles: [2; N, GGGGTGCGC] } Previous key: { locus: { contig: chr3, position: 16902883 }, alleles: [2; NGCGCAT, CGCGGGCCG] } This error can occur after a split\_multi if the dataset contains both multiallelic variants and duplicated loci. Java stack trace: org.apache.spark.SparkExcepti…

> [@Error index out of bounds](https://discuss.hail.is/t/error-index-out-of-bounds/1766):
>
> I tried to run this pipeline and get the error of index out of bounds data=hl.import\_vcf(myFolder+"/"+myFile,force\_bgz=True,reference\_genome=‘GRCh38’,array\_elements\_required=False) data2=hl.split\_multi\_hts(data, permit\_shuffle=True) data2=data2.cache() mycount=data2.count()[0] File “/usr/local/lib/python3.7/site-packages/hail/matrixtable.py”, line 2426, in count return Env.backend().execute(count\_ir) File “/usr/local/lib/python3.7/site-packages/hail/backend/spark\_backend.py”, line 297, in…

However neither seem to help solve my issue. I have considered using vcf\_combiner however it would be preferred if I can work out why this is happening. Any help would be massively appreciated.

Thank you
