Repository navigation
Conversation
clintval
force-pushed
the
fix/max-idepth-overflow
branch
3 times, most recently
from
November 3, 2026 06:48
eb57e24 to
cfd53ea
Compare
The per-sample --max-idepth is multiplied by the number of samples in an int, so a large value wraps negative with an even sample count and silently disables indel calling. Multiply in 64 bits and clamp to INT_MAX, and describe -L as a per-sample depth in the usage text, as the manual already does. Signed-off-by: Clint Valentine <valentine.clint@gmail.com>
clintval
force-pushed
the
fix/max-idepth-overflow
branch
from
November 3, 2026 16:43
cfd53ea to
8b4ebe2
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As of right now,
mpileupscales the per-sample--max-idepthby the number of samples in anint.With a large value and an even number of samples the product can become negative! This results in
total_depth < max_indel_depthbecoming never true, and indel calling is then silently skipped at every site.I hit this calling variants per cell on single-cell data, where each cell is its own read group in one BAM (14,382 samples). For example,
-L 2147483647dropped every indel, while the default of-L 250retained the indels.The fix in this PR multiplies in 64 bits and clamps to
INT_MAX.This PR also updates the usage text to describe -L as a per-sample depth, matching the manual.