-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathmain.nf
More file actions
133 lines (121 loc) · 4.05 KB
/
main.nf
File metadata and controls
133 lines (121 loc) · 4.05 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
#!/usr/bin/env nextflow
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
nf-core/seqsubmit
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Github : https://github.com/nf-core/seqsubmit
Website: https://nf-co.re/seqsubmit
Slack : https://nfcore.slack.com/channels/seqsubmit
----------------------------------------------------------------------------------------
*/
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
IMPORT FUNCTIONS / MODULES / SUBWORKFLOWS / WORKFLOWS
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
include { GENOMESUBMIT } from './workflows/genomesubmit'
include { ASSEMBLYSUBMIT } from './workflows/assemblysubmit'
include { PIPELINE_INITIALISATION } from './subworkflows/local/utils_nfcore_seqsubmit_pipeline'
include { PIPELINE_COMPLETION } from './subworkflows/local/utils_nfcore_seqsubmit_pipeline'
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NAMED WORKFLOWS FOR PIPELINE
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
//
// WORKFLOW: Run main analysis pipeline depending on type of input
//
workflow NFCORE_SEQSUBMIT {
take:
samplesheet // channel: samplesheet read in from --input
main:
ch_multiqc_report = channel.empty()
//
// WORKFLOW: Run pipeline
//
// Depending on the input type (mags/bins or metagenomic_assemblies), one or the another workflow will be triggered
if (params.mode == "mags" || params.mode == "bins") {
GENOMESUBMIT (
samplesheet,
params.multiqc_config,
params.multiqc_logo,
params.multiqc_methods_description,
params.outdir,
params.mode,
params.submission_study,
params.study_metadata,
params.trna_limit,
params.rrna_limit,
params.checkm2_db,
params.checkm2_db_download_id,
params.cat_db,
params.cat_db_download_id,
params.centre_name,
params.upload_tpa,
params.test_upload,
params.webincli_mode
)
ch_multiqc_report = GENOMESUBMIT.out.multiqc_report
} else if (params.mode == "metagenomic_assemblies") {
ASSEMBLYSUBMIT (
samplesheet,
params.multiqc_config,
params.multiqc_logo,
params.multiqc_methods_description,
params.outdir,
params.submission_study,
params.study_metadata,
params.upload_tpa,
params.test_upload,
params.webincli_mode
)
ch_multiqc_report = ASSEMBLYSUBMIT.out.multiqc_report
}
emit:
multiqc_report = ch_multiqc_report // channel: /path/to/multiqc_report.html
}
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
RUN MAIN WORKFLOW
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
workflow {
main:
//
// SUBWORKFLOW: Run initialisation tasks
//
PIPELINE_INITIALISATION (
params.version,
params.validate_params,
params.monochrome_logs,
args,
params.outdir,
params.input,
params.mode,
params.help,
params.help_full,
params.show_hidden
)
//
// WORKFLOW: Run main workflow
//
NFCORE_SEQSUBMIT (
PIPELINE_INITIALISATION.out.samplesheet
)
//
// SUBWORKFLOW: Run completion tasks
//
PIPELINE_COMPLETION (
params.email,
params.email_on_fail,
params.plaintext_email,
params.outdir,
params.monochrome_logs,
NFCORE_SEQSUBMIT.out.multiqc_report
)
}
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
THE END
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/