Skip to content

Conversation

@dltamayo
Copy link
Collaborator

No description provided.

- 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
@github-actions
Copy link

github-actions bot commented Dec 29, 2025

Unit Test Results

10 tests   10 ✅  2m 44s ⏱️
 2 suites   0 💤
 1 files     0 ❌

Results for commit bfa4f50.

♻️ This comment has been updated with latest results.

Moving container to modules.config instead of specifying in every process
Copy link
Contributor

Copilot AI left a 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.

@dimalvovs dimalvovs self-requested a review January 7, 2026 20:46
@dimalvovs
Copy link
Collaborator

lgtm!

@dltamayo dltamayo merged commit b862c22 into main Jan 7, 2026
5 of 6 checks passed
This was referenced Jan 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants