Skip to content

Commit c7b3c90

Browse files
committed
Fixed linting errors and updated to latest nf-core standards
1 parent cfdcced commit c7b3c90

File tree

6 files changed

+303
-126
lines changed

6 files changed

+303
-126
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66
## Unreleased
77

88
### `Added`
9+
- Updated main.nf to latest nf-core template standards with proper workflow hierarchy and PIPELINE_INITIALISATION/COMPLETION subworkflows.
10+
- Implemented nf-core standard workflow completion handlers following template patterns.
911
- Changed name of pipeline to `HCVTyper`.
1012
- Changed profile name for the minimal test from `test_illumina` to `test`.
1113
- Added plotting of variation per site in the bam files from the targeted mapping.
@@ -27,6 +29,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2729
- Added option to choose between cutadapt or fastp for read trimming. Default is cutadapt.
2830

2931
### `Fixed`
32+
- Resolved all configuration warnings by updating process selectors to match nf-core workflow naming conventions.
33+
- Fixed extensive linting errors in workflows/hcvtyper.nf including variable declarations and parameter naming conflicts.
34+
- Corrected workflow.onComplete handler placement and implementation following nf-core patterns.
3035
- The summarize R script can handle cases when GLUE report is missing. GLUE columns will all be NA.
3136
- Fixed bug in the making of consensus sequence in cases of co-infection. The filenames would not separate between the two strains and only a single consensus would be written.
3237
- Spades may produce empty contigs.fa file. Filter out these instances.
@@ -35,6 +40,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3540
- Handling cases where the de novo assembled contigs produced no blast hits.
3641

3742
### `Dependencies`
43+
- Updated pipeline structure to comply with latest nf-core template standards and DSL2 best practices.
3844

3945
### `Deprecated`
4046

