Skip to content

Conversation

@pinin4fjords
Copy link
Member

@pinin4fjords pinin4fjords commented Jan 19, 2026

Summary

This PR fixes Nextflow 25 strict syntax compliance issues and converts modules to topics version output.

Strict Syntax Fixes:

Variable shadowing fixes:

  • bbmap/bbsplit/main.nf: Rename closure variable indexidx to avoid shadowing input parameter

Implicit closure parameter it → explicit names:

  • cat/fastq/main.nf: v, ixval, idx
  • gffread/main.nf: itflag in .any { } closure
  • rsem/preparereference/main.nf: itarg in .removeIf { }
  • salmon/quant/main.nf: itr in .each { }
  • sentieon/rsempreparereference/main.nf: itarg in .removeIf { }
  • sentieon/staralign/main.nf: itr in .each { }
  • trimgalore/main.nf: implicit it fix
  • Multiple subworkflows: Fix implicit it in .map { }, .join { }, .branch { } operations

Sentieon env block fixes (5 test configs):

  • Replace env { VAR = "$VAR" } syntax with env.VAR = System.getenv('VAR') syntax

Sentieon license variable usage:

  • sentieon/rsemcalculateexpression/main.nf: Add $sentieonLicense to script (was defined but never used)
  • sentieon/staralign/main.nf: Add $sentieonLicense to script (was defined but never used)

Unused variable removal in stubs:

  • Various modules: Remove unused variable definitions in stub blocks

Topics Version Output Conversion (16 modules):

Converted from path "versions.yml", emit: versions to tuple val("${task.process}"), val('tool'), eval('version_cmd'), topic: versions, emit: versions_tool:

  • bbmap/bbsplit
  • bracken/bracken
  • custom/catadditionalfasta
  • gffread
  • gunzip
  • hisat2/extractsplicesites
  • kraken2/kraken2
  • rsem/preparereference
  • salmon/quant
  • sentieon/rsemcalculateexpression
  • sentieon/rsempreparereference
  • sentieon/staralign
  • sortmerna
  • sylph/profile
  • ucsc/bedclip
  • ucsc/bedgraphtobigwig

Subworkflows fixed (14 files):

  • bam_dedup_stats_samtools_umicollapse
  • bam_dedup_stats_samtools_umitools
  • bam_dedup_umi
  • bam_markduplicates_picard
  • bam_sort_stats_samtools
  • bam_stats_samtools
  • bedgraph_bedclip_bedgraphtobigwig
  • fastq_align_hisat2
  • fastq_fastqc_umitools_fastp
  • fastq_fastqc_umitools_trimgalore
  • fastq_qc_trim_filter_setstrandedness
  • fastq_remove_rrna
  • fastq_subsample_fq_salmon
  • quantify_pseudo_alignment

These changes ensure compliance with Nextflow 25 strict syntax.

Snapshot Updates (unrelated to strict syntax):

Some test snapshots were updated due to minor output changes in tools - these tests likely haven't run in a while and the snapshots were stale:

  • antismash/antismash: Updated antismash.js md5 hash
  • emboss/seqret: Updated test.gff md5 hash
  • kofamscan: Updated test.kofamscan.txt md5 hash
  • ultra/pipeline: Added new sorted field to JSON output

Additional Fixes:

  • custom/catadditionalfasta: Fixed missing versions.yml creation in Python template after topics revert
  • sentieon/rsemcalculateexpression & sentieon/rsempreparereference: Added STAR symlink to stub blocks to enable version detection
  • Various subworkflows: Removed .out.versions references for modules converted to topics, and removed empty version channels where applicable

Test plan

  • Run nextflow lint on modified files (verified locally - all pass)
  • Run CI tests for affected modules
  • Run CI tests for affected subworkflows

🤖 Generated with Claude Code

@pinin4fjords pinin4fjords force-pushed the strict-syntax-fixes-subworkflows branch 2 times, most recently from 592911c to 278a5b8 Compare January 19, 2026 12:38
@pinin4fjords pinin4fjords marked this pull request as draft January 19, 2026 12:48
@pinin4fjords pinin4fjords force-pushed the strict-syntax-fixes-subworkflows branch from 278a5b8 to 851a304 Compare January 19, 2026 12:51
@pinin4fjords pinin4fjords changed the title fix: Nextflow 25 strict syntax compliance for bbmap/bbsplit and sentieon modules fix: Nextflow 25 strict syntax compliance for modules and subworkflows Jan 19, 2026
@pinin4fjords pinin4fjords force-pushed the strict-syntax-fixes-subworkflows branch 4 times, most recently from 4a2cb06 to 9fb7df5 Compare January 19, 2026 14:57
@pinin4fjords pinin4fjords changed the title fix: Nextflow 25 strict syntax compliance for modules and subworkflows fix: Nextflow 25 strict syntax compliance for rnaseq modules and subworkflows Jan 19, 2026
…orkflows

Modules:
- bbmap/bbsplit: Rename closure variable `index` to `idx` to avoid shadowing
- bracken, gunzip, catadditionalfasta, hisat2/extractsplicesites,
  rseqc/readdistribution, rseqc/tin, sentieon/*, sortmerna, sylph/profile:
  Prefix unused variables with `_` or remove them in stubs
- cat/fastq, gffread, rsem/preparereference, salmon/quant,
  sentieon/rsempreparereference, sentieon/staralign, sortmerna,
  trimgalore: Replace implicit `it` with explicit parameter names
- ucsc/bedclip, ucsc/bedgraphtobigwig: Use args variable in command
- sentieon test configs: Replace env {} block with System.getenv()

Convert 16 modules to topics version output:
- bbmap/bbsplit, bracken/bracken, gffread, gunzip, hisat2/extractsplicesites
- kraken2/kraken2, rsem/preparereference, salmon/quant
- sentieon/rsemcalculateexpression, sentieon/rsempreparereference, sentieon/staralign
- sortmerna, sylph/profile, ucsc/bedclip, ucsc/bedgraphtobigwig

Subworkflows:
- All: Replace `Channel.` with `channel.` (lowercase)
- fastq_fastqc_umitools_trimgalore: Fix `reads` shadowing
- fastq_fastqc_umitools_fastp: Prefix unused closure params with `_`
- fastq_qc_trim_filter_setstrandedness: Replace implicit `it`
- fastq_remove_rrna: Replace implicit `it`, prefix unused params
- bam_dedup_umi: Replace implicit `it`
- quantify_pseudo_alignment: Replace implicit `it`
- Remove .out.versions refs for modules now using topics

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@pinin4fjords pinin4fjords force-pushed the strict-syntax-fixes-subworkflows branch from 52e289b to ca2d733 Compare January 19, 2026 16:56
pinin4fjords and others added 14 commits January 19, 2026 17:03
Master already has proper versions.yml creation.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Stubs should just create expected output files without input validation.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
GATK3's multithreading causes JMX errors in container environments.
Setting cpus=1 avoids the issue.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
- gunzip: Add head -1 to extract first line before sed parsing
- kraken2: Add head -1 to extract first line before sed parsing
- sortmerna: Use grep pattern to extract version line directly
  (tool outputs verbose debug info before version number)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Fix meta.yml to use single backslashes to match what Groovy produces
after parsing the main.nf eval command.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
The validation logic is needed for the no_files tests.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Template was reset to master which uses different versions format.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Didn't fix the underlying Java/cgroups v2 compatibility issue.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Helps prevent disk space exhaustion when multiple large container
images (e.g., Sentieon modules) land on the same runner.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
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.

2 participants