You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/advanced/configuration.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,8 +4,8 @@ This is an aspect of Nextflow that can be confusing. There are multiple ways of
4
4
5
5
This gives us two complications:
6
6
7
-
-At which location should I be loading a configuration value?
8
-
-Given a particular parameter, how do I know where it was set?
7
+
- At which location should I be loading a configuration value?
8
+
- Given a particular parameter, how do I know where it was set?
9
9
10
10
## Precedence
11
11
@@ -152,15 +152,15 @@ The most common use for dynamic process directives is to enable tasks that fail
152
152
153
153
To enable this, two directives are needed:
154
154
155
-
-`maxRetries`
156
-
-`errorStrategy`
155
+
-`maxRetries`
156
+
-`errorStrategy`
157
157
158
158
The `errorStrategy` directive determines what action Nextflow should take in the event of a task failure (a non-zero exit code). The available options are:
159
159
160
-
-`terminate`: Nextflow terminates the execution as soon as an error condition is reported. Pending jobs are killed (default)
161
-
-`finish`: Initiates an orderly pipeline shutdown when an error condition is raised, waiting the completion of any submitted job.
162
-
-`ignore`: Ignores processes execution errors.
163
-
-`retry`: Re-submit for execution a process returning an error condition.
160
+
-`terminate`: Nextflow terminates the execution as soon as an error condition is reported. Pending jobs are killed (default)
161
+
-`finish`: Initiates an orderly pipeline shutdown when an error condition is raised, waiting the completion of any submitted job.
162
+
-`ignore`: Ignores processes execution errors.
163
+
-`retry`: Re-submit for execution a process returning an error condition.
164
164
165
165
If the `errorStrategy` is "retry", then it will retry up to the value of `maxRetries` times.
This will return us six bam files - a tumor and normal pair for each of the three samples:
332
332
333
333
```output title="Final channel output"
334
-
[[id:sampleB, type:normal], merged.genotyped.bam]
335
-
[[id:sampleB, type:tumor], merged.genotyped.bam]
336
-
[[id:sampleA, type:normal], merged.genotyped.bam]
337
-
[[id:sampleA, type:tumor], merged.genotyped.bam]
338
-
[[id:sampleC, type:normal], merged.genotyped.bam]
339
-
[[id:sampleC, type:tumor], merged.genotyped.bam]
334
+
[[id:sampleB, type:normal], merged.genotyped.vcf]
335
+
[[id:sampleB, type:tumor], merged.genotyped.vcf]
336
+
[[id:sampleA, type:normal], merged.genotyped.vcf]
337
+
[[id:sampleA, type:tumor], merged.genotyped.vcf]
338
+
[[id:sampleC, type:normal], merged.genotyped.vcf]
339
+
[[id:sampleC, type:tumor], merged.genotyped.vcf]
340
340
```
341
341
342
342
If we would like to save the output of our `MergeGenotyped` process, we can "publish" the outputs of a process using the `publishDir` directive. We will cover this in more detail on day 2, but try modifying the `MergeGenotyped` process to include the directive:
@@ -346,52 +346,54 @@ process MergeGenotyped {
346
346
publishDir 'results/genotyped'
347
347
348
348
input:
349
-
tuple val(meta), path("input/in_*_.bam")
349
+
tuple val(meta), path("input/in_*_.vcf")
350
350
351
351
output:
352
-
tuple val(meta), path("merged.genotyped.bam")
352
+
tuple val(meta), path("merged.genotyped.vcf")
353
353
354
-
"cat input/*.bam > merged.genotyped.bam"
354
+
"cat input/*.vcf > merged.genotyped.vcf"
355
355
}
356
356
```
357
357
358
358
This will publish all of the files in the `output` block of this process to the `results/genotyped` directory.
359
359
360
360
!!! exercise
361
-
Inspect the contents of the `results` directory. Does this match what you were expecting? What is missing here?
361
+
362
+
Inspect the contents of the `results` directory. Does this match what you were expecting? What is missing here?
362
363
363
364
Can you modify the `MergeGenotyped` process to ensure we are capturing all of the expected output files?
364
365
365
366
??? solution
367
+
366
368
One solution might be to modify the `script` block to ensure that each file has a unique name:
Copy file name to clipboardExpand all lines: docs/advanced/metadata.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,8 +2,8 @@
2
2
3
3
A central challenge in a lot of batch-style computation is how to ensure the metadata describing a file remains with the file. Two good rules for handling metadata in Nextflow are:
4
4
5
-
-Metadata should be explicit - be extremely wary of metadata encoded in filenames
6
-
-Metadata should travel through channels with the data in a tuple element.
5
+
- Metadata should be explicit - be extremely wary of metadata encoded in filenames
6
+
- Metadata should travel through channels with the data in a tuple element.
Copy file name to clipboardExpand all lines: docs/advanced/support.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,6 @@ title: Support
3
3
description: Advanced Nextflow Training Workshop
4
4
---
5
5
6
-
-Nextflow official documentation is available at [www.nextflow.io/docs/latest](https://www.nextflow.io/docs/latest/)
7
-
-If you have questions, ask on the Seqera Community Forum at [http://community.seqera.io/](http://community.seqera.io/)
8
-
-If you want to chat about Nextflow or plugin development, check the Nextflow Slack at [https://www.nextflow.io/slack-invite.html](https://www.nextflow.io/slack-invite.html)
6
+
- Nextflow official documentation is available at [www.nextflow.io/docs/latest](https://www.nextflow.io/docs/latest/)
7
+
- If you have questions, ask on the Seqera Community Forum at [http://community.seqera.io/](http://community.seqera.io/)
8
+
- If you want to chat about Nextflow or plugin development, check the Nextflow Slack at [https://www.nextflow.io/slack-invite.html](https://www.nextflow.io/slack-invite.html)
0 commit comments