forked from nextflow-io/rnaseq-nf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdemo.nf
80 lines (69 loc) · 2.15 KB
/
demo.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
/*
* Copyright (c) 2013-2019, Centre for Genomic Regulation (CRG) and the authors.
*
* This file is part of 'RNASEQ-NF'.
*
* RNASEQ-NF is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* RNASEQ-NF is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with RNASEQ-NF. If not, see <http://www.gnu.org/licenses/>.
*/
/*
* Proof of concept of a RNAseq pipeline implemented with Nextflow
*
* Authors:
* - Paolo Di Tommaso <paolo.ditommaso@gmail.com>
* - Emilio Palumbo <emiliopalumbo@gmail.com>
* - Evan Floden <evanfloden@gmail.com>
*/
/*
* enables modules
*/
nextflow.preview.dsl = 2
/*
* Default pipeline parameters. They can be overriden on the command line eg.
* given `params.foo` specify on the run command line `--foo some_value`.
*/
params.reads = "$baseDir/data/ggal/*_{1,2}.fq"
params.ref1 = "$baseDir/data/ggal/ref1.fa"
params.ref2 = "$baseDir/data/ggal/ref2.fa"
params.outdir = "results"
params.multiqc = "$baseDir/multiqc"
log.info """\
R N A S E Q - N F P I P E L I N E
===================================
ref1: : ${params.ref1}
ref2: : ${params.ref2}
reads : ${params.reads}
outdir : ${params.outdir}
"""
// import modules
include './modules/rnaseq' params(params)
workflow ref1 {
get: reads
main: RNASEQ( params.ref1, reads, params.multiqc)
}
workflow ref2 {
get:reads
main: RNASEQ( params.ref2, reads, params.multiqc)
}
// main flow
workflow {
reads = Channel.fromFilePairs( params.reads, checkIfExists: true )
ref1(reads)
ref2(reads)
}
/*
* completion handler
*/
workflow.onComplete {
log.info ( workflow.success ? "\nDone! Open the following report in your browser --> $params.outdir/multiqc_report.html\n" : "Oops .. something went wrong" )
}