-
Notifications
You must be signed in to change notification settings - Fork 0
Dev chunk optimization postprocessveppanel #390
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
migrau
wants to merge
42
commits into
dev
Choose a base branch
from
dev-chunk-optimization-POSTPROCESSVEPPANEL
base: dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
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
…. Upgrade pybedtools. Added wave
…annotating with no flags."
…eated in create_consensus_panel.py
Implemented parallel processing of VEP annotation through configurable chunking: - Added `panel_sites_chunk_size` parameter (default: 0, no chunking) - When >0, splits sites file into chunks for parallel VEP annotation - Uses bash `split` command for efficient chunking with preserved headers - Modified SITESFROMPOSITIONS module: - Outputs multiple chunk files (*.sites4VEP.chunk*.tsv) instead of single file - Logs chunk configuration and number of chunks created - Chunk size configurable via `ext.chunk_size` in modules.config - Updated CREATE_PANELS workflow: - Flattens chunks with `.transpose()` for parallel processing - Each chunk gets unique ID for VEP tracking - Merges chunks using `collectFile` with header preservation - Added SORT_MERGED_PANEL module: - Sorts merged panels by chromosome and position (genomic order) - Prevents "out of order" errors in downstream BED operations - Applied to both compact and rich annotation outputs - Enhanced logging across chunking pipeline: - SITESFROMPOSITIONS: reports chunk_size and number of chunks created - POSTPROCESS_VEP_ANNOTATION: shows internal chunk_size and expected chunks - CUSTOM_ANNOTATION_PROCESSING: displays chr_chunk_size and processing info Configuration: - `panel_sites_chunk_size`: controls file chunking (0=disabled) - `panel_postprocessing_chunk_size`: internal memory management - `panel_custom_processing_chunk_size`: internal chromosome chunking Benefits: - Parallelizes VEP annotation for large panels - Reduces memory footprint per task - Maintains genomic sort order for downstream tools
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.
[copilot generated]
Performance Optimization: Chunked Processing for Large Panel Annotations
Overview
This PR introduces memory-efficient chunked processing for VEP annotation post-processing, enabling the pipeline to handle arbitrarily large panel annotations without memory constraints.
Changes Summary
✅ Implemented Chunking Optimizations
1.
panel_postprocessing_annotation.py- Chunked VEP Output ProcessingTechnical details:
Process:
CREATEPANELS:POSTPROCESSVEPPANELVCFANNOTATEPANEL2.
panel_custom_processing.py- Chromosome-Based Chunked LoadingTechnical details:
Process:
CUSTOMPROCESSING/CUSTOMPROCESSINGRICH❌ VEP Cache Storage Location - No Performance Impact
What was tested:
/workspace/datasets/vepor/data/bbg/datasets/vep)Results:
ENSEMBLVEP_VEPprocessCommits:
035a0c7(April 3, 2025): Added VEP cache beegfs support8e40d83(April 24, 2025): Removed VEP cache beegfs optimization (no benefit)Current approach:
params.vep_cacheResource Configuration
Updated resource limits for chunked processes:
Integration Points
Affected Subworkflows:
CREATEPANELS→POSTPROCESSVEPPANEL→ processes VEP output in chunksCUSTOMPROCESSING/CUSTOMPROCESSINGRICH→ uses chunked loading for custom regionsPipeline Flow:
Testing
Tested on:
Validation:
Performance Impact
Migration Notes
No breaking changes. Existing pipelines continue to work with improved memory efficiency.
Related Commits
276152d: Chunking forpanel_custom_processing.py035a0c7: VEP cache beegfs attempt (added)8e40d83: VEP cache beegfs removal (no performance gain)1dffd94,945c129,d243ebc, etc. (resource tuning)Conclusion
This PR successfully implements memory-efficient chunked processing for panel annotation post-processing, enabling the pipeline to scale to arbitrarily large panels without memory constraints. The VEP cache storage location experiment confirmed that computation, not I/O, is the bottleneck for annotation runtime.