Skip to content

Charge Q/10 per mismatch in ILLUMINACLIP palindrome mode - #91

Merged
sebeier merged 1 commit into
usadellab:V0.42from
cindykrafft:fix/palindrome-mismatch-penalty
Sep 28, 2026
Merged

sebeier merged 1 commit into
usadellab:V0.42from
cindykrafft:fix/palindrome-mismatch-penalty

Conversation

@cindykrafft

Copy link
Copy Markdown

Fixes #90.

calculatePalindromeDifferenceQuality divided two ints (-qual1 / 10), so a palindrome
mismatch cost int(Q/10): nothing below Q10, 1 for Q10–Q19, and so on. Simple mode
(calculateDifferenceQuality) and the README both use Q/10. This divides by 10.0f in the
two branches, as simple mode does.

Adds IlluminaPalindromeMismatchPenaltyTest: a 2x50 pair with a 42-base insert and two
Q19 errors scores 29.9 under the documented rule and must not be clipped at threshold 30
(it scores 31.7 with the integer penalty and was clipped); the same pair with one Q19
error scores 32.4 and must be clipped. The first test fails on unmodified main.

mvn -B test: 259 tests pass on main, 261 with this change.

Found in Mytochondria, a volunteer project that checks the numerical core of research software and verifies every finding by execution (methods and harnesses: https://github.com/cindykrafft/mytochondria/tree/main/audits/trimmomatic)


Generated by Claude Code

@sebeier

sebeier commented Sep 25, 2026

Copy link
Copy Markdown
Collaborator

Thanks! Could you retarget this to the V0.42 branch so it makes it into the next release? And please drop the change to dependency-reduced-pom.xml, it seems to only change line endings from a local build.

calculatePalindromeDifferenceQuality divided two ints (-qual1 / 10), so a
palindrome mismatch cost int(Q/10): nothing below Q10, 1 for Q10-Q19 and so
on. Simple mode (calculateDifferenceQuality) and the README both charge Q/10.
Divide by 10.0f in both branches, as simple mode does.

Adds IlluminaPalindromeMismatchPenaltyTest: a 2x50 pair with a 42-base insert
and two Q19 errors scores 29.9 and must not be clipped at threshold 30 (it
scored 31.7 with the integer penalty and was clipped); the same pair with one
Q19 error scores 32.4 and must be clipped.
@cindykrafft
cindykrafft changed the base branch from main to V0.42 September 25, 2026 13:32
@cindykrafft
cindykrafft force-pushed the fix/palindrome-mismatch-penalty branch from 71fb53e to 54af058 Compare September 25, 2026 13:33
@cindykrafft

Copy link
Copy Markdown
Author

Thanks! Done: the branch is now a single commit on top of V0.42 with just the fix and the test, and the dependency-reduced-pom.xml change is gone (the shade plugin had rewritten it during my local build).

On V0.42, mvn -B clean verify passes with 519 tests (517 before), and the new test fails without the fix. Since the Build and Test workflow only runs for pull requests against main, there won't be a CI run on this PR now.

Happy to add a line to the 0.42 block of versionHistory.txt if you'd like one.


Generated by Claude Code

@sebeier
sebeier merged commit 54af058 into usadellab:V0.42 Sep 28, 2026
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.

ILLUMINACLIP palindrome mode charges int(Q/10) per mismatch instead of Q/10 (integer division), unlike simple mode and the README

2 participants