9
9
----------------------------------------------------------------------------------------
10
10
*/
11
11
12
- /*
13
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
14
- GENOME PARAMETER VALUES
15
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
16
- */
12
+ nextflow. preview. output = true
17
13
18
14
params. fasta = getGenomeAttribute(' fasta' )
19
15
params. additional_fasta = getGenomeAttribute(' additional_fasta' )
@@ -29,30 +25,25 @@ params.hisat2_index = getGenomeAttribute('hisat2')
29
25
params. salmon_index = getGenomeAttribute(' salmon' )
30
26
params. kallisto_index = getGenomeAttribute(' kallisto' )
31
27
32
- /*
33
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
34
- IMPORT FUNCTIONS / MODULES / SUBWORKFLOWS / WORKFLOWS
35
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
36
- */
37
-
38
28
include { RNASEQ } from ' ./workflows/rnaseq'
39
29
include { PREPARE_GENOME } from ' ./subworkflows/local/prepare_genome'
40
30
include { PIPELINE_INITIALISATION } from ' ./subworkflows/local/utils_nfcore_rnaseq_pipeline'
41
31
include { PIPELINE_COMPLETION } from ' ./subworkflows/local/utils_nfcore_rnaseq_pipeline'
42
32
include { checkMaxContigSize } from ' ./subworkflows/local/utils_nfcore_rnaseq_pipeline'
43
33
44
- /*
45
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
46
- NAMED WORKFLOWS FOR PIPELINE
47
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
48
- */
49
-
50
- //
51
- // WORKFLOW: Run main analysis pipeline
52
- //
53
- workflow NFCORE_RNASEQ {
34
+ workflow {
54
35
55
36
main :
37
+ //
38
+ // SUBWORKFLOW: Run initialisation tasks
39
+ //
40
+ PIPELINE_INITIALISATION (
41
+ params. version,
42
+ params. validate_params,
43
+ params. monochrome_logs,
44
+ args,
45
+ params. outdir
46
+ )
56
47
57
48
//
58
49
// SUBWORKFLOW: Prepare reference genome files
@@ -93,6 +84,27 @@ workflow NFCORE_RNASEQ {
93
84
.map { checkMaxContigSize(it) }
94
85
}
95
86
87
+ ch_genome = Channel . empty(). mix(
88
+ PREPARE_GENOME . out. fasta,
89
+ PREPARE_GENOME . out. gtf,
90
+ PREPARE_GENOME . out. gff,
91
+ PREPARE_GENOME . out. add_fasta,
92
+ PREPARE_GENOME . out. gene_bed,
93
+ PREPARE_GENOME . out. transcript_fasta,
94
+ PREPARE_GENOME . out. fai,
95
+ PREPARE_GENOME . out. chrom_sizes,
96
+ )
97
+
98
+ ch_genome_index = Channel . empty(). mix(
99
+ PREPARE_GENOME . out. splicesites,
100
+ PREPARE_GENOME . out. bbsplit_index,
101
+ PREPARE_GENOME . out. star_index,
102
+ PREPARE_GENOME . out. rsem_index,
103
+ PREPARE_GENOME . out. hisat2_index,
104
+ PREPARE_GENOME . out. salmon_index,
105
+ PREPARE_GENOME . out. kallisto_index,
106
+ )
107
+
96
108
//
97
109
// WORKFLOW: Run nf-core/rnaseq workflow
98
110
//
@@ -116,38 +128,6 @@ workflow NFCORE_RNASEQ {
116
128
PREPARE_GENOME . out. splicesites
117
129
)
118
130
119
- emit :
120
- trim_status = RNASEQ . out. trim_status // channel: [id, boolean]
121
- map_status = RNASEQ . out. map_status // channel: [id, boolean]
122
- strand_status = RNASEQ . out. strand_status // channel: [id, boolean]
123
- multiqc_report = RNASEQ . out. multiqc_report // channel: /path/to/multiqc_report.html
124
- }
125
-
126
- /*
127
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
128
- RUN MAIN WORKFLOW
129
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
130
- */
131
-
132
- workflow {
133
-
134
- main :
135
- //
136
- // SUBWORKFLOW: Run initialisation tasks
137
- //
138
- PIPELINE_INITIALISATION (
139
- params. version,
140
- params. validate_params,
141
- params. monochrome_logs,
142
- args,
143
- params. outdir
144
- )
145
-
146
- //
147
- // WORKFLOW: Run main workflow
148
- //
149
- NFCORE_RNASEQ ()
150
-
151
131
//
152
132
// SUBWORKFLOW: Run completion tasks
153
133
//
@@ -158,18 +138,68 @@ workflow {
158
138
params. outdir,
159
139
params. monochrome_logs,
160
140
params. hook_url,
161
- NFCORE_RNASEQ . out. multiqc_report,
162
- NFCORE_RNASEQ . out. trim_status,
163
- NFCORE_RNASEQ . out. map_status,
164
- NFCORE_RNASEQ . out. strand_status
141
+ RNASEQ . out. multiqc_report,
142
+ RNASEQ . out. trim_status,
143
+ RNASEQ . out. map_status,
144
+ RNASEQ . out. strand_status
165
145
)
146
+
147
+ publish :
148
+ genome = ch_genome
149
+ genome_index = ch_genome_index
150
+ star_salmon = RNASEQ . out. star_salmon
151
+ star_salmon_deseq_qc = RNASEQ . out. star_salmon_deseq_qc
152
+ star_rsem = RNASEQ . out. star_rsem
153
+ star_rsem_deseq_qc = RNASEQ . out. star_rsem_deseq_qc
154
+ hisat2 = RNASEQ . out. hisat2
155
+ multiqc_report = RNASEQ . out. multiqc_report
156
+ multiqc_data = RNASEQ . out. multiqc_data
157
+ multiqc_plots = RNASEQ . out. multiqc_plots
166
158
}
167
159
168
- /*
169
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
170
- FUNCTIONS
171
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
172
- */
160
+ output {
161
+ genome {
162
+ enabled params. save_reference
163
+ path ' genome'
164
+ }
165
+
166
+ genome_index {
167
+ enabled params. save_reference
168
+ path ' genome/index'
169
+ }
170
+
171
+ star_salmon {
172
+ path ' star_salmon'
173
+ }
174
+
175
+ star_salmon_deseq_qc {
176
+ path ' star_salmon/deseq2_qc'
177
+ }
178
+
179
+ star_rsem {
180
+ path ' star_rsem'
181
+ }
182
+
183
+ star_rsem_deseq_qc {
184
+ path ' star_rsem/deseq2_qc'
185
+ }
186
+
187
+ hisat2 {
188
+ path ' hisat2'
189
+ }
190
+
191
+ multiqc_report {
192
+ path params. skip_alignment ? ' multiqc' : " multiqc/${ params.aligner} "
193
+ }
194
+
195
+ multiqc_data {
196
+ path params. skip_alignment ? ' multiqc' : " multiqc/${ params.aligner} "
197
+ }
198
+
199
+ multiqc_plots {
200
+ path params. skip_alignment ? ' multiqc' : " multiqc/${ params.aligner} "
201
+ }
202
+ }
173
203
174
204
//
175
205
// Get attribute from genome config file e.g. fasta
@@ -183,9 +213,3 @@ def getGenomeAttribute(attribute) {
183
213
}
184
214
return null
185
215
}
186
-
187
- /*
188
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
189
- THE END
190
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
191
- */
0 commit comments