Skip to content

Commit e5301ca

Browse files
pinin4fjordsclaude
andcommitted
Improve publishDir configuration explanation
Expand the note box to explain the three parts of the default publishDir configuration: path (with workflow hierarchy explanation), mode, and saveAs. Acknowledge the complexity upfront and provide concrete example of SAMTOOLS_SORT -> samtools/. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent 659e075 commit e5301ca

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

docs/hello_nf-core/04_make_module.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,13 @@ Benefits of this approach:
223223
}
224224
```
225225

226-
This default automatically publishes outputs to `${params.outdir}/<process_name>/` for every process.
227-
Individual processes can customize their publishing using `withName:` blocks in the same config file.
226+
This looks complicated, but it breaks down into three parts:
227+
228+
- **path**: Determines the output directory based on the process name. When processes run, their full name includes the workflow hierarchy (like `CORE_HELLO:HELLO:SAMTOOLS_SORT`). The `tokenize` operations strip away that hierarchy to get just the process name, then take the first part before any underscore, and convert it to lowercase. So `SAMTOOLS_SORT` would publish to `${params.outdir}/samtools/`.
229+
- **mode**: Controls how files are published (copy, symlink, etc.), configurable via the `params.publish_dir_mode` parameter.
230+
- **saveAs**: Filters which files to publish. This example excludes `versions.yml` files by returning `null` for them, preventing them from being published.
231+
232+
Individual processes can override this default using `withName:` blocks in the same config file.
228233

229234
For more details, see the [nf-core modules specifications](https://nf-co.re/docs/guidelines/components/modules).
230235

0 commit comments

Comments
 (0)