-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.nf
More file actions
executable file
·106 lines (87 loc) · 2.7 KB
/
Copy pathmain.nf
File metadata and controls
executable file
·106 lines (87 loc) · 2.7 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
#!/usr/bin/env nextflow
nextflow.enable.dsl = 2
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
IMPORT FUNCTIONS / MODULES / SUBWORKFLOWS / WORKFLOWS
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
include { PVACSEQ_PIPELINE } from './workflows/pvacseq'
include { PIPELINE_INITIALISATION } from './subworkflows/local/utils_nfcore_pvacseq_pipeline'
include { PIPELINE_COMPLETION } from './subworkflows/local/utils_nfcore_pvacseq_pipeline'
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NAMED WORKFLOWS FOR PIPELINE
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
//
// WORKFLOW: Run main analysis pipeline depending on type of input
//
workflow NF_PVACSEQ {
take:
maf_files // channel: directory with maf files read in from --input
vcf_files // channel: directory with vcf files read in from --input
main:
//
// WORKFLOW: Run pipeline
//
PVACSEQ_PIPELINE (
maf_files,
vcf_files,
params.fasta,
params.hla_csv
)
emit:
multiqc_report = PVACSEQ_PIPELINE.out.multiqc_report // channel: /path/to/multiqc_report.html
iedb_dir = PVACSEQ_PIPELINE.out.iedb_dir
mode = PVACSEQ_PIPELINE.out.mode
}
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
RUN MAIN WORKFLOW
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
workflow {
main:
//
// SUBWORKFLOW: Run initialisation tasks
//
PIPELINE_INITIALISATION (
params.version,
params.validate_params,
args,
params.outdir
)
//
// Generate input channels dynamically for MAF and VCF files
//
ch_maf_files = Channel
.fromPath(params.input + "/*.maf")
.map { file ->
[ [id: file.baseName], file ] // Create tuples with metadata (id) and file path
}
ch_vcf_files = Channel
.fromPath(params.input + "/*.vcf")
.map { file ->
[ [id: file.baseName], file ] // Create tuples with metadata (id) and file path
}
//
// WORKFLOW: Run main workflow
//
NF_PVACSEQ (
ch_maf_files,
ch_vcf_files
)
//
// SUBWORKFLOW: Run completion tasks
//
PIPELINE_COMPLETION (
params.monochrome_logs,
NF_PVACSEQ.out.iedb_dir,
NF_PVACSEQ.out.mode
)
}
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
THE END
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/