From e1aa7b5bd5c6b9eac0a9cb5603138a3336c4c5b1 Mon Sep 17 00:00:00 2001 From: Adam English Date: Fri, 6 Oct 2023 09:42:58 -0400 Subject: [PATCH] force vcf indexing Stops annoying crashes when recreating results in a not perfectly cleaned output directory --- truvari/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/truvari/utils.py b/truvari/utils.py index d7d4c2e3..f0a63fb9 100644 --- a/truvari/utils.py +++ b/truvari/utils.py @@ -433,7 +433,7 @@ def compress_index_vcf(fn, fout=None, remove=True): with open(m_tmp, 'w') as out_hdlr: out_hdlr.write(bcftools.sort(fn)) pysam.tabix_compress(m_tmp, fout) - pysam.tabix_index(fout, preset="vcf") + pysam.tabix_index(fout, force=True, preset="vcf") if remove: os.remove(fn) os.remove(m_tmp)