fix(qmule and qsv): iSize calculator and qsv throwing exceptions #398
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.
This pull request refactors and improves utility methods in the tiled aligner codebase, focusing on performance, readability, and logging. The most significant changes include optimizing overlap detection logic, modernizing Java idioms, and enhancing logging control for debugging and information output. The changes are grouped below by theme.
Overlap Detection and Logic Improvements
doRecordsOverlapReferencemethod inBLATRecordUtil.javato use a more robust and standard interval overlap check (max(start) < min(end)), improving correctness and clarity.removeOverlappingRecordsto optimize list allocation and removed unnecessary code comments.Logging Enhancements
TiledAlignerUtil.java, reducing unnecessary log output and improving performance. This includes checks before logging and more detailed debug information during Smith-Waterman processing. [1] [2] [3] [4] [5] [6] [7] [8] [9]QLevelto support new logging level checks.Modern Java Idioms and Code Simplification
List.of()instead ofArrays.asList(), and method references in stream operations andOptional.ifPresent. [1] [2] [3]list.getFirst()instead oflist.get(0)for clarity and safety in retrieving the first element of a list.Algorithmic Improvements
doesSequenceHaveMostlySingleBaseRepeatsfor efficiency and clarity, replacing a stream-based approach with a direct scan and threshold logic.Minor Cleanups
How Has This Been Tested?
Unit tests have been added.
qmule's ISizeClusters has been run against failing input (due to unpaired reads)
qsv tested against failing BAMs