-
Notifications
You must be signed in to change notification settings - Fork 248
Add Scripting essentials module #652
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
base: master
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for nextflow-training ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
…/training into groovy-essentials-side-quest
I think this content is awesome, but I have a higher-level objection to the use of "Groovy" at all. The Nextflow language specification was created in part to make it easier to talk about Nextflow as a standalone language. So rather than saying "Nextflow is based on Groovy but we promise it's not that bad!" we can instead say "Nextflow is a programming language that runs on the JVM". It also gets confusing when talking about things like "Nextflow operators" vs "Groovy functions"... well, Nextflow operators are Groovy functions! They have the same syntax and (mostly) the same semantics And it will get more confusing in 25.10 when it becomes possible to write code like this: def sample_ids: List<String> = ['sample_001', 'sample_002', 'sample_003'] Which this tutorial might call "pure Groovy code", but isn't really pure Groovy because it isn't valid Groovy syntax. The distinction between Nextflow and Groovy will become less and less useful over time as the languages diverge futher I think the distinction you are usually getting at with "Nextflow constructs" vs "Groovy constructs" is dataflow logic in the workflow vs "regular" logic (procedural logic?) in places like an operator closure. So I would describe it in those terms instead of Nextflow vs Groovy Similarly, on the section about In fact, I think you should be able to link any piece of syntax or standard library to the Nextflow reference docs -- and if you can't find it, tell me and I will add it. I want to have the Nextflow language fully specified within our docs so that we don't have to mention Groovy at all. I mean it |
Thanks for the feedback @bentsherman, really useful. I'll re-pitch and get you to re-review if you get time. Edit: done, with Claude's help. I've used 'scripting' as the counterpoint to 'dataflow', because we're not necessarily talking to a crowd to whom 'procedural' makes enough sense. See what you think. |
Address reviewer feedback to reframe content away from "Nextflow vs Groovy" and toward presenting Nextflow as a standalone language. Major changes: - Renamed from groovy_essentials to essential_scripting_patterns - Updated terminology: "dataflow vs scripting" instead of "Nextflow vs Groovy" - Reframed collect example as Channel vs Iterable types in Nextflow standard library - Added historical context about Groovy while emphasizing Nextflow language specification - Updated all code comments and examples to reference Nextflow standard library - Prioritized Nextflow documentation in resources section 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
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.
Left a few suggestions, fixed a few incorrect links.
Try to make sure to follow best practices with Nextflow code examples:
- Use
channel
instead ofChannel
for channel factories - Avoid implicit
it
closure parameter - Use
tuple()
instead of a list when you want to make a tuple
You might have to fight the AI on this since these patterns are historically quite common. Maybe just including the above guidance in your prompt will be enough 🤷
Thanks for putting all of this together. I intend to keep expanding the language reference docs to support these kinds of examples
Co-authored-by: Ben Sherman <[email protected]>
…/training into groovy-essentials-side-quest
Add Essential Nextflow Scripting Patterns side quest
This PR introduces a comprehensive hands-on tutorial that teaches essential Nextflow scripting patterns through practical bioinformatics examples.
Summary
The "Essential Nextflow Scripting Patterns" side quest takes learners on a journey from basic concepts to production-ready patterns, transforming a simple CSV-reading workflow into a sophisticated bioinformatics pipeline step-by-step.
Topics Covered
findAll()
,collectEntries()
, andgroupBy()
Target Audience
Learners who have completed Hello Nextflow or have equivalent experience with basic Nextflow concepts (processes, channels, workflows). Programming experience is helpful but not required—concepts are explained as encountered.
Structure
The tutorial uses a realistic dataset (CSV with biological sample metadata) and evolves a working pipeline through practical challenges, building from fundamentals to advanced production patterns.