Skip to content

Commit 8fac647

Browse files
padraiccfellen31
andauthored
feat: add sawfish joint-call (#9053)
* feat: add sawfish joint-call * fix linting issues for meta.yaml * Add changes from the pull request review * Update modules/nf-core/sawfish/discover/main.nf Co-authored-by: Felix Lenner <[email protected]> * Add samplesheet test for jointcall * Update paths for the new test data * Apply suggestions from code review Co-authored-by: Felix Lenner <[email protected]> --------- Co-authored-by: padraicc <padraic.corcoran£scilifelab.uu.se> Co-authored-by: Felix Lenner <[email protected]>
1 parent ff39793 commit 8fac647

File tree

10 files changed

+935
-60
lines changed

10 files changed

+935
-60
lines changed

modules/nf-core/sawfish/discover/environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ channels:
44
- conda-forge
55
- bioconda
66
dependencies:
7-
- "bioconda::sawfish=2.0.5"
7+
- "bioconda::sawfish=2.1.1"

modules/nf-core/sawfish/discover/main.nf

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ process SAWFISH_DISCOVER {
44

55
conda "${moduleDir}/environment.yml"
66
container "${ workflow.containerEngine == 'singularity' && !task.ext.singularity_pull_docker_container ?
7-
'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/72/72b081ac73287f98b0453a7e2fbd66e581f9eed68fe91289b9e4189e639fa6d9/data' :
8-
'community.wave.seqera.io/library/sawfish:2.0.5--422cc4cf3cd63e02' }"
7+
'https://community-cr-prod.seqera.io/docker/registry/v2/blobs/sha256/f8/f8f28fcf0823d39a8038b02cc5ff86d7cfbcf92e6f5c8540c25e110c6eb1f9be/data' :
8+
'community.wave.seqera.io/library/sawfish:2.1.1--1fd57d06a7186245' }"
99

