Skip to content

Handle zero-depth genotypes in allele-balance filtering - #665

Open
thierrygosselin wants to merge 1 commit into
ANGSD:masterfrom
thierrygosselin:fix-zero-depth-allele-balance
Open

thierrygosselin wants to merge 1 commit into
ANGSD:masterfrom
thierrygosselin:fix-zero-depth-allele-balance

Conversation

@thierrygosselin

Copy link
Copy Markdown

Summary

When -geno_minMM was enabled, genotype calling calculated the major/minor allele fraction by dividing by total genotype depth without checking for zero depth.

A zero-depth genotype therefore produced an undefined ratio rather than being explicitly treated as missing.

This change:

  • detects zero total depth before calculating allele balance;
  • marks zero-depth genotypes as missing;
  • preserves the existing allele-balance threshold for genotypes with data.

This only affects the no-read edge case and does not change allele-balance results for genotypes with positive depth.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant