Skip to content

Commit 6aa6169

Browse files
authored
Merge pull request #557 from rmzelle/patch-1
Fix typos in nf4_science/genomics/03_modules.md and 04_testing.md
2 parents 182a5c2 + 846eace commit 6aa6169

File tree

4 files changed

+21
-21
lines changed

4 files changed

+21
-21
lines changed

docs/nf4_science/genomics/03_modules.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ include { SAMTOOLS_INDEX } from './modules/samtools/index/main.nf'
116116
process GATK_HAPLOTYPECALLER {
117117
```
118118

119-
You can now run the workflow again, and it should still work the same way as before. If you supply the `-resume` flag, no new should even need to be done:
119+
You can now run the workflow again, and it should still work the same way as before. If you supply the `-resume` flag, no new tasks should even need to be run:
120120

121121
```bash
122122
nextflow run genomics-3.nf -resume

docs/nf4_science/genomics/04_testing.md

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ nf-test generate process modules/samtools/index/main.nf
109109
This creates a file in the same directory as `main.nf`, summarized in the terminal output as follows:
110110

111111
```console title="Output"
112-
Load source file '/workspaces/training/hello-nextflow/hello-nf-test/modules/samtools/index/main.nf'
113-
Wrote process test file '/workspaces/training/hello-nextflow/tests/hello-nf-test/modules/samtools/index/main.nf.test
112+
Load source file '/workspaces/training/nf4-science/genomics/modules/samtools/index/main.nf'
113+
Wrote process test file '/workspaces/training/nf4-science/genomics/tests/modules/samtools/index/main.nf.test
114114

115115
SUCCESS: Generated 1 test files.
116116
```
@@ -431,7 +431,7 @@ Learn how to write tests for other processes in our genomics workflow, using the
431431

432432
## 2. Add tests to a chained process and test for contents
433433

434-
To test `GATK_HAPLOTYPECALLER`, we need to provide the process with the `SAMTOOLS_INDEX` output as an input. We could do that by running the `SAMTOOLS_INDEX`, retrieving its outputs, and storing with the test data for the workflow. That's actually the recommended approach for a polished pipeline, but nf-test provides an alternative approach, using the `setup` method.
434+
To test `GATK_HAPLOTYPECALLER`, we need to provide the process with the `SAMTOOLS_INDEX` output as an input. We could do that by running `SAMTOOLS_INDEX`, retrieving its outputs, and storing them with the test data for the workflow. That's actually the recommended approach for a polished pipeline, but nf-test provides an alternative approach, using the `setup` method.
435435

436436
With the setup method, we can trigger the `SAMTOOLS_INDEX` process as part of the test setup, and then use its output as an input for `GATK_HAPLOTYPECALLER`. This has a cost - we're going to have to run the `SAMTOOLS_INDEX` process every time we run the test for `GATK_HAPLOTYPECALLER`- but maybe we're still developing the workflow and don't want to pre-generate test data we might have to change later. `SAMTOOLS_INDEX` process is also very quick, so maybe the benefits of pre-generating and storing its outputs are negligible. Let's see the setup method works.
437437

@@ -524,7 +524,7 @@ test("Should run without failures") {
524524
_After:_
525525

526526
```groovy title="modules/gatk/haplotypecaller/tests/main.nf.test" linenums="7"
527-
test("Should call son's halotype correctly") {
527+
test("Should call son's haplotype correctly") {
528528
529529
setup {
530530
run("SAMTOOLS_INDEX") {
@@ -575,9 +575,9 @@ https://www.nf-test.com
575575

576576
Test Process GATK_HAPLOTYPECALLER
577577

578-
Test [30247349] 'Should call son's halotype correctly' PASSED (20.002s)
578+
Test [30247349] 'Should call son's haplotype correctly' PASSED (20.002s)
579579
Snapshots:
580-
1 created [Should call son's halotype correctly]
580+
1 created [Should call son's haplotype correctly]
581581

582582

583583
Snapshot Summary:
@@ -606,7 +606,7 @@ https://www.nf-test.com
606606

607607
Test Process GATK_HAPLOTYPECALLER
608608

609-
Test [c847bfae] 'Should call son's halotype correctly' FAILED (19.979s)
609+
Test [c847bfae] 'Should call son's haplotype correctly' FAILED (19.979s)
610610

611611
java.lang.RuntimeException: Different Snapshot:
612612
[ [
@@ -695,7 +695,7 @@ https://www.nf-test.com
695695

696696
Test Process GATK_HAPLOTYPECALLER
697697

698-
Test [c847bfae] 'Should call son's halotype correctly' PASSED (19.33s)
698+
Test [c847bfae] 'Should call son's haplotype correctly' PASSED (19.33s)
699699

700700

701701
SUCCESS: Executed 1 tests in 19.382s
@@ -741,7 +741,7 @@ Add similar tests for the mother and father samples:
741741
}
742742
}
743743
744-
test("Should call father's halotype correctly") {
744+
test("Should call father's haplotype correctly") {
745745
746746
setup {
747747
run("SAMTOOLS_INDEX") {
@@ -793,9 +793,9 @@ https://www.nf-test.com
793793

794794
Test Process GATK_HAPLOTYPECALLER
795795

796-
Test [c847bfae] 'Should call son's halotype correctly' PASSED (19.91s)
797-
Test [44494e9c] 'Should call mother's halotype correctly' PASSED (18.606s)
798-
Test [eb0d1a07] 'Should call father's halotype correctly' PASSED (18.773s)
796+
Test [c847bfae] 'Should call son's haplotype correctly' PASSED (19.91s)
797+
Test [44494e9c] 'Should call mother's haplotype correctly' PASSED (18.606s)
798+
Test [eb0d1a07] 'Should call father's haplotype correctly' PASSED (18.773s)
799799

800800

801801
SUCCESS: Executed 3 tests in 57.348s
@@ -1181,9 +1181,9 @@ https://www.nf-test.com
11811181

11821182
Test Process GATK_HAPLOTYPECALLER
11831183

1184-
Test [c847bfae] 'Should call son's halotype correctly' PASSED (20.951s)
1185-
Test [44494e9c] 'Should call mother's halotype correctly' PASSED (19.155s)
1186-
Test [eb0d1a07] 'Should call father's halotype correctly' PASSED (21.843s)
1184+
Test [c847bfae] 'Should call son's haplotype correctly' PASSED (20.951s)
1185+
Test [44494e9c] 'Should call mother's haplotype correctly' PASSED (19.155s)
1186+
Test [eb0d1a07] 'Should call father's haplotype correctly' PASSED (21.843s)
11871187

11881188
Test Process GATK_JOINTGENOTYPING
11891189

@@ -1205,7 +1205,7 @@ SUCCESS: Executed 8 tests in 167.772s
12051205

12061206
7 tests in 1 command! We spent a long time configuring lots and lots of tests, but when it came to running them it was very quick and easy. You can see how useful this is when maintaining a large pipeline, which could include hundreds of different elements. We spend time writing tests once so we can save time running them many times.
12071207

1208-
Furthermore, we can automate this! imagine tests running every time you or a colleague tries to add new code. This is how we ensure our pipelines maintain a high standard.
1208+
Furthermore, we can automate this! Imagine tests running every time you or a colleague tries to add new code. This is how we ensure our pipelines maintain a high standard.
12091209

12101210
## Takeaway
12111211

nf4-science/genomics/solutions/modules/gatk/haplotypecaller/tests/main.nf.test

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ nextflow_process {
44
script "../main.nf"
55
process "GATK_HAPLOTYPECALLER"
66

7-
test("Should call son's halotype correctly") {
7+
test("Should call son's haplotype correctly") {
88

99
setup {
1010
run("SAMTOOLS_INDEX") {
@@ -39,7 +39,7 @@ nextflow_process {
3939

4040
}
4141

42-
test("Should call mother's halotype correctly") {
42+
test("Should call mother's haplotype correctly") {
4343

4444
setup {
4545
run("SAMTOOLS_INDEX") {
@@ -74,7 +74,7 @@ nextflow_process {
7474
}
7575
}
7676

77-
test("Should call father's halotype correctly") {
77+
test("Should call father's haplotype correctly") {
7878

7979
setup {
8080
run("SAMTOOLS_INDEX") {

nf4-science/genomics/solutions/modules/gatk/haplotypecaller/tests/main.nf.test.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"Should call son's halotype correctly": {
2+
"Should call son's haplotype correctly": {
33
"content": [
44
{
55
"0": [

0 commit comments

Comments
 (0)