Fix 10 assorted medium-severity bugs across multiple files#2537
Open
sirus20x6 wants to merge 1 commit intosamtools:developfrom
Open
Fix 10 assorted medium-severity bugs across multiple files#2537sirus20x6 wants to merge 1 commit intosamtools:developfrom
sirus20x6 wants to merge 1 commit intosamtools:developfrom
Conversation
- vcffilter.c: Change max_qual from int to float to avoid truncation of
fractional QUAL values
- vcfview.c: Guard args->ac[1] access with n_allele>=2 check for
ALLELE_ALT1 filtering to prevent out-of-bounds on REF-only sites
- convert.c: Invert bcf_gt_is_phased() condition in process_gt_to_hap
and process_gt_to_hap2 ('*' marks unphased, not phased)
- convert.c: Use gt_id instead of fmt->id for GT header existence check
in process_pbinom
- convert.c: Fix off-by-one in allele bounds check (al >= n_allele,
not al > n_allele) since allele index is 0-based
- dist.c: Fix double-counting in dist_insert_n; dist_insert already
increments nvalues by 1, so add cnt-1 not cnt
- bin.c: Prevent bin_get_idx from returning -1 when value is below
first bin boundary
- read_consensus.c: Fix loop condition from j<dfreq[i].len[j] to
dfreq[i].len[j] (nonzero check) matching the pattern used elsewhere
- gff.c: Fix Mt_rRNA returning GF_MT_tRNA instead of GF_MT_rRNA
(copy-paste error)
- gff.c: Fix strncmp length for "lncRNA" from 7 to 6
d39593e to
a10aca3
Compare
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.
Summary
max_qualint→float (QUAL truncation in IndelGap filtering)ac[1]access withn_allele >= 2for 4 ALLELE_ALT1 pathsbcf_gt_is_phasedfor unphased*marker in hap output (2 functions)gt_idinstead offmt->idin GT existence checkal > n_alleletoal >= n_allelenvaluesoff-by-one indist_insert_n(counted cnt+1 instead of cnt)bin_get_idxreturning -1 for values below first binj<dfreq[i].len[j]todfreq[i].len[j](nonzero check)Mt_rRNAreturningGF_MT_tRNA(copy-paste error)strncmp("lncRNA", 7)to length 6 — was never matching lncRNA biotypeFixes #2496
Test plan