Repository navigation
Thread CRAM decoding during FASTQ extraction - #165
Merged
Merged
Conversation
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues block the change enabling threaded CRAM decoding in FASTQ extraction.
No open issues 🎉
What changed in this PR
This PR enables threaded CRAM decoding in the FASTQ extraction pipeline by passing the requested thread count to samtools view, matching the existing downstream stages.
Changes:
- Adds
-@with the requested thread count tosamtools view. - Updates the pipeline test to request three threads and verify that every stage receives that count.
| File | Description |
|---|---|
tests/test_alignment_commands.py |
Verifies thread-count propagation across all pipeline stages. |
src/wgsextract_cli/commands/_extract_helpers.py |
Enables threading in the alignment-reading stage of FASTQ extraction. |
Review effort: Balanced
Merged
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.
FASTQ extraction left the CRAM-reading
samtools viewprocess single-threaded even when the caller requested several threads. Pass the requested thread count to this stage, alongside the existing collate and fastq thread arguments, so CRAM decoding can overlap the downstream work.The existing pipeline test now checks that every stage receives the requested thread count. Real 2 Mb and whole-chr20 extraction was run on native Linux and a native-tools Windows VM, with decoded paired FASTQ contents checked across both versions and platforms. Full-genome installed native-Windows correctness has now passed: both FASTQ mates contain 339,819,948 records and exactly match the decoded Linux SHA-256 values; full SNP and microarray correctness also passed. Local evidence (ignored, not GitHub-hosted):
out/full-validation/final-installed-correctness.jsonin the rollout worktree.Local validation on this branch: Ruff check/format, mypy (123 source files), site and Actions validation, 1880 ordinary tests passed (30 skipped, 87 deselected), fake-data E2E 22 passed (8 optional-path skips), real hg19-mini smoke 44 passed, and pre-commit passed. The first matched Linux VM 2 Mb SNP cohort passed 1 warmup and 3 measured runs with exact decoded VCF body versus the prior golden. All five matched-VM performance workloads subsequently passed with exact outputs and Windows/Linux ratios at or below 1.20. After merging current main, Ruff check/format, mypy (124 source files), site validation, actionlint, and Actions validation passed again.
Initial observed chr20 elapsed times with
--threads 2 --memory 512M: Windows 49.27s control / 42.99s candidate; native Linux 44.17s control / 34.65s candidate. These single serialized measurements were exploratory; native Linux is a reference, and the accepted performance gate is the completed matched Windows/Linux VM comparison above.