Skip to content

Commit a4b6cb0

Browse files
authored
Add back nextflow.config for the subworkflow parameters (#8634)
* Add back nextflow.config for the subworkflow parameters * Update stub test
1 parent 7630e27 commit a4b6cb0

File tree

5 files changed

+121
-24
lines changed

5 files changed

+121
-24
lines changed

subworkflows/nf-core/bam_ngscheckmate/main.nf

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
include { BCFTOOLS_MPILEUP } from '../../../modules/nf-core/bcftools/mpileup/main'
22
include { NGSCHECKMATE_NCM } from '../../../modules/nf-core/ngscheckmate/ncm/main'
3-
3+
// please note this subworkflow requires the options for bcltools_mpileup that are included in the nextflow.config
44
workflow BAM_NGSCHECKMATE {
55

66
take:
@@ -12,7 +12,6 @@ workflow BAM_NGSCHECKMATE {
1212

1313
ch_versions = Channel.empty()
1414
ch_input_bed = ch_input.combine(ch_snp_bed)
15-
// do something to combine the metas?
1615
.map{ input_meta, input_file, _bed_meta, bed_file ->
1716
[input_meta, input_file, bed_file]
1817
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// IMPORTANT: This config file should be included to ensure that the subworkflow works properly.
2+
process {
3+
withName: ".*BAM_NGSCHECKMATE:BCFTOOLS_MPILEUP" {
4+
ext.args2 = '--no-version --ploidy 1 -c'
5+
ext.args3 = '--no-version'
6+
}
7+
withName: ".*BAM_NGSCHECKMATE:NGSCHECKMATE_NCM" {
8+
ext.args = '-V'
9+
}
10+
}

subworkflows/nf-core/bam_ngscheckmate/tests/main.nf.test

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -132,14 +132,7 @@ nextflow_workflow {
132132
then {
133133
assertAll(
134134
{ assert workflow.success},
135-
{ assert snapshot(
136-
file(workflow.out.corr_matrix[0][1]).name,
137-
file(workflow.out.matched[0][1]).name,
138-
file(workflow.out.all[0][1]).name,
139-
// workflow.out.vcf.collect {meta, vcf -> path(vcf).vcf.variantsMD5 },
140-
file(workflow.out.pdf[0][1]).name,
141-
workflow.out.versions
142-
).match()}
135+
{ assert snapshot(workflow.out).match()}
143136
)
144137
}
145138
}

subworkflows/nf-core/bam_ngscheckmate/tests/main.nf.test.snap

Lines changed: 107 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,116 @@
11
{
22
"sarscov2 - bam - stub": {
33
"content": [
4-
"test_bed_output_corr_matrix.txt",
5-
"test_bed_matched.txt",
6-
"test_bed_all.txt",
7-
"test_bed.pdf",
8-
[
9-
"versions.yml:md5,73d5516e0d2dd84537b11e5eabcbe3ab",
10-
"versions.yml:md5,d0f4716ff5035090e3129d50d029e7c8",
11-
"versions.yml:md5,d0f4716ff5035090e3129d50d029e7c8"
12-
]
4+
{
5+
"0": [
6+
[
7+
{
8+
"id": "test_bed"
9+
},
10+
"test_bed_output_corr_matrix.txt:md5,d41d8cd98f00b204e9800998ecf8427e"
11+
]
12+
],
13+
"1": [
14+
[
15+
{
16+
"id": "test_bed"
17+
},
18+
"test_bed_matched.txt:md5,d41d8cd98f00b204e9800998ecf8427e"
19+
]
20+
],
21+
"2": [
22+
[
23+
{
24+
"id": "test_bed"
25+
},
26+
"test_bed_all.txt:md5,d41d8cd98f00b204e9800998ecf8427e"
27+
]
28+
],
29+
"3": [
30+
[
31+
{
32+
"id": "test1"
33+
},
34+
"test1.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940"
35+
],
36+
[
37+
{
38+
"id": "test2"
39+
},
40+
"test2.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940"
41+
]
42+
],
43+
"4": [
44+
[
45+
{
46+
"id": "test_bed"
47+
},
48+
"test_bed.pdf:md5,d41d8cd98f00b204e9800998ecf8427e"
49+
]
50+
],
51+
"5": [
52+
"versions.yml:md5,73d5516e0d2dd84537b11e5eabcbe3ab",
53+
"versions.yml:md5,d0f4716ff5035090e3129d50d029e7c8",
54+
"versions.yml:md5,d0f4716ff5035090e3129d50d029e7c8"
55+
],
56+
"all": [
57+
[
58+
{
59+
"id": "test_bed"
60+
},
61+
"test_bed_all.txt:md5,d41d8cd98f00b204e9800998ecf8427e"
62+
]
63+
],
64+
"corr_matrix": [
65+
[
66+
{
67+
"id": "test_bed"
68+
},
69+
"test_bed_output_corr_matrix.txt:md5,d41d8cd98f00b204e9800998ecf8427e"
70+
]
71+
],
72+
"matched": [
73+
[
74+
{
75+
"id": "test_bed"
76+
},
77+
"test_bed_matched.txt:md5,d41d8cd98f00b204e9800998ecf8427e"
78+
]
79+
],
80+
"pdf": [
81+
[
82+
{
83+
"id": "test_bed"
84+
},
85+
"test_bed.pdf:md5,d41d8cd98f00b204e9800998ecf8427e"
86+
]
87+
],
88+
"vcf": [
89+
[
90+
{
91+
"id": "test1"
92+
},
93+
"test1.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940"
94+
],
95+
[
96+
{
97+
"id": "test2"
98+
},
99+
"test2.vcf.gz:md5,68b329da9893e34099c7d8ad5cb9c940"
100+
]
101+
],
102+
"versions": [
103+
"versions.yml:md5,73d5516e0d2dd84537b11e5eabcbe3ab",
104+
"versions.yml:md5,d0f4716ff5035090e3129d50d029e7c8",
105+
"versions.yml:md5,d0f4716ff5035090e3129d50d029e7c8"
106+
]
107+
}
13108
],
14109
"meta": {
15110
"nf-test": "0.9.2",
16-
"nextflow": "24.10.5"
111+
"nextflow": "25.04.3"
17112
},
18-
"timestamp": "2025-04-01T17:50:34.789565772"
113+
"timestamp": "2025-06-13T10:09:29.171209842"
19114
},
20115
"sarscov2 - cram": {
21116
"content": [
@@ -96,4 +191,4 @@
96191
},
97192
"timestamp": "2025-04-01T17:45:22.458317234"
98193
}
99-
}
194+
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
process {
2-
withName: ".*BAM_NGSCHECKMATE:BCFTOOLS_MPILEUP" {
2+
withName: "BCFTOOLS_MPILEUP" {
33
ext.args2 = '--no-version --ploidy 1 -c'
44
ext.args3 = '--no-version'
55
}
6-
withName: ".*BAM_NGSCHECKMATE:NGSCHECKMATE_NCM" {
6+
withName: "NGSCHECKMATE_NCM" {
77
ext.args = '-V'
88
}
99
}

0 commit comments

Comments
 (0)