fix(qsnp): OOM caused by large number of failed filter reads at same location #395
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.
Description
This pull request introduces several improvements and bug fixes to the
qsnppipeline, primarily focused on memory management during BAM processing, code modernization, and test cleanup. The most significant update is the addition of a safeguard to limit memory usage when encountering large numbers of poor-quality reads at the same genomic position. Additionally, the codebase is modernized with Java 8+ idioms, and tests are updated for clarity and conciseness.Pipeline memory and performance improvements:
Producerclass to limit the number of failed filter records per start position to 1000, preventing memory issues when many poor-quality reads map to the same location (Pipeline.java). [1] [2]Code modernization and cleanup:
<>) and updated collection usage to use Java 8+ idioms, such asList::toListinstead ofstream().collect(Collectors.toList())(Pipeline.java,StandardPipelineTest.java). [1] [2] [3] [4]getFirst()instead ofget(0)for lists and simplifying exception messages (Pipeline.java). [1] [2]Test improvements and cleanup:
PipelineTest.java). [1] [2]PipelineTest.java,StandardPipelineTest.java). [1] [2] [3]Documentation and naming consistency:
Pipeline.java). [1] [2]These changes collectively improve the pipeline's robustness, maintainability, and code clarity.) were we now keep the bases of the failed filter reads rather than just a count in the Accumulator object.
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
No new unit tests, but I ran this against the 47 failed SDFTM runs in cromwell prod and they all succeeded.
Are WDL Updates Required?
Not specifically, but the adamajava version used in the various workflows will need to be updated once this change has been released