forked from qbic-pipelines/rnadeseq
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.nf
94 lines (85 loc) · 3.92 KB
/
main.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
93
94
#!/usr/bin/env nextflow
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
qbic-pipelines/rnadeseq
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Github : https://github.com/qbic-pipelines/rnadeseq
----------------------------------------------------------------------------------------
*/
nextflow.enable.dsl = 2
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
GENOME PARAMETER VALUES
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
//Either genome needs to be set or the parameters gtf (for rsem/salmon) and organism, library and keytype
//(for pathway analysis) have to be provided separately
//-->gtf is necessary for rsem and salmon
if (params.input_type in ["rsem", "salmon"]) {
if (!params.genome && !params.gtf) { exit 1, 'Please provide either genome or gtf file!' }
else if (!params.gtf) {
params.gtf = WorkflowMain.getGenomeAttribute(params, 'gtf')
if (!params.gtf) {
exit 1, 'It seems that for your genome, no gtf file is defined. Please provide a gtf with the --gtf parameter or open a github issue: https://github.com/qbic-pipelines/rnadeseq/issues'
}
}
}
//-->organism, library and keytype are necessary for pathway analysis
if (!params.skip_pathway_analysis) {
if (!params.genome && !params.organism) { exit 1, 'Please provide either genome or organism!' }
else if (!params.organism) {
params.organism = WorkflowMain.getGenomeAttribute(params, 'organism')
if (!params.organism) {
exit 1, 'It seems that for your genome, no organism is defined. Please provide the organism with the --organism parameter or open a github issue: https://github.com/qbic-pipelines/rnadeseq/issues'
}
}
if (!params.genome && !params.library) { exit 1, 'Please provide either genome or library!' }
else if (!params.library) {
params.library = WorkflowMain.getGenomeAttribute(params, 'library')
if (!params.library) {
exit 1, 'It seems that for your genome, no library is defined. Please provide the library with the --library parameter or open a github issue: https://github.com/qbic-pipelines/rnadeseq/issues'
}
}
if (!params.genome && !params.keytype) { exit 1, 'Please provide either genome or keytype!' }
else if (!params.keytype) {
params.keytype = WorkflowMain.getGenomeAttribute(params, 'keytype')
if (!params.keytype) {
exit 1, 'It seems that for your genome, no keytype is defined. Please provide the keytype with the --keytype parameter or open a github issue: https://github.com/qbic-pipelines/rnadeseq/issues'
}
}
}
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
VALIDATE & PRINT PARAMETER SUMMARY
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
WorkflowMain.initialise(workflow, params, log)
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NAMED WORKFLOW FOR PIPELINE
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
include { RNADESEQ } from './workflows/rnadeseq'
//
// WORKFLOW: Run main qbic-pipelines/rnadeseq analysis pipeline
//
workflow QBIC_RNADESEQ {
RNADESEQ ()
}
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
RUN ALL WORKFLOWS
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/
//
// WORKFLOW: Execute a single named workflow for the pipeline
// See: https://github.com/nf-core/rnaseq/issues/619
//
workflow {
QBIC_RNADESEQ ()
}
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
THE END
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*/