@@ -202,28 +202,32 @@ For output publishing, nf-core pipelines centralize control at the workflow leve
202202Currently, our ` cowpy ` module has ` publishDir 'results', mode: 'copy' ` which hardcodes the output location.
203203In nf-core pipelines, publishing is instead configured in ` conf/modules.config ` .
204204
205- The nf-core template includes a ** default publishDir configuration** that applies to all processes:
206-
207- ``` groovy
208- process {
209- publishDir = [
210- path: { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" },
211- mode: params.publish_dir_mode,
212- saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
213- ]
214- }
215- ```
216-
217- This default automatically publishes outputs to ` ${params.outdir}/<process_name>/ ` for every process.
218- Individual processes can customize their publishing using ` withName: ` blocks in the same config file.
219-
220205Benefits of this approach:
221206
222207- ** Single source of truth** : All publishing configuration lives in ` modules.config `
223208- ** Useful default** : Processes work out-of-the-box without per-module configuration
224209- ** Easy customization** : Override publishing behavior in config, not in module code
225210- ** Portable modules** : Modules don't hardcode output locations
226211
212+ !!! note "Default publishDir configuration"
213+
214+ The nf-core template includes a default publishDir configuration that applies to all processes:
215+
216+ ```groovy
217+ process {
218+ publishDir = [
219+ path: { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" },
220+ mode: params.publish_dir_mode,
221+ saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
222+ ]
223+ }
224+ ```
225+
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.
228+
229+ For more details, see the [nf-core modules specifications](https://nf-co.re/docs/guidelines/components/modules).
230+
227231#### 1.2.3. Update the module
228232
229233Now let's update the cowpy module to use ` ext.args ` and remove the local ` publishDir ` .
0 commit comments