Skip to content

Commit

Permalink
force vcf indexing
Browse files Browse the repository at this point in the history
Stops annoying crashes when recreating results in a not perfectly
cleaned output directory
  • Loading branch information
ACEnglish committed Oct 6, 2023
1 parent 79a342d commit e1aa7b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion truvari/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit e1aa7b5

Please sign in to comment.