-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathstrelka2-processes.nf
92 lines (82 loc) · 2.91 KB
/
strelka2-processes.nf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
log.info """\
====================================
S T R E L K A 2
====================================
Docker Images:
- docker_image_strelka2: ${params.docker_image_strelka2}
- docker_image_manta: ${params.docker_image_manta}
Strelka2 Options:
- exome: ${params.exome}
- use_intersect_regions: ${params.use_intersect_regions}
"""
process call_sIndel_Manta {
container params.docker_image_manta
publishDir path: "${params.workflow_output_dir}/intermediate/${task.process.split(':')[-1]}",
mode: "copy",
pattern: "MantaWorkflow",
enabled: params.save_intermediate_files
ext log_dir: { "Strelka2-${params.strelka2_version}/${task.process.split(':')[-1]}" }
input:
path tumor
path tumor_index
path normal
path normal_index
path reference
path reference_index
path intersect_regions
path intersect_regions_index
output:
tuple path("MantaWorkflow/results/variants/candidateSmallIndels.vcf.gz"),
path("MantaWorkflow/results/variants/candidateSmallIndels.vcf.gz.tbi")
path "MantaWorkflow"
script:
exome = params.exome ? "--exome" : ""
call_region_command = params.use_intersect_regions ? "--callRegions ${intersect_regions}" : ""
"""
configManta.py \
--normalBam $normal \
--tumorBam $tumor \
--referenceFasta $reference \
${exome} \
${call_region_command} \
--runDir MantaWorkflow
MantaWorkflow/runWorkflow.py -j ${task.cpus}
"""
}
process call_sSNV_Strelka2 {
container params.docker_image_strelka2
publishDir path: "${params.workflow_output_dir}/intermediate/${task.process.split(':')[-1]}",
mode: "copy",
pattern: "StrelkaSomaticWorkflow",
enabled: params.save_intermediate_files
ext log_dir: { "Strelka2-${params.strelka2_version}/${task.process.split(':')[-1]}" }
input:
path tumor
path tumor_index
path normal
path normal_index
path reference
path reference_index
tuple path(indel_candidates), path(indel_candidates_index)
path intersect_regions
path intersect_regions_index
output:
tuple val("SNV"), path("StrelkaSomaticWorkflow/results/variants/somatic.snvs.vcf.gz"), emit: snvs_gzvcf
tuple val("Indel"), path("StrelkaSomaticWorkflow/results/variants/somatic.indels.vcf.gz"), emit: indels_gzvcf
path "StrelkaSomaticWorkflow"
script:
exome = params.exome ? "--exome" : ""
call_region_command = params.use_intersect_regions ? "--callRegions ${intersect_regions}" : ""
"""
set -euo pipefail
configureStrelkaSomaticWorkflow.py \
--normalBam $normal \
--tumorBam $tumor \
--referenceFasta $reference \
${call_region_command} \
--indelCandidates $indel_candidates \
${exome} \
--runDir StrelkaSomaticWorkflow
StrelkaSomaticWorkflow/runWorkflow.py -m local -j ${task.cpus}
"""
}