samtools / htsjdk

A Java API for high-throughput sequencing data (HTS) formats.
http://samtools.github.io/htsjdk/
278 stars 244 forks source link

Allow the BAM index to be up to 5 seconds older than the BAM before e… #1634

Closed tfenne closed 1 year ago

tfenne commented 1 year ago

…mitting the "WARNING: BAM index file ... is older than BAM " message.

Description

HTSJDK itself when writing a BAM and indexing it will frequently leave an mtime on the index that is slightly older than the BAM itself, and this causes a lot of spurious warnings. This is a simple attempt to fix those.

Things to think about before submitting: