Update Hello Nextflow training to use new output syntax (Nextflow 25.10.0) - #685
Closed
pinin4fjords wants to merge 17 commits into
Closed
pinin4fjords wants to merge 17 commits into
pinin4fjords wants to merge 17 commits into
Conversation
…10.0)
This commit modernizes the Hello Nextflow training materials to teach the new
`publish:` and `output {}` syntax introduced in Nextflow 24.04+ and finalized
in 25.10.0, while maintaining context about the legacy `publishDir` directive.
## Changes
### Documentation (6 files)
- Updated all English lesson files to teach workflow outputs as primary approach
- Added new section explaining workflow outputs vs legacy publishDir
- Updated all version strings from 25.04.3 to 25.10.0 (34 occurrences)
- Fixed output path from `path 'results'` to `path '.'` to avoid nested directories
- Corrected default publish mode documentation (symlinks, not copies)
### Example Scripts (3 files)
- Migrated hello-world.nf, hello-channels.nf, hello-workflow.nf
- Added `publish:` sections to workflows
- Added `output {}` blocks with correct path syntax
- Removed all `publishDir` directives from processes
### Solution Files (14 workflow + 5 module files)
- Updated all solution workflows to use new output syntax
- Removed `publishDir` from all module files
- Ensured all solutions follow modern Nextflow patterns
### Devcontainer Configs (3 files)
- Updated NXF_VER from 25.04.3 to 25.10.0 in all devcontainer configs
- Ensures consistent Nextflow version across development environments
## Testing
- ✅ Tested hello-world.nf: outputs published correctly
- ✅ Tested hello-channels.nf: single greeting published
- ✅ Tested hello-workflow.nf: multiple outputs published correctly
- All tests passed with Nextflow 25.10.0
## Benefits
- Students learn modern Nextflow syntax first
- Clear migration path shown from legacy to new syntax
- Centralized output management at workflow level
- Aligned with Nextflow's future direction
- All examples tested and verified working
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
✅ Deploy Preview for nextflow-training ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Section 4.1.3 was showing sayHello() without assigning to ch_output, which was inconsistent with the workflow outputs pattern taught in section 3.1. Updated both 'After' and 'Before' code blocks to include ch_output assignment for consistency. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Updated code examples to consistently show ch_output assignment when calling sayHello(), maintaining consistency with the pattern taught in lesson 01 section 3.1. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Enhanced the explanation in section 1.6 to clearly explain WHY we switch from using sayHello.out notation to named channel assignments (ch_hello, ch_upper). This helps students understand that named channels are needed for the publish section and are generally cleaner when working with workflow outputs. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Updated hello-modules-4.nf and hello-containers-2.nf to use consistent
workflow patterns:
- Changed from .out notation to named channel assignments
- Added publish: and output {} blocks
- Ensures all solution files follow the same pattern as teaching materials
Tested: hello-modules-4.nf runs successfully and publishes outputs correctly
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>
Added main: sections to all workflows that have publish: blocks to comply with Nextflow linter requirements. This affects: - Documentation examples in 01_hello_world.md and 03_hello_workflow.md - Main example scripts: hello-channels.nf, hello-workflow.nf - All solution files in 1-hello-world, 2-hello-channels, 3-hello-workflow, 4-hello-modules, and 5-hello-containers directories The hello-world.nf starter file remains unchanged as it represents the initial state before students add publishing. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Reframed the publishDir explanation to introduce it as legacy syntax that readers will encounter when working with existing pipelines, rather than assuming prior knowledge. The new structure: 1. Introduces publishDir as the older approach 2. Shows code example and explains what it does 3. Contrasts with modern workflow outputs approach 4. Emphasizes importance of understanding both for legacy code This helps learners understand publishDir when they encounter it in existing Nextflow pipelines and nf-core modules. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
…riables Remove intermediate variables (ch_output, ch_hello, ch_upper, ch_collected) across all Hello Nextflow parts (1-6) for consistency and cleaner code. Changes by part: Part 1 (Hello World): - Remove ch_output intermediate variable from solutions - Use direct .out syntax: greetings = sayHello.out - Add note about workflow.output.mode = 'copy' configuration Part 2 (Hello Channels): - Fix documentation showing incorrect ch_output usage - Add missing main: sections to code examples - Remove intermediate variables from all 4 solution files - Replace $it with explicit variable names per docs guidance - Clean up leftover greetings_array variable Part 3 (Hello Workflow): - Fix incorrect documentation explanation about intermediate variables - Remove ch_hello, ch_upper, ch_collected from all solutions - Use .out syntax: sayHello.out, convertToUpper.out, collectGreetings.out - Use named outputs: collectGreetings.out.outfile, collectGreetings.out.count - Update hello-modules.nf starter to match Part 3 final state Part 4 (Hello Modules): - Remove intermediate variables from all 3 solution files - Use consistent .out syntax throughout Part 5 (Hello Containers): - Remove intermediate variables including ch_cowpy - Use .out syntax: cowpy.out Part 6 (Hello Config): - No workflow code changes needed (config-only) Unified approach: - Processes called without assignment: sayHello(greeting_ch) - Direct .out usage in publish: processName.out - Named outputs: processName.out.name - Consistent main: and publish: structure - Modern workflow outputs (no publishDir in starters) Fixes consistency issues across 22 files (3 docs, 19 code files) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Add missing publish: blocks to code examples in sections 2.3.1, 2.4.1, 2.4.2, 3.2.2, and 4.2 that were previously showing incomplete workflow code (ending with }). Section 4.2 changes: - Update heading: "Report the output and update publishing" - Add explanation about updating publish block with named output - Highlight line 10 (collected = collectGreetings.out.outfile) - Shows progression from publishing just greetings/uppercase to including the collected output using the named output syntax All code examples now consistently show the full workflow structure with main: and publish: sections throughout the progression. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Update section 0 (Warmup): - Show complete initial config file with both docker.enabled and workflow.output.mode settings - Add explanation of workflow.output.mode: 'copy' vs 'symlink' - Make connection to Part 5 (docker) and publishing covered in Part 1 Update section 1.1: - Include workflow.output.mode in both Before/After config examples - Maintains consistency as students modify config throughout tutorial This completes the loop: - Part 1: Mentions workflow.output.mode is configured (forward reference) - Part 6: Shows and explains the actual config setting 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
vdauwera
reviewed
Nov 5, 2025
|
|
||
| output { | ||
| greetings { | ||
| path '.' |
Collaborator
There was a problem hiding this comment.
Question -- My understanding is that you can just leave the curly braces empty (ie greetings { } ) unless you wanted to override or customize the output location, is that correct? If so, are you specifying path '.' to show explicitly how one would write the path to modify the location?
Asking because I'm trying to decide what to do for the nf4science template; and unless there's a reason to do otherwise I'd like that to be consistent with how we teach it in Hello.
Collaborator
Author
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
This PR modernizes the Hello Nextflow training materials to teach the new
publish:andoutput {}syntax (finalized in Nextflow 25.10.0) as the primary approach, while maintaining context about the legacypublishDirdirective.Changes Overview
📚 Documentation Updates (6 English lesson files)
publish:andoutput {}as the primary methodpublishDirfor understanding existing codebasespath 'results'topath '.'to avoid nested directories🔧 Example Scripts (3 files)
hello-world.nf,hello-channels.nf,hello-workflow.nfto new syntaxpublish:sections andoutput {}blockspublishDirdirectives✅ Solution Files (19 files total)
publishDirdirectives removed🐳 Devcontainer Configs (3 files)
NXF_VERto25.10.0across all environmentsTesting
All example scripts have been tested and verified working:
Benefits
Files Modified
Total: 31 files modified
Breaking Changes
None - this only affects training materials, not production code.
Related Documentation
🤖 Generated with Claude Code