-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.nf
More file actions
142 lines (129 loc) · 4.85 KB
/
Copy pathmain.nf
File metadata and controls
142 lines (129 loc) · 4.85 KB
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
#!/usr/bin/env nextflow
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Clinical-Genomics/oncoflow
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Github : https://github.com/Clinical-Genomics/oncoflow
----------------------------------------------------------------------------------------
*/
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
IMPORT FUNCTIONS / MODULES / SUBWORKFLOWS / WORKFLOWS
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
include { ONCOFLOW } from './workflows/oncoflow'
include { PIPELINE_INITIALISATION } from './subworkflows/local/utils_nfcore_oncoflow_pipeline'
include { PIPELINE_COMPLETION } from './subworkflows/local/utils_nfcore_oncoflow_pipeline'
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NAMED WORKFLOWS FOR PIPELINE
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
//
// WORKFLOW: Run main analysis pipeline depending on type of input
//
workflow CLINICALGENOMICS_ONCOFLOW {
take:
val_case_id // string: [mandatory] Case ID
val_oncoanalyser_config // string: [optional] Config file for oncoanalyser pipeline
val_oncoanalyser_nextflow_opts // string: [mandatory] Nextflow options for oncoanalyser pipeline
val_oncoanalyser_params_file // string: [mandatory] Parameters file for oncoanalyser pipeline
val_oncoanalyser_samplesheet // string: [mandatory] Samplesheet file for oncoanalyser pipeline
val_oncorefiner_config // string: [optional] Config file for oncorefiner pipeline
val_oncorefiner_nextflow_opts // string: [mandatory] Nextflow options for oncorefiner pipeline
val_outdir // string: [mandatory] The output directory where the results will be saved
val_sample_id_tumor // string: [mandatory] Sample ID of the tumor sample
val_sample_id_normal // string: [mandatory] Sample ID of the normal sample
val_subject_id // string: [mandatory] Subject ID
val_sex // string: [mandatory] Sex of the patient
main:
//
// WORKFLOW: Run pipeline
//
ONCOFLOW (
val_case_id,
val_oncoanalyser_config,
val_oncoanalyser_nextflow_opts,
val_oncoanalyser_params_file,
val_oncoanalyser_samplesheet,
val_oncorefiner_config,
val_oncorefiner_nextflow_opts,
val_sample_id_tumor,
val_sample_id_normal,
val_subject_id,
val_sex,
val_outdir
)
emit:
oncoanalyser_output = ONCOFLOW.out.oncoanalyser_output // channel: [path(analysis_output_directory)]
oncorefiner_output = ONCOFLOW.out.oncorefiner_output // channel: [path(analysis_output_directory)]
oncorefiner_params_file = ONCOFLOW.out.oncorefiner_params_file // channel: [path(yaml)]
}
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
RUN MAIN WORKFLOW
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
workflow {
main:
//
// SUBWORKFLOW: Run initialisation tasks
//
PIPELINE_INITIALISATION (
params.version,
params.validate_params,
params.monochrome_logs,
args,
params.outdir,
params.help,
params.help_full,
params.show_hidden
)
//
// WORKFLOW: Run main workflow
//
CLINICALGENOMICS_ONCOFLOW (
params.case_id,
params.oncoanalyser_config,
params.oncoanalyser_nextflow_opts,
params.oncoanalyser_params_file,
params.oncoanalyser_samplesheet,
params.oncorefiner_config,
params.oncorefiner_nextflow_opts,
params.sample_id_tumor,
params.sample_id_normal,
params.subject_id,
params.sex,
params.outdir
)
//
// SUBWORKFLOW: Run completion tasks
//
PIPELINE_COMPLETION (
params.email,
params.email_on_fail,
params.plaintext_email,
params.outdir,
params.monochrome_logs,
)
publish:
oncoanalyser_output = CLINICALGENOMICS_ONCOFLOW.out.oncoanalyser_output
oncorefiner_output = CLINICALGENOMICS_ONCOFLOW.out.oncorefiner_output
oncorefiner_params_file = CLINICALGENOMICS_ONCOFLOW.out.oncorefiner_params_file
}
output {
oncoanalyser_output {
path "oncoanalyser"
}
oncorefiner_output {
path "oncorefiner"
}
oncorefiner_params_file {
path "oncorefiner"
}
}
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
THE END
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/