Skip to content

Commit 9473edb

Browse files
pinin4fjordsclaude
andauthored
Complete hello nf-core (#672)
* Add claude's take on completing hello nf-core * Fix up link and conclusion * Apply pre-commit formatting fixes to JSON schema Fix JSON indentation in input validation documentation to comply with .editorconfig rules (2 spaces instead of 4). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Add cross-reference to Workflows of Workflows side quest Added a note explaining that composable workflows are covered in depth in the WoW side quest, and clarified why composability is introduced here as a fundamental requirement of nf-core template architecture. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Teach metadata patterns instead of extracting from tuples - Added section explaining metadata maps and why they're used in nf-core - Updated cowpy module to accept and propagate metadata tuples - Modified workflow to pass metadata through instead of extracting files - Added link to metadata side quest for comprehensive coverage - Updated emit block to use named emit channel - Clarified directory requirement for module installation This approach educates users on nf-core patterns rather than teaching workarounds that lose metadata context. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Add ext.args pattern to demonstrate nf-core module conventions - Updated cowpy module to use ext.args instead of direct parameter input - Simplified module interface to only accept metadata tuple and file - Added section explaining ext.args benefits and usage - Showed how to configure ext.args via modules.config - Demonstrated separation of concerns: simple module interface with pipeline-level configuration that references params.character - Emphasized module portability and minimal interfaces This teaches users the nf-core convention for handling optional tool arguments while keeping module interfaces clean and reusable. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Add ext.prefix pattern for configurable output file naming - Updated cowpy module to use ext.prefix for output filename - Changed output from hardcoded "cowpy-${input_file}" to "${prefix}.txt" - Added ext.prefix configuration in modules.config to maintain original naming - Demonstrated flexibility by showing how to customize naming via config - Expanded explanation section to cover both ext.args and ext.prefix - Added note explaining that ext.prefix closures have access to meta - Updated verification section to explain output naming behavior This demonstrates how nf-core modules use ext.prefix to standardize output naming while remaining configurable, completing the coverage of key nf-core module conventions (metadata, ext.args, ext.prefix). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Restructure to teach nf-core patterns incrementally Reorganized content to introduce concepts one at a time: Section 3: Metadata tuples - Updated cowpy to accept metadata tuples - Modified workflow to pass metadata from CAT_CAT to cowpy - Kept character parameter as direct input initially - Focus: Understanding metadata flow Section 4: ext.args pattern - Removed character parameter from module interface - Added ext.args for optional tool arguments - Configured ext.args in modules.config - Updated workflow call to remove character parameter - Focus: Simplifying module interfaces with configuration Section 5: ext.prefix pattern - Added ext.prefix for configurable output naming - Updated output from hardcoded to prefix-based naming - Configured ext.prefix to maintain original naming - Focus: Standardized, configurable file naming This incremental approach allows users to: 1. First understand metadata (building on CAT_CAT example) 2. Then learn ext.args (seeing how to simplify interfaces) 3. Finally add ext.prefix (completing the nf-core patterns) Much more pedagogical than teaching all three concepts simultaneously. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Reorganize into major sections: Use vs Adapt Restructured the document into clearer major sections: Section 1: Use an nf-core module - 1.1-1.3: Find and explore modules - 1.4-1.5: Install and import - 1.6-1.8: Examine interface and understand metadata - 1.9: Wire up CAT_CAT (extracting file for cowpy) - 1.10: Test Section 2: Adapt local modules to nf-core conventions - 2.1: Update cowpy to use metadata tuples - Update module, workflow, and emit block - Test metadata flow - 2.2: Simplify interface with ext.args - Subsections: Update module, Configure, Update workflow, Test - 2.3: Add ext.prefix for output naming - Subsections: Understand, Update module, Configure, Test Section 3: Optional cleanup This structure clearly separates "using existing modules" from "adapting your own modules", making it easier to understand the progression and find specific information. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Remove erroneous '2.2. Verify' heading in section 1 The heading '### 2.2. Verify the module installation' was incorrectly placed in the middle of section 1. Removed it and incorporated the verification steps into section 1.4 'Install and verify'. This fixes the section numbering so section 2 only starts when we begin adapting local modules. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Add explanation of nf-core module naming convention Added a note explaining that nf-core modules follow the 'software/command' naming convention, which clarifies why we have 'cat/cat'. Included examples like 'fastqc/fastqc' and 'samtools/view' to reinforce the pattern. This helps users understand the module structure and how to find modules for their tools of interest. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Break down complex channel operation into separate steps Split the inline map operation into a named channel variable: - Before: cowpy(CAT_CAT.out.file_out.map{ meta, file -> file }, params.character) - After: ch_for_cowpy = CAT_CAT.out.file_out.map{ meta, file -> file } cowpy(ch_for_cowpy, params.character) This makes it easier for beginners to understand: 1. First we extract the file from the tuple 2. Then we pass it to cowpy Also updated the explanation to include both steps. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Use projectDir for test data path and explain why Changed test.config to use ${projectDir}/assets/greetings.csv instead of a relative path 'core-hello/assets/greetings.csv'. Added explanation covering: - projectDir is a Nextflow implicit variable pointing to pipeline root - Using it ensures paths work regardless of execution directory - Importance of absolute paths for test data - nf-core convention of storing small test data in assets/ This teaches users the proper way to reference pipeline-bundled test data and introduces them to Nextflow implicit variables. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * tweaks * final tweaks * Fix highlights * relocate cleanup * Improve hello nf-core module training documentation Multiple improvements to the module training document: - Change variable name from 'meta' to 'cat_meta' to avoid shadowing - Update test section description to focus on cat/cat module, not just tuples - Change all test commands from 'nextflow run core-hello' to 'nextflow run .' since users are already in the pipeline directory - Add verification step in ext.args test to inspect .command.sh and confirm configuration is working, using --character cow to demonstrate - Simplify withName selectors from 'CORE_HELLO:HELLO:cowpy' to just 'cowpy' - Restructure cleanup from major section 3 to subsection 2.4 - Expand Takeaway section to paragraph format matching Part 2 style 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Add section on contributing modules back to nf-core Add section 3 to encourage users to contribute their modules to the nf-core/modules repository. The section covers: - Benefits of contributing (community maintenance, visibility, quality assurance) - High-level workflow with 5 clear steps - Links to comprehensive nf-core documentation and community resources Keeps content concise to avoid duplicating extensive nf-core docs while providing clear guidance and next steps. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Add core-hello-after-modules solution variant Create new solution variant demonstrating Part 3 module training concepts: - Replace collectGreetings with nf-core cat/cat module - Update cowpy to use metadata tuples (tuple val(meta), path(file)) - Implement ext.args pattern for configurable tool arguments - Implement ext.prefix pattern for configurable output naming - Configure module behavior in conf/modules.config This solution shows the complete progression through Part 3, demonstrating: 1. How to install and use nf-core modules 2. Creating metadata maps and tuple channels 3. Adapting local modules to follow nf-core conventions 4. Centralizing module configuration Key changes from core-hello-end: - workflows/hello.nf: Uses CAT_CAT with metadata tuples - modules/local/cowpy.nf: Accepts metadata, uses ext.args/ext.prefix - conf/modules.config: Configures cowpy ext.args and ext.prefix 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Remove test-results from core-hello-after-modules Remove test execution results that were accidentally included in the previous commit. Test results should not be tracked in version control. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Fix formatting in cat module test snapshot Remove trailing whitespace from main.nf.test.snap to pass pre-commit hooks. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Add missing newline at end of cat module test snapshot Add newline at end of file to pass end-of-file-fixer pre-commit hook. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Add tip about using core-hello-end as starting point Add a tip box at the beginning of Part 3 to let users know they can use the core-hello-end solution as a starting point if they didn't complete Part 2. This provides a clean slate for users who want to skip ahead or start fresh. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Fix Part 4 input validation documentation Fix critical issue in Part 4 where the documentation showed incorrect code for accessing validated samplesheet data. Changes: 1. Fix samplesheet data access from `row.greeting` to `row[0]` - samplesheetToList returns ArrayList of ArrayLists, not maps - Accessing by property name fails with "No such property" error - Must access by column index for single-column CSVs 2. Update validation test example to show actual error output - Changed from "empty greeting" to "whitespace-only greeting" - Updated error message to match actual nf-schema output - Error reports "Missing required field(s): greeting" 3. Add note about empty line behavior in CSV parsing - Empty lines are filtered during CSV parsing - Only whitespace-only lines trigger validation errors Verified by working through Part 4 with core-hello-after-modules solution. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Add core-hello-complete solution (after Part 4) Add complete solution directory representing the finished state after Part 4 (input validation). This solution includes all changes from Parts 2, 3, and 4: Part 2 (Rewrite for nf-core): - nf-core pipeline template structure - Proper module organization (local modules) - Configuration files and profiles Part 3 (Add modules): - nf-core cat/cat module replacing collectGreetings - Updated cowpy module with metadata tuples - ext.args and ext.prefix patterns - Module configuration in conf/modules.config Part 4 (Input validation): - Updated assets/schema_input.json for greetings format - Added header to assets/greetings.csv - Implemented samplesheetToList in utils_nfcore_hello_pipeline - Schema-based validation with proper error messages - Uses row[0] for accessing single-column CSV data This solution has been tested and verified to work correctly with: - Valid input (pipeline completes successfully) - Invalid input (validation errors caught with clear messages) Users can use this as a reference for the complete hello nf-core pipeline or as a starting point for further customization. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Fix solution config * Rename solution directories to match training parts Rename solution directories to clearly indicate which training part they represent: - core-hello-end → core-hello-part2 (after Part 2: nf-core structure) - core-hello-after-modules → core-hello-part3 (after Part 3: nf-core modules) - core-hello-complete → core-hello-part4 (after Part 4: input validation) Also updated documentation reference in Part 3 to use new directory name. This makes it clearer for users which solution corresponds to which stage of the training. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Add starting point tip to Part 4 introduction Update Part 4 intro to: - Reference Part 3 as prerequisite (not Part 2) - Add tip box with instructions to use core-hello-part3 solution as starting point - Make it consistent with Part 3's intro tip box This helps users who want to skip ahead or start fresh with Part 4. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Major restructuring of Part 4: Input validation - Add motivational introduction showing validation benefits with before/after examples - Clearly separate parameter validation (Section 2) from input data validation (Section 3) - Restructure from 5 confusing sections to 4 well-organized sections with clear progression - Add Section 4 on validation best practices with common patterns and tools - Include mermaid diagram showing validation workflow and when it occurs - Add comprehensive examples from nf-core website documentation - Update example output to show CAT_CAT instead of collectGreetings (matching Part 3 solution) - Include note about empty lines being filtered during CSV parsing - Update conclusion to reflect what was actually learned throughout the course - Add core-hello-part4 solution directory with all validation implementation All documentation tested and verified to work correctly. Addresses user feedback that Part 4 was "hard to follow" and needed better motivation and clarity about the two types of validation (parameters vs input data). * prettier * Fix JSON formatting in schema_input.json Pre-commit hooks adjusted indentation from 2-space to 4-space to match repository standards. * Fix nested list rendering in Two types of validation section Add missing blank line before nested bullet points to ensure proper markdown rendering. * Enable Mermaid diagram support in MkDocs Add custom_fences configuration to pymdownx.superfences to enable rendering of Mermaid diagrams in the documentation. This allows the validation workflow diagram in Part 4 (section 1.3) to render properly. * Fix nested list indentation in Two types of validation section Change sub-bullet indentation from 3 to 4 spaces to ensure proper nested list rendering. This should display as 2 main items with sub-bullets under each, not a flat 10-point list. * Remove best practices section from Part 4 Section 4 was a disconnected list of reference material that broke the hands-on tutorial narrative. Replaced with a brief 'Further reading' tip that points to nf-schema documentation for advanced features. The tutorial now flows cleanly from theory to hands-on implementation to conclusion, maintaining the narrative style throughout. * Update nextflow versions * Update Section 3.6 with genuine Nextflow outputs Replace placeholder outputs with real command outputs from running: - Valid input test: Shows successful validation and pipeline execution - Invalid input test: Shows validation error with clear error message Also clarified that the invalid CSV has three spaces (not empty line) to match the actual test case. * Consolidate prerequisite and starting point notes Combined separate note and tip boxes into a single note box for consistency. This reduces visual clutter while maintaining all the important information about prerequisites and how to start fresh. Applied to both Part 3 and Part 4 for consistency. * Prettier * Commit solutions * Address PR feedback: Remove local publishDir from cowpy module Addresses #672 (comment) The reviewer noted that the documentation was missing a reference to updating the publishDir configuration. The tutorial was teaching users to adapt modules to nf-core conventions but left a local publishDir directive in the cowpy module, resulting in two separate publishing locations (one local, one centralized), which is not best practice. Changes: - Added explanation in docs about why to remove local publishDir - Added note box highlighting benefits of centralized configuration - Removed publishDir from cowpy module examples in section 2.2 and 2.3 - Updated solution files (part3 and part4) to remove local publishDir - Updated key changes sections to include publishDir removal The documentation now properly teaches users to follow nf-core conventions by centralizing all publishing configuration in modules.config. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Add links to nf-core modules repository and website Addresses #672 (comment) Added links to: - nf-core/modules GitHub repository - nf-co.re/modules website for browsing available modules This helps users quickly access the module catalog and repository. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Add concrete examples of metadata maps Addresses #672 (comment) Added two examples to illustrate what metadata maps look like: 1. A typical example with multiple fields (sample1, single_end, strandedness) 2. The simple example used in this tutorial (just id with batch name) This helps users understand the structure and flexibility of metadata maps before they start using them in the workflow. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Remove count functionality from collectGreetings workflow Addresses #672 (comment) The count functionality (collectGreetings.out.count.view) was carried over from Hello Nextflow but doesn't add value to the Hello nf-core tutorial. It only adds noise and complexity. Changes: - Removed count output from collectGreetings module in all solutions (part2, part3, part4) - Removed count.view line from documentation "Before" example - Simplified the list of changes to remove count-related explanation - Updated collectGreetings interface example to remove count output This simplifies the workflow and focuses on the core nf-core concepts without unnecessary Hello Nextflow legacy features. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Break down section 1.9 into incremental steps Addresses #672 (comment) The reviewer noted that section 1.9 had too much going on at once, making it easy to miss important details like how the metadata map was created. Changes: - Restructured section 1.9 into 4 clear incremental steps - Step 1: Create a metadata map - Step 2: Create a channel with metadata tuples - Step 3: Call CAT_CAT - Step 4: Update cowpy to use CAT_CAT output - Each step shows before/after diffs highlighting only the changes for that step - Added explanations after each step to clarify what's happening This makes it much easier to follow the workflow changes and understand how to work with metadata when integrating nf-core modules. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Fix highlights * Split Part 3 into two separate parts for better learning Addresses #672 (comment) Split the large Part 3 "Add an existing nf-core module" into two focused parts: **Part 3: Use an nf-core module** (new 03_use_module.md) - Find, install, and integrate nf-core modules - Understand metadata maps - Wire up CAT_CAT module - Ends with CAT_CAT integrated, cowpy not yet adapted **Part 4: Adapt local modules to nf-core conventions** (new 04_adapt_module.md) - Update cowpy to use metadata tuples - Implement ext.args pattern - Implement ext.prefix pattern - Remove local publishDir directives - Contributing modules section **Part 5: Input validation** (renamed from old Part 4) - Updated all references and prerequisites Changes: - Created 03_use_module.md from section 1 of old 03_add_module.md - Created 04_adapt_module.md from section 2-3 of old 03_add_module.md - Renamed 04_input_validation.md to 05_input_validation.md - Updated Part 5 to reference Part 4 as prerequisite - Updated Part 2 link to point to new Part 3 - Fixed core-hello-part3 solution to match end of Part 3 (cowpy not adapted yet) - core-hello-part4 solution already correct (cowpy fully adapted) - Tested both solutions - both work correctly - Deleted old 03_add_module.md Benefits: - Each part has single, clear focus - Reduces cognitive load - Natural stopping point after Part 3 for users who just need to use modules - Easier to reference and navigate - Addresses reviewer feedback about sections being too complex 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Remove old combined Part 3 file and renamed Part 4 Complete the file reorganization by removing the old files: - 03_add_module.md (replaced by 03_use_module.md and 04_adapt_module.md) - 04_input_validation.md (renamed to 05_input_validation.md) These were moved/split in the previous commit but the deletions weren't staged. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Remove accidentally committed test results from part3 solution Test results should not be committed to the repository. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Fix heading numbering in split Part 3 and Part 4 Removed subsection numbers from h3 headings to avoid markdown linting errors about heading level mismatches. The linter expects numbered headings to match their heading level (e.g., "### 1." suggests h2 but is h3). Also fixed section numbering in Part 4 - changed "## 3. Contributing" to "## 2. Contributing" since it's now the second main section. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Fix heading structure in Parts 3 and 4 to match Parts 1 and 2 Updated heading numbering to be consistent with Parts 1 and 2: - Part 3: Added "## 1. Use an nf-core module" with subsections 1.1-1.10 - Part 4: Added "## 1. Adapt local modules" with subsections 1.1-1.4 - Part 4: Section 2 already numbered correctly (Contributing) - Removed duplicate bullet list in Part 4 intro This matches the style used throughout the training materials where each part has numbered h2 sections (## 1., ## 2.) and numbered h3 subsections (### 1.1., ### 1.2., etc.). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * prettier * Update mkdocs.yml navigation for split Part 3 and Part 4 Updated the Hello nf-core navigation to reflect the new file structure: - 03_add_module.md → 03_use_module.md - Added new 04_adapt_module.md - 04_input_validation.md → 05_input_validation.md This fixes the navigation so Parts 3, 4, and 5 now appear correctly in the site menu. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Add nf-core modules create workflow to Part 4 Added section 2.1 explaining the nf-core modules create command and how it generates properly structured modules from the start. This clarifies that while we taught manual adaptation for learning, in practice you'd use the nf-core tooling. Changes: - New section 2.1: "Using nf-core modules create" - Shows the command and what structure it generates - Displays example generated code with all patterns included - Explains this is the real-world workflow - Updated section 2.2: "Contributing modules back to nf-core" - Streamlined contributing workflow to reference detailed guides - Updated Takeaway to mention nf-core tooling This addresses the need to show proper module creation workflow while explaining why we taught manual adaptation first (educational purposes). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> * Clarify that schema validation uses nextflow.config as base Addresses PR feedback about making it clear that the schema uses nextflow.config for parameter definitions and doesn't pick up params declarations from other scripts. * Add explanations about Nextflow plugins - Add note box explaining what Nextflow plugins are and how they extend the language - Show that plugins are installed via plugins{} block in nextflow.config - Explain the include syntax for importing from plugins - Clarify plugin installation in parameter validation note Addresses PR feedback about explaining plugins and their installation. * Make grep more specific for cat/cat module search Change 'grep cat' to 'grep cat/cat' to avoid matching unrelated strings containing 'cat' (like concatenate, application, etc.). * Highlight key interface differences in collectGreetings comparison - Add syntax highlighting to input parameters (path and val batch_name) and output line to make differences easy to spot - Clarify bullet points to be more specific about the differences between CAT_CAT and collectGreetings interfaces * Update docs to match current nf-core template structure - Make grep more specific (grep 'cat/cat' instead of grep cat) to avoid matching unrelated strings - Update import structure in utils_nfcore_hello_pipeline to match current template: - Changed comment to 'functionality specific to the core/hello pipeline' - Added section header block with tildes - Removed Java import statements (org.yaml.snakeyaml.Yaml, etc.) - Added paramsHelp and completionSummary includes - Reordered includes to match current template structure Addresses PR feedback about grep specificity and outdated import format. * Remove unnecessary Before/After for samplesheetToList import The samplesheetToList function is already included in the nf-core template by default, so we don't need to show adding it. Instead, just highlight that it's already there in the imports section. Addresses PR comment that this inclusion is not necessary to add. * Make invalid input test more robust with column name mismatch Instead of testing with empty lines (which get filtered by CSV parser), test schema validation with a column name mismatch ('message' instead of 'greeting'). This provides a more reliable test that will always catch the validation error. Updated the expected error output and explanation to match the new test. Addresses PR comment thread about empty lines passing validation. * Fix parameter validation test commands - Change 'nextflow run core-hello' to 'nextflow run .' - Add --validationSchemaIgnoreParams input flag to skip input data validation since the input schema hasn't been configured yet - Add explanatory note about why we skip input validation at this stage This prevents the test from failing with the default schema expecting genomics fields (fastq_1, sample, etc.). Addresses PR comments about test command failing due to premature samplesheet validation. * Add warning about schema validation error for input parameter Add a warning box explaining that users may see a confusing error if they run 'nf-core pipelines schema build' before configuring the input parameter: - The schema includes 'input' but it's not in nextflow.config - Explain this is because we're using --input as a command-line argument - Note that the error can be safely ignored at this stage This prevents confusion for eager users who run the command before continuing with the tutorial. Addresses PR comment about confusing schema validation message. * Remove unnecessary path prefix from grep command Change 'grep ... core-hello/nextflow_schema.json' to just 'grep ... nextflow_schema.json' since we're already working from within the core-hello directory. Applies PR suggestion for cleaner command. * Prettier * Fix critical path and naming inconsistencies Part 2 fixes: - Change hello_nf-core to hello-nf-core (underscore to hyphen) - Change config/ to conf/ in all file path references Part 5 fixes: - Remove core-hello/ prefix from file paths (cat assets/greetings.csv) - Update schema_input.json references to use relative paths - Users are already in core-hello directory per instructions These were factual errors that would cause confusion or failures when following the tutorial. * Update nf-core tools version to 3.4.1 in hello nf-core docs Updated version references from 3.2.1 to 3.4.1 in: - docs/hello_nf-core/00_orientation.md (warning box) - docs/hello_nf-core/02_rewrite_hello.md (console output example) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]> --------- Co-authored-by: Claude <[email protected]>
1 parent aa3b060 commit 9473edb

File tree

142 files changed

+8137
-143
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

142 files changed

+8137
-143
lines changed

docs/hello_nf-core/00_orientation.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ If you have not yet done so, please go through the [Environment Setup](../../env
99

1010
!!! warning
1111

12-
This training is designed for nf-core tools version 3.2.1, which should be the version installed in the codespace. If you use a different version of nf-core tooling you may have difficulty following along.
12+
This training is designed for nf-core tools version 3.4.1, which should be the version installed in the codespace. If you use a different version of nf-core tooling you may have difficulty following along.
1313

1414
You can check what version is installed using the command`nf-core --version`.
1515

@@ -56,9 +56,13 @@ If you run this inside `hello-nf-core`, you should see the following output:
5656
│ ├── modules
5757
│ └── nextflow.config
5858
└── solutions
59-
└── composable-hello
59+
├── composable-hello
60+
├── core-hello-part2
61+
├── core-hello-part3
62+
├── core-hello-part4
63+
└── core-hello-start
6064

61-
4 directories, 3 files
65+
8 directories, 3 files
6266
```
6367

6468
**Here's a summary of what you should know to get started:**

docs/hello_nf-core/02_rewrite_hello.md

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ First, we create the scaffold for the new pipeline.
2020

2121
!!! note
2222

23-
Make sure you are in the `hello_nf-core` directory in your terminal.
23+
Make sure you are in the `hello-nf-core` directory in your terminal.
2424

2525
### 1.1. Run the template-based pipeline creation tool
2626

@@ -72,7 +72,7 @@ Once the TUI closes, you should see the following console output.
7272
| \| | \__, \__/ | \ |___ \`-._,-`-,
7373
`._,._,'
7474

75-
nf-core/tools version 3.2.1 - https://nf-co.re
75+
nf-core/tools version 3.4.1 - https://nf-co.re
7676

7777

7878
INFO Launching interactive nf-core pipeline creation tool.
@@ -260,6 +260,10 @@ Compared to a basic Nextflow workflow like the one developed in Hello Nextflow,
260260

261261
These are optional features of Nextflow that make the workflow **composable**, meaning that it can be called from within another workflow.
262262

263+
!!! note "Composable workflows in depth"
264+
265+
The [Workflows of Workflows](../side_quests/workflows_of_workflows) side quest explores workflow composition in much greater depth, including how to compose multiple workflows together and manage complex data flows between them. We're introducing composability here because it's a fundamental requirement of the nf-core template architecture, which uses nested workflows to organize pipeline initialization, the main analysis workflow, and completion tasks into separate, reusable components.
266+
263267
We are going to need to plug the relevant logic from our workflow of interest into that structure.
264268
The first step for that is to make our original workflow composable.
265269

@@ -1133,7 +1137,7 @@ Now we can update the `test.config` file as follows:
11331137
config_profile_description = 'Minimal test dataset to check pipeline function'
11341138

11351139
// Input data
1136-
input = 'core-hello/assets/greetings.csv'
1140+
input = "${projectDir}/assets/greetings.csv"
11371141

11381142
// Other parameters
11391143
batch = 'test'
@@ -1143,7 +1147,7 @@ Now we can update the `test.config` file as follows:
11431147

11441148
=== "Before"
11451149

1146-
```groovy title="core-hello/config/test.config" linenums="21"
1150+
```groovy title="core-hello/conf/test.config" linenums="21"
11471151
params {
11481152
config_profile_name = 'Test profile'
11491153
config_profile_description = 'Minimal test dataset to check pipeline function'
@@ -1155,11 +1159,17 @@ Now we can update the `test.config` file as follows:
11551159
}
11561160
```
11571161

1162+
Key points:
1163+
1164+
- **Using `${projectDir}`**: This is a Nextflow implicit variable that points to the directory where the main workflow script is located (the pipeline root). Using it ensures the path works regardless of where the pipeline is run from.
1165+
- **Absolute paths**: By using `${projectDir}`, we create an absolute path, which is important for test data that ships with the pipeline.
1166+
- **Test data location**: nf-core pipelines typically store test data in the `assets/` directory within the pipeline repository for small test files, or reference external test datasets for larger files.
1167+
11581168
And while we're at it, let's lower the default resource limitations:
11591169

11601170
=== "After"
11611171

1162-
```groovy title="core-hello/config/test.config" linenums="13"
1172+
```groovy title="core-hello/conf/test.config" linenums="13"
11631173
process {
11641174
resourceLimits = [
11651175
cpus: 2,
@@ -1171,7 +1181,7 @@ And while we're at it, let's lower the default resource limitations:
11711181

11721182
=== "Before"
11731183

1174-
```groovy title="core-hello/config/test.config" linenums="13"
1184+
```groovy title="core-hello/conf/test.config" linenums="13"
11751185
process {
11761186
resourceLimits = [
11771187
cpus: 4,
@@ -1295,4 +1305,4 @@ You know how to convert a regular Nextflow pipeline into an nf-core style pipeli
12951305

12961306
### What's next?
12971307

1298-
Take a big break, that was hard work! Your brain deserves to chill out and you could probably use some hydration and a bit of stretching. When you're ready, move on to the next section to learn how to add an nf-core module to an existing nf-core style pipeline. (COMING SOON)
1308+
Take a break, that was hard work! When you're ready, move on to [Part 3: Use an nf-core module](./03_use_module.md) to learn how to leverage community-maintained modules from the nf-core/modules repository.

docs/hello_nf-core/03_add_module.md

Lines changed: 0 additions & 63 deletions
This file was deleted.

0 commit comments

Comments
 (0)