Apply Nextflow 25 strict syntax fixes#1677
Merged
Merged
Conversation
|
maxulysse
approved these changes
Jan 19, 2026
maxulysse
approved these changes
Jan 19, 2026
79c363d to
83f2ea0
Compare
Changes to comply with Nextflow strict syntax requirements: Local workflow files (main.nf, subworkflows/local/*, modules/local/*): - Convert `Channel` to `channel` (lowercase) throughout - Replace implicit closure parameter `it` with explicit names - Add `def` keyword to implicit variable declarations - Prefix unused parameters with underscore (_key, _idx, etc.) - Rename variables that shadow input parameters - Move file declarations inside workflow main: blocks - Replace `for` loops with `.each()` functional iteration Config files: - Remove top-level `if (!params.skip_*)` wrappers (strict syntax prohibits top-level conditionals in config files) - Replace implicit closure parameter `it` with explicit `filename` - Convert conditional env assignments to ternary operators See: https://nextflow.io/docs/latest/strict-syntax.html Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Update nf-core components to ensure Nextflow 25 strict syntax compliance. Module changes: - Convert Channel.empty() to channel.empty() - Replace implicit `it` with explicit parameter names - Add `def` to implicit variable declarations - Prefix unused variables with underscore - Many modules switch to topic-based version reporting Modules updated: - bbmap/bbsplit, bracken/bracken, cat/fastq, custom/catadditionalfasta - fastp, gffread, gunzip, hisat2/extractsplicesites, kraken2/kraken2 - rsem/preparereference, rseqc/readdistribution, rseqc/tin - salmon/quant, sentieon/*, sortmerna, sylph/profile - trimgalore, ucsc/bedclip, ucsc/bedgraphtobigwig Subworkflows updated: - bam_dedup_*, bam_markduplicates_picard, bam_sort_stats_samtools - bam_stats_samtools, bedgraph_bedclip_bedgraphtobigwig - fastq_align_hisat2, fastq_fastqc_umitools_*, fastq_qc_trim_filter_* - fastq_remove_rrna, fastq_subsample_fq_salmon, quantify_pseudo_alignment Notable changes from upstream master: - bbmap/bbsplit: topic-based version reporting - fastp: output naming changed from _1/_2 to _R1/_R2 suffix - rseqc/tin: now uses ext.prefix for output naming - sentieon configs: env block syntax for environment variables Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
BBMAP_BBSPLIT changes: - Remove invalid BBMAP_BBSPLIT.out.versions reference (now uses topic channel for versions, collected automatically at workflow level) Sentieon test configuration: - Use null instead of empty string for optional Sentieon env vars to prevent Nextflow warnings about empty environment variable values - Use env block syntax for Sentieon env vars (aligns with nf-core module convention and handles null values from System.getenv() properly) - Create standalone sentieon.config files for each Sentieon test directory with all required settings (process config + env vars) since nf-test doesn't support multiple config files - Remove Sentieon env vars from general test configs to prevent empty env var warnings in non-Sentieon tests Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Update nf-test snapshots to reflect changes from strict syntax updates:
- Topic-based version reporting changes output structure
(versions now reported via topic channel rather than versions.yml)
- Python version now correctly reported in CUSTOM_CATADDITIONALFASTA stub
- RSEM outputs directory changed to ${params.aligner} for consistency
- New RSEM merged output files (merged_genes_long, merged_isoforms_long)
- CUSTOM_CATADDITIONALFASTA now outputs GTF file
- fastp output naming changed from _1/_2 to _R1/_R2 suffix
- rseqc/tin uses ext.prefix for output naming
Module and subworkflow test snapshots updated for all components
modified in previous commits.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add `nextflow lint` to CI to prevent regressions in strict syntax compliance. Changes: - Create separate nextflow-lint.yml workflow for strict syntax validation - Update nf-test.config to use strict syntax (add `=` for assignments) so it no longer needs to be excluded from linting - Disable nf_test_content lint check in .nf-core.yml for strict syntax compatibility (nf-core linting conflicts with some strict syntax patterns) The lint workflow runs on all Nextflow files in the repository. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
3f366d7 to
24d1d32
Compare
maxulysse
approved these changes
Jan 21, 2026
Member
maxulysse
left a comment
There was a problem hiding this comment.
just concerned about tests/bam_input.nf.test.snap
- Fix incorrect nesting of star_rsem/log/ under star_rsem/<SAMPLE>.stat/ - Update log file patterns to match actual STAR output files: - *.SJ.out.tab (splice junctions) - *.Log.final.out (alignment summary) - *.Log.out and *.Log.progress.out (detailed logs) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Member
Author
Thanks @maxulysse ! This is because I fixed something (updated the PR description). The Before: After: Config always applies. Outputs go to Changes:
This is a bug fix - the old behavior was incorrect. |
maxulysse
approved these changes
Jan 21, 2026
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.
Summary
Apply Nextflow 25 strict syntax fixes and update nf-core components for compliance.
Commits
refactor: Apply strict syntax to local files (
ba7caae) -Channel→channel, explicit closure params,defdeclarations, move file declarations insidemain:, remove top-level config conditionalschore: Update nf-core modules/subworkflows (
e192000) - Updates for strict syntax compliancefix: BBMAP versions + Sentieon config (
6da25a0) - Remove invalid version reference, create standalone sentieon.config filestest: Update snapshots (
e806fa9)ci: Add strict syntax lint workflow (
01d18d3)docs: Fix RSEM output docs (
f79417a) - Fixstar_rsem/log/nesting, correct log file patternsdocs: Update CHANGELOG (
24d1d32)Side effects explained
Changes arose from: (1) removing conditional config wrappers for strict syntax, (2) updating modules to strict-syntax-compliant versions.
RSEM BAM input (
bam_input.nf.test.snap)rsem/→star_rsem/,*.transcript.bamno longer publishedif (!params.skip_alignment && ...)wrapper now applies config consistentlydocs/output.md; input BAMs no longer redundantly re-publishedfastp naming⚠️ BREAKING
*_1.fastp.fastq.gz→*_R1.fastp.fastq.gz(same for_2/_R2)RSeQC TIN naming
test.paired_end.sorted.summary.txt→test.summary.txtext.prefixfor cleaner namingModule snapshot changes (topic-based versions)
versions.ymlfiles, changing snapshot structure significantlyVersion reporting fix
python: null→python: "3.12.2"in pipeline snapshotsReferences
Depends on fix: Nextflow 25 strict syntax compliance for rnaseq modules and subworkflows modules#9688✅ MergedPR checklist
CHANGELOG.mdupdateddocs/output.mdupdated