conf/modules_hcv.config

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ params {
2626

2727
process {
2828

29-
withName: 'HCVTYPER:HCV_GLUE_PARSER.*' {
29+
withName: 'FOLKEHELSEINSTITUTTET_HCVTYPER:HCVTYPER:HCV_GLUE_PARSER.*' {
3030
publishDir = [
3131
path: { "${params.outdir}/hcvglue" },
3232
mode: params.publish_dir_mode,
3333
pattern: '*.tsv'
3434
]
3535
}
3636

37-
withName: 'HCVTYPER:HCVGLUE.*' {
37+
withName: 'FOLKEHELSEINSTITUTTET_HCVTYPER:HCVTYPER:HCVGLUE.*' {
3838
containerOptions = '-v /var/run/docker.sock:/var/run/docker.sock'
3939
time = 12.h
4040
publishDir = [
@@ -44,7 +44,7 @@ process {
4444
]
4545
}
4646

47-
withName: 'HCVTYPER:KRAKEN2_FOCUSED' {
47+
withName: 'FOLKEHELSEINSTITUTTET_HCVTYPER:HCVTYPER:KRAKEN2_FOCUSED' {
4848
ext.prefix = { "${meta.id}.focused" }
4949
publishDir = [
5050
path: { "${params.outdir}/kraken2" },
@@ -53,7 +53,7 @@ process {
5353
]
5454
}
5555

56-
withName: 'HCVTYPER:KRAKEN2_KRAKEN2' {
56+
withName: 'FOLKEHELSEINSTITUTTET_HCVTYPER:HCVTYPER:KRAKEN2_KRAKEN2' {
5757
ext.prefix = { "${meta.id}.entireDB" }
5858
publishDir = [
5959
path: { "${params.outdir}/kraken2" },
@@ -62,36 +62,36 @@ process {
6262
]
6363
}
6464

65-
withName: 'BOWTIE2_ALIGN' {
65+
withName: 'FOLKEHELSEINSTITUTTET_HCVTYPER:HCVTYPER:BOWTIE2_ALIGN' {
6666
ext.args = "--very-sensitive-local"
6767
publishDir = [
6868
enabled: false // Don't publish any files from this process
6969
]
7070
}
7171

72-
withName: 'HCVTYPER:PICARD_COLLECTINSERTSIZEMETRICS' {
72+
withName: 'FOLKEHELSEINSTITUTTET_HCVTYPER:HCVTYPER:PICARD_COLLECTINSERTSIZEMETRICS' {
7373
label = "error_ignore"
7474
}
7575

76-
withName: 'TANOTI_ALIGN' {
76+
withName: 'FOLKEHELSEINSTITUTTET_HCVTYPER:HCVTYPER:TANOTI_ALIGN' {
7777
maxForks = 4
7878
publishDir = [
7979
enabled: false // Don't publish any files from this process
8080
]
8181
}
8282

83-
withName: 'BLAST_MAKEBLASTDB' {
83+
withName: 'FOLKEHELSEINSTITUTTET_HCVTYPER:HCVTYPER:BLAST_MAKEBLASTDB' {
8484
ext.args = "-dbtype nucl"
8585
publishDir = [
8686
enabled: false // Don't publish any files from this process
8787
]
8888
}
8989

90-
withName: 'BLAST_BLASTN' {
90+
withName: 'FOLKEHELSEINSTITUTTET_HCVTYPER:HCVTYPER:BLAST_BLASTN' {
9191
ext.args = "-outfmt 6"
9292
}
9393

94-
withName: 'HCVTYPER:BLASTPARSE' {
94+
withName: 'FOLKEHELSEINSTITUTTET_HCVTYPER:HCVTYPER:BLASTPARSE' {
9595
publishDir = [
9696
[
9797
enabled: true,
@@ -108,28 +108,28 @@ process {
108108
]
109109
}
110110

111-
withName: 'HCVTYPER:SPADES' {
111+
withName: 'FOLKEHELSEINSTITUTTET_HCVTYPER:HCVTYPER:SPADES' {
112112
label = "error_ignore" // Ignore errors from this process.
113113
ext.args = "--rnaviral --phred-offset 33"
114114
}
115115

116-
withName: 'HCVTYPER:SAMTOOLS_SORMADUP' {
116+
withName: 'FOLKEHELSEINSTITUTTET_HCVTYPER:HCVTYPER:SAMTOOLS_SORMADUP' {
117117
label = "error_ignore" // Ignore errors from this process. Tanoti mapper may in some cases produce small/empty BAM files.
118118
ext.prefix = { "${meta.id}.firstmapping.nodup" }
119119
ext.args5 = "-r"
120120
}
121121

122-
withName: 'HCVTYPER:MAJOR_MAPPING:SAMTOOLS_SORMADUP' {
122+
withName: 'FOLKEHELSEINSTITUTTET_HCVTYPER:HCVTYPER:MAJOR_MAPPING:SAMTOOLS_SORMADUP' {
123123
ext.prefix = { "${meta.id}.${meta.reference}.major.nodup" }
124124
ext.args5 = "-r"
125125
}
126126

127-
withName: 'HCVTYPER:MINOR_MAPPING:SAMTOOLS_SORMADUP' {
127+
withName: 'FOLKEHELSEINSTITUTTET_HCVTYPER:HCVTYPER:MINOR_MAPPING:SAMTOOLS_SORMADUP' {
128128
ext.prefix = { "${meta.id}.${meta.reference}.minor.nodup" }
129129
ext.args5 = "-r"
130130
}
131131

132-
withName: 'HCVTYPER:GET_MAPPING_STATS_WITHDUP:SAMTOOLS_INDEX' {
132+
withName: 'FOLKEHELSEINSTITUTTET_HCVTYPER:HCVTYPER:GET_MAPPING_STATS_WITHDUP:SAMTOOLS_INDEX' {
133133
ext.prefix = { "${meta.id}.firstmapping.withdup" }
134134
publishDir = [
135135
enabled: false,
@@ -139,7 +139,7 @@ process {
139139
]
140140
}
141141

142-
withName: 'HCVTYPER:GET_MAPPING_STATS_MARKDUP:SAMTOOLS_INDEX' {
142+
withName: 'FOLKEHELSEINSTITUTTET_HCVTYPER:HCVTYPER:GET_MAPPING_STATS_MARKDUP:SAMTOOLS_INDEX' {
143143
ext.prefix = { "${meta.id}.firstmapping.nodup" }
144144
publishDir = [
145145
enabled: true,
@@ -149,7 +149,7 @@ process {
149149
]
150150
}
151151

152-
withName: 'HCVTYPER:GET_MAPPING_STATS_WITHDUP:SAMTOOLS_IDXSTATS' {
152+
withName: 'FOLKEHELSEINSTITUTTET_HCVTYPER:HCVTYPER:GET_MAPPING_STATS_WITHDUP:SAMTOOLS_IDXSTATS' {
153153
ext.prefix = { "${meta.id}.firstmapping.withdup" }
154154
publishDir = [
155155
enabled: false, // Don't publish any files from this process
@@ -158,7 +158,7 @@ process {
158158
]
159159
}
160160

161-
withName: 'HCVTYPER:GET_MAPPING_STATS_WITHDUP:CSVTK_SORT' {
161+
withName: 'FOLKEHELSEINSTITUTTET_HCVTYPER:HCVTYPER:GET_MAPPING_STATS_WITHDUP:CSVTK_SORT' {
162162
ext.args = '-H -k 3:nr' // No header. And sort the 3rd column (mapped reads) numerically in reverse order.
163163
ext.prefix = { "${meta.id}.firstmapping.withdup.sorted" }
164164
publishDir = [
@@ -169,7 +169,7 @@ process {
169169
}
170170

171171

172-
withName: 'HCVTYPER:GET_MAPPING_STATS_WITHDUP:SAMTOOLS_STATS' {
172+
withName: 'FOLKEHELSEINSTITUTTET_HCVTYPER:HCVTYPER:GET_MAPPING_STATS_WITHDUP:SAMTOOLS_STATS' {
173173
ext.prefix = { "${meta.id}.firstmapping.withdup" }
174174
publishDir = [
175175
enabled: true,
@@ -178,121 +178,121 @@ process {
178178
]
179179
}
180180

181-
withName: 'HCVTYPER:GET_MAPPING_STATS_MARKDUP:CSVTK_SORT' {
181+
withName: 'FOLKEHELSEINSTITUTTET_HCVTYPER:HCVTYPER:GET_MAPPING_STATS_MARKDUP:CSVTK_SORT' {
182182
ext.args = '-H -k 3:nr' // No header. And sort the 3rd column (mapped reads) numerically in reverse order.
183183
publishDir = [
184184
enabled: false // Don't publish any files from this process
185185
]
186186
}
187187

188-
withName: 'HCVTYPER:GET_MAPPING_STATS_MARKDUP:SAMTOOLS_IDXSTATS' {
188+
withName: 'FOLKEHELSEINSTITUTTET_HCVTYPER:HCVTYPER:GET_MAPPING_STATS_MARKDUP:SAMTOOLS_IDXSTATS' {
189189
ext.prefix = { "${meta.id}.firstmapping.nodup" }
190190
publishDir = [
191191
path: { "${params.outdir}/samtools" },
192192
mode: params.publish_dir_mode,
193193
]
194194
}
195195

196-
withName: 'HCVTYPER:MAJOR_MAPPING:SAMTOOLS_IDXSTATS' {
196+
withName: 'FOLKEHELSEINSTITUTTET_HCVTYPER:HCVTYPER:MAJOR_MAPPING:SAMTOOLS_IDXSTATS' {
197197
ext.prefix = { "${meta.id}.${meta.reference}.nodup" }
198198
}
199199

200-
withName: 'HCVTYPER:MINOR_MAPPING:SAMTOOLS_IDXSTATS' {
200+
withName: 'FOLKEHELSEINSTITUTTET_HCVTYPER:HCVTYPER:MINOR_MAPPING:SAMTOOLS_IDXSTATS' {
201201
ext.prefix = { "${meta.id}.${meta.reference}.nodup" }
202202
}
203203

204-
withName: 'HCVTYPER:MAJOR_MAPPING:INDEX_MARKDUP' {
204+
withName: 'FOLKEHELSEINSTITUTTET_HCVTYPER:HCVTYPER:MAJOR_MAPPING:INDEX_MARKDUP' {
205205
publishDir = [
206206
path: { "${params.outdir}/samtools" },
207207
mode: params.publish_dir_mode,
208208
pattern: '*.bai'
209209
]
210210
}
211211

212-
withName: 'HCVTYPER:MAJOR_MAPPING:INDEX_WITHDUP' {
212+
withName: 'FOLKEHELSEINSTITUTTET_HCVTYPER:HCVTYPER:MAJOR_MAPPING:INDEX_WITHDUP' {
213213
publishDir = [
214214
enabled: false // Don't publish any files from this process
215215
]
216216
}
217217

218-
withName: 'HCVTYPER:MINOR_MAPPING:INDEX_MARKDUP' {
218+
withName: 'FOLKEHELSEINSTITUTTET_HCVTYPER:HCVTYPER:MINOR_MAPPING:INDEX_MARKDUP' {
219219
publishDir = [
220220
path: { "${params.outdir}/samtools" },
221221
mode: params.publish_dir_mode,
222222
pattern: '*.bai'
223223
]
224224
}
225225

226-
withName: 'HCVTYPER:MINOR_MAPPING:INDEX_WITHDUP' {
226+
withName: 'FOLKEHELSEINSTITUTTET_HCVTYPER:HCVTYPER:MINOR_MAPPING:INDEX_WITHDUP' {
227227
publishDir = [
228228
enabled: false // Don't publish any files from this process
229229
]
230230
}
231231

232-
withName: 'HCVTYPER:GET_MAPPING_STATS.*:SAMTOOLS_DEPTH.*' {
232+
withName: 'FOLKEHELSEINSTITUTTET_HCVTYPER:HCVTYPER:GET_MAPPING_STATS.*:SAMTOOLS_DEPTH.*' {
233233
ext.args = '-aa -d 1000000'
234234
publishDir = [
235235
enabled: false // Don't publish any files from this process
236236
]
237237
}
238238

239-
withName: 'HCVTYPER:MAJOR_MAPPING:SAMTOOLS_DEPTH' {
239+
withName: 'FOLKEHELSEINSTITUTTET_HCVTYPER:HCVTYPER:MAJOR_MAPPING:SAMTOOLS_DEPTH' {
240240
ext.args = '-aa -d 1000000'
241241
ext.prefix = { "${meta1.id}.${meta1.reference}.major.nodup" }
242242
}
243243

244-
withName: 'HCVTYPER:MINOR_MAPPING:SAMTOOLS_DEPTH' {
244+
withName: 'FOLKEHELSEINSTITUTTET_HCVTYPER:HCVTYPER:MINOR_MAPPING:SAMTOOLS_DEPTH' {
245245
ext.args = '-aa -d 1000000'
246246
ext.prefix = { "${meta1.id}.${meta1.reference}.minor.nodup" }
247247
}
248248

249-
withName: 'HCVTYPER:GET_MAPPING_STATS_MARKDUP:SAMTOOLS_STATS' {
249+
withName: 'FOLKEHELSEINSTITUTTET_HCVTYPER:HCVTYPER:GET_MAPPING_STATS_MARKDUP:SAMTOOLS_STATS' {
250250
ext.prefix = { "${meta.id}.firstmapping.nodup" }
251251
publishDir = [
252252
path: { "${params.outdir}/samtools" },
253253
mode: params.publish_dir_mode,
254254
]
255255
}
256256

257-
withName: 'HCVTYPER:MAJOR_MAPPING:STATS_WITHDUP' {
257+
withName: 'FOLKEHELSEINSTITUTTET_HCVTYPER:HCVTYPER:MAJOR_MAPPING:STATS_WITHDUP' {
258258
ext.prefix = { "${meta.id}.${meta.reference}.major.withdup" }
259259
publishDir = [
260260
path: { "${params.outdir}/samtools" },
261261
mode: params.publish_dir_mode
262262
]
263263
}
264264

265-
withName: 'HCVTYPER:MINOR_MAPPING:STATS_WITHDUP' {
265+
withName: 'FOLKEHELSEINSTITUTTET_HCVTYPER:HCVTYPER:MINOR_MAPPING:STATS_WITHDUP' {
266266
ext.prefix = { "${meta.id}.${meta.reference}.minor.withdup" }
267267
publishDir = [
268268
path: { "${params.outdir}/samtools" },
269269
mode: params.publish_dir_mode
270270
]
271271
}
272272

273-
withName: 'HCVTYPER:MAJOR_MAPPING:STATS_MARKDUP' {
273+
withName: 'FOLKEHELSEINSTITUTTET_HCVTYPER:HCVTYPER:MAJOR_MAPPING:STATS_MARKDUP' {
274274
ext.prefix = { "${meta.id}.${meta.reference}.major.nodup" }
275275
publishDir = [
276276
path: { "${params.outdir}/samtools" },
277277
mode: params.publish_dir_mode
278278
]
279279
}
280280

281-
withName: 'HCVTYPER:MINOR_MAPPING:STATS_MARKDUP' {
281+
withName: 'FOLKEHELSEINSTITUTTET_HCVTYPER:HCVTYPER:MINOR_MAPPING:STATS_MARKDUP' {
282282
ext.prefix = { "${meta.id}.${meta.reference}.minor.nodup" }
283283
publishDir = [
284284
path: { "${params.outdir}/samtools" },
285285
mode: params.publish_dir_mode
286286
]
287287
}
288288

289-
withName: 'HCVTYPER:MAJOR_MAPPING:IVAR_CONSENSUS' {
289+
withName: 'FOLKEHELSEINSTITUTTET_HCVTYPER:HCVTYPER:MAJOR_MAPPING:IVAR_CONSENSUS' {
290290
ext.prefix = { "${meta.id}.major" }
291291
ext.args = '-t 0 -q 1 -m 10 -n N'
292292
ext.args2 = '--count-orphans --no-BAQ --max-depth 0 --min-BQ 0 -aa'
293293
}
294294

295-
withName: 'HCVTYPER:MINOR_MAPPING:IVAR_CONSENSUS' {
295+
withName: 'FOLKEHELSEINSTITUTTET_HCVTYPER:HCVTYPER:MINOR_MAPPING:IVAR_CONSENSUS' {
296296
ext.prefix = { "${meta.id}.minor" }
297297
ext.args = '-t 0 -q 1 -m 10 -n N'
298298
ext.args2 = '--count-orphans --no-BAQ --max-depth 0 --min-BQ 0 -aa'
@@ -322,7 +322,7 @@ process {
322322
]
323323
}
324324

325-
withName: 'HCVTYPER:SUMMARIZE' {
325+
withName: 'FOLKEHELSEINSTITUTTET_HCVTYPER:HCVTYPER:SUMMARIZE' {
326326
publishDir = [
327327
[
328328
// Publish the summary tsv-file

0 commit comments

Comments
 (0)