-
Notifications
You must be signed in to change notification settings - Fork 2
Address Nextflow linting, add param validation, reformatting #68
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
Conversation
- Removed utils.py code, placed functions into compare_calc.py - Refactored compare_calc.py for efficient access of dataframes - Fixed bug where NaN `junction_aa` values were not dropped prior to calculation of Jaccard and Sorensen matrices
Reformated code to address new Nextflow linting issues for strict syntax compatibility, namely: - moving statements into workflows - making implicit closure parameters explicit - removing use of projectDir in processes Added nf-schema for parameter validation
Unit Test Results10 tests 10 ✅ 2m 44s ⏱️ Results for commit bfa4f50. ♻️ This comment has been updated with latest results. |
Moving container to modules.config instead of specifying in every process
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR refactors the TCRtoolkit pipeline to improve code quality through linting compliance, centralized parameter validation, and modernized infrastructure. The changes introduce the nf-schema plugin for schema-based parameter validation, relocate configuration functions, remove redundant code, and optimize the Docker build process.
Key changes:
- Added JSON schema for parameter validation with the nf-schema plugin, replacing manual validation code
- Centralized container directives and relocated the check_max function to conf/base.config
- Refactored Python comparison calculations to eliminate dependencies and improve performance
- Optimized Dockerfile by switching to micromamba base image and consolidating build steps
Reviewed changes
Copilot reviewed 33 out of 35 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| workflows/tcrtoolkit.nf | Removed manual parameter validation code and added VALIDATE_PARAMS subworkflow call |
| subworkflows/local/validate_params.nf | New subworkflow that uses nf-schema plugin for parameter validation |
| nextflow_schema.json | New JSON schema defining all pipeline parameters with validation rules |
| nextflow.config | Added nf-schema plugin configuration and default parameter values |
| conf/base.config | Relocated check_max function from nextflow.config |
| conf/modules.config | Added centralized container directive for all processes |
| subworkflows/local/sample.nf | Improved lambda parameter naming for better code clarity |
| subworkflows/local/resolve_samplesheet.nf | Added samplesheet_utf8 input to SAMPLESHEET_RESOLVE and improved lambda naming |
| subworkflows/local/input_check.nf | Improved lambda parameter naming using underscore prefix for unused variable |
| modules/local/samplesheet/samplesheet_resolve.nf | Rewrote script using awk for improved row ordering and error handling |
| modules/local/samplesheet/samplesheet_check.nf | Removed process-level container directive |
| modules/local/sample/*.nf | Removed process-level container directives from multiple sample modules |
| modules/local/sample/tcrdist3.nf | Reformatted conditional expressions using ternary operators for conciseness |
| modules/local/compare/*.nf | Removed process-level container directives from compare modules |
| modules/local/airr_convert/*.nf | Removed process-level container directives from conversion modules |
| notebooks/*.qmd | Removed unused project_dir parameter from all notebook templates |
| bin/compare_calc.py | Refactored to inline similarity functions and optimize memory usage |
| bin/utils.py | Removed file as functions are now inlined in compare_calc.py |
| Dockerfile | Switched to micromamba base, optimized build layers, and improved cleanup |
| env.yml | Added r-grr=0.9.5 dependency |
| main.nf | Removed commented onComplete workflow section |
| LICENSE | Added MIT License file |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Update docker
|
lgtm! |
No description provided.