1010
input:
1111
tuple val(meta), path(bam), path(bai)
@@ -15,34 +15,36 @@ process SAWFISH_DISCOVER {
1515
tuple val(meta5), path(cnv_exclude_regions)
1616

1717
output:
18-
tuple val(meta), path("versions.yml") , emit: versions
19-
tuple val(meta), path("*/assembly.regions.bed") , emit: assembly_regions
20-
tuple val(meta), path("*/candidate.sv.bcf") , emit: candidate_sv_bcf
21-
tuple val(meta), path("*/candidate.sv.bcf.csi") , emit: candidate_sv_bcf_csi
22-
tuple val(meta), path("*/contig.alignment.bam") , emit: contig_alignment_bam
23-
tuple val(meta), path("*/contig.alignment.bam.csi") , emit: contig_alignment_bam_csi
24-
tuple val(meta), path("*/copynum.bedgraph") , emit: copynum_bedgraph , optional: true
25-
tuple val(meta), path("*/copynum.mpack") , emit: copynum_mpack , optional: true
26-
tuple val(meta), path("*/debug.breakpoint_clusters.bed") , emit: debug_breakpoint_clusters
27-
tuple val(meta), path("*/debug.cluster.refinement.txt") , emit: debug_cluster_refinement
28-
tuple val(meta), path("*/discover.settings.json") , emit: discover_settings
29-
tuple val(meta), path("*/genome.gclevels.mpack") , emit: genome_gclevels
30-
tuple val(meta), path("*/max.depth.bed") , emit: max_depth
31-
tuple val(meta), path("*/run.stats.json") , emit: run_stats
32-
tuple val(meta), path("*/sample.gcbias.mpack") , emit: sample_gcbias , optional: true
33-
tuple val(meta), path("*/sawfish.log") , emit: log
34-
tuple val(meta), path("*/depth.mpack") , emit: depth_mpack
35-
tuple val(meta), path("*/expected.copy.number.bed") , emit: expected_cn , optional: true
18+
tuple val(meta), path("versions.yml") , emit: versions
19+
tuple val(meta), path("${prefix}/assembly.regions.bed") , emit: assembly_regions
20+
tuple val(meta), path("${prefix}/candidate.sv.bcf") , emit: candidate_sv_bcf
21+
tuple val(meta), path("${prefix}/candidate.sv.bcf.csi") , emit: candidate_sv_bcf_csi
22+
tuple val(meta), path("${prefix}/contig.alignment.bam") , emit: contig_alignment_bam
23+
tuple val(meta), path("${prefix}/contig.alignment.bam.csi") , emit: contig_alignment_bam_csi
24+
tuple val(meta), path("${prefix}/copynum.bedgraph") , emit: copynum_bedgraph , optional: true
25+
tuple val(meta), path("${prefix}/copynum.mpack") , emit: copynum_mpack , optional: true
26+
tuple val(meta), path("${prefix}/debug.breakpoint_clusters.bed"), emit: debug_breakpoint_clusters
27+
tuple val(meta), path("${prefix}/debug.cluster.refinement.txt") , emit: debug_cluster_refinement
28+
tuple val(meta), path("${prefix}/discover.settings.json") , emit: discover_settings
29+
tuple val(meta), path("${prefix}/genome.gclevels.mpack") , emit: genome_gclevels
30+
tuple val(meta), path("${prefix}/max.depth.bed") , emit: max_depth
31+
tuple val(meta), path("${prefix}/run.stats.json") , emit: run_stats
32+
tuple val(meta), path("${prefix}/sample.gcbias.mpack") , emit: sample_gcbias , optional: true
33+
tuple val(meta), path("${prefix}/sawfish.log") , emit: log
34+
tuple val(meta), path("${prefix}/depth.mpack") , emit: depth_mpack
35+
tuple val(meta), path("${prefix}/maf.mpack") , emit: maf_mpack , optional: true
36+
tuple val(meta), path("${prefix}/expected.copy.number.bed") , emit: expected_cn , optional: true
37+
tuple val(meta), path("${prefix}") , emit: discover_dir
3638

3739
when:
3840
task.ext.when == null || task.ext.when
3941

4042
script:
4143
def args = task.ext.args ?: ""
42-
def prefix = task.ext.prefix ?: "${meta.id}"
44+
prefix = task.ext.prefix ?: "${meta.id}"
4345
def expected_cn = expected_cn_bed ? "--expected-cn ${expected_cn_bed}" : ""
4446
def maf = maf_vcf ? "--maf ${maf_vcf}" : ""
45-
def cnv_exclude_regions = cnv_exclude_regions ? "--cnv-exclude-regions ${cnv_exclude_regions}" : ""
47+
def cnv_exclude_regions = cnv_exclude_regions ? "--cnv-excluded-regions ${cnv_exclude_regions}" : ""
4648

4749
"""
4850
sawfish \\
@@ -65,9 +67,9 @@ process SAWFISH_DISCOVER {
6567

6668
stub:
6769
def args = task.ext.args ?: ''
68-
def prefix = task.ext.prefix ?: "${meta.id}"
70+
prefix = task.ext.prefix ?: "${meta.id}"
6971
def expected_cn_bed = expected_cn_bed ? "touch ${prefix}/expected.copy.number.bed": ''
70-
def maf_mpack = maf_vcf ? "echo \"MAF VCF mpack\" > ${prefix}/maf.mpack": ''
72+
def maf_mpack = maf_vcf ? "touch ${prefix}/maf.mpack": ''
7173
def copynum_files = !args.contains('--disable-cnv') ? """
7274
touch ${prefix}/copynum.bedgraph
7375
touch ${prefix}/copynum.mpack

modules/nf-core/sawfish/discover/meta.yml

Lines changed: 50 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -76,13 +76,26 @@ input:
7676
pattern: "*.bed"
7777
ontologies: []
7878
output:
79+
versions:
80+
- - meta:
81+
type: map
82+
description: |
83+
Groovy Map containing sample information
84+
e.g. `[ id:'test' ]`
85+
- versions.yml:
86+
type: file
87+
description: File containing software versions
88+
pattern: "versions.yml"
89+
ontologies:
90+
- edam: "http://edamontology.org/format_3750" # YAML
91+
7992
assembly_regions:
8093
- - meta:
8194
type: map
8295
description: |
8396
Groovy Map containing sample information
8497
e.g. `[ id:'test' ]`
85-
- "*/assembly.regions.bed":
98+
- ${prefix}/assembly.regions.bed:
8699
type: file
87100
description: Assembly regions BED file
88101
pattern: "*.bed"
@@ -93,7 +106,7 @@ output:
93106
description: |
94107
Groovy Map containing sample information
95108
e.g. `[ id:'test' ]`
96-
- "*/candidate.sv.bcf":
109+
- ${prefix}/candidate.sv.bcf:
97110
type: file
98111
description: Candidate SV BCF file
99112
pattern: "*.bcf"
@@ -104,7 +117,7 @@ output:
104117
description: |
105118
Groovy Map containing sample information
106119
e.g. `[ id:'test' ]`
107-
- "*/candidate.sv.bcf.csi":
120+
- ${prefix}/candidate.sv.bcf.csi:
108121
type: file
109122
description: Candidate SV BCF CSI file
110123
pattern: "*.csi"
@@ -115,7 +128,7 @@ output:
115128
description: |
116129
Groovy Map containing sample information
117130
e.g. `[ id:'test' ]`
118-
- "*/contig.alignment.bam":
131+
- ${prefix}/contig.alignment.bam:
119132
type: file
120133
description: Contig alignment BAM file
121134
pattern: "*.bam"
@@ -126,7 +139,7 @@ output:
126139
description: |
127140
Groovy Map containing sample information
128141
e.g. `[ id:'test' ]`
129-
- "*/contig.alignment.bam.csi":
142+
- ${prefix}/contig.alignment.bam.csi:
130143
type: file
131144
description: Contig alignment BAM CSI file
132145
pattern: "*.csi"
@@ -137,7 +150,7 @@ output:
137150
description: |
138151
Groovy Map containing sample information
139152
e.g. `[ id:'test' ]`
140-
- "*/copynum.bedgraph":
153+
- ${prefix}/copynum.bedgraph:
141154
type: file
142155
description: Copy number BEDGraph file
143156
pattern: "*.bedgraph"
@@ -148,7 +161,7 @@ output:
148161
description: |
149162
Groovy Map containing sample information
150163
e.g. `[ id:'test' ]`
151-
- "*/copynum.mpack":
164+
- ${prefix}/copynum.mpack:
152165
type: file
153166
description: Copy number mpack file
154167
pattern: "*.mpack"
@@ -159,7 +172,7 @@ output:
159172
description: |
160173
Groovy Map containing sample information
161174
e.g. `[ id:'test' ]`
162-
- "*/debug.breakpoint_clusters.bed":
175+
- ${prefix}/debug.breakpoint_clusters.bed:
163176
type: file
164177
description: Debug breakpoint clusters BED file
165178
pattern: "*.bed"
@@ -170,7 +183,7 @@ output:
170183
description: |
171184
Groovy Map containing sample information
172185
e.g. `[ id:'test' ]`
173-
- "*/debug.cluster.refinement.txt":
186+
- ${prefix}/debug.cluster.refinement.txt:
174187
type: file
175188
description: Debug cluster refinement text file
176189
pattern: "*.txt"
@@ -181,18 +194,19 @@ output:
181194
description: |
182195
Groovy Map containing sample information
183196
e.g. `[ id:'test' ]`
184-
- "*/discover.settings.json":
197+
- ${prefix}/discover.settings.json:
185198
type: file
186199
description: Discover settings JSON file
187200
pattern: "*.json"
188-
ontologies: []
201+
ontologies:
202+
- edam: http://edamontology.org/format_3464 # JSON
189203
genome_gclevels:
190204
- - meta:
191205
type: map
192206
description: |
193207
Groovy Map containing sample information
194208
e.g. `[ id:'test' ]`
195-
- "*/genome.gclevels.mpack":
209+
- ${prefix}/genome.gclevels.mpack:
196210
type: file
197211
description: Genome GC levels mpack file
198212
pattern: "*.mpack"
@@ -203,7 +217,7 @@ output:
203217
description: |
204218
Groovy Map containing sample information
205219
e.g. `[ id:'test' ]`
206-
- "*/max.depth.bed":
220+
- ${prefix}/max.depth.bed:
207221
type: file
208222
description: Max depth BED file
209223
pattern: "*.bed"
@@ -214,18 +228,19 @@ output:
214228
description: |
215229
Groovy Map containing sample information
216230
e.g. `[ id:'test' ]`
217-
- "*/run.stats.json":
231+
- ${prefix}/run.stats.json:
218232
type: file
219233
description: Run statistics JSON file
220234
pattern: "*.json"
221-
ontologies: []
235+
ontologies:
236+
- edam: http://edamontology.org/format_3464 # JSON
222237
sample_gcbias:
223238
- - meta:
224239
type: map
225240
description: |
226241
Groovy Map containing sample information
227242
e.g. `[ id:'test' ]`
228-
- "*/sample.gcbias.mpack":
243+
- ${prefix}/sample.gcbias.mpack:
229244
type: file
230245
description: Sample GC bias mpack file
231246
pattern: "*.mpack"
@@ -236,7 +251,7 @@ output:
236251
description: |
237252
Groovy Map containing sample information
238253
e.g. `[ id:'test' ]`
239-
- "*/sawfish.log":
254+
- ${prefix}/sawfish.log:
240255
type: file
241256
description: Sawfish log file
242257
pattern: "*.log"
@@ -247,35 +262,43 @@ output:
247262
description: |
248263
Groovy Map containing sample information
249264
e.g. `[ id:'test' ]`
250-
- "*/depth.mpack":
265+
- ${prefix}/depth.mpack:
251266
type: file
252267
description: Depth mpack file
253268
pattern: "*.mpack"
254269
ontologies: []
270+
maf_mpack:
271+
- - meta:
272+
type: map
273+
description: |
274+
Groovy Map containing sample information
275+
e.g. `[ id:'test' ]`
276+
- ${prefix}/maf.mpack:
277+
type: file
278+
description: MAF mpack file
279+
pattern: "*.mpack"
280+
ontologies: []
255281
expected_cn:
256282
- - meta:
257283
type: map
258284
description: |
259285
Groovy Map containing sample information
260286
e.g. `[ id:'test' ]`
261-
- "*/expected.copy.number.bed":
287+
- ${prefix}/expected.copy.number.bed:
262288
type: file
263289
description: Expected copy number BED file
264290
pattern: "*.bed"
265291
ontologies: []
266-
versions:
292+
discover_dir:
267293
- - meta:
268294
type: map
269295
description: |
270296
Groovy Map containing sample information
271297
e.g. `[ id:'test' ]`
272-
- versions.yml:
273-
type: file
274-
description: File containing software versions
275-
pattern: "versions.yml"
276-
ontologies:
277-
- edam: "http://edamontology.org/format_3750" # YAML
278-
298+
- ${prefix}:
299+
type: directory
300+
description: Directory containing all discover output files
301+
ontologies: []
279302
authors:
280303
- "@padraicc"
281304
maintainers:

0 commit comments

Comments
 (0)