-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.nf
executable file
·45 lines (28 loc) · 966 Bytes
/
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
nextflow.enable.dsl=2
include { FASTQC_WF } from './modules/fastqc'
include { STARSOLO_WF } from './modules/starsolo'
workflow {
Channel.fromPath("${params.readsfile}")
.ifEmpty { exit 1, "File not foud: ${params.readsfile}" }
.set { sampleInfoChannel }
samples_channel = sampleInfoChannel
.splitCsv(header:true)
.map { row -> tuple (row.SampleID,
tuple(file(row.R1.trim()),
file(row.R2.trim())))}
if (!params.skip_fastqc) {
FASTQC_WF(samples_channel, params.output_dir)
}
// Run STARSolo pipeline
if (params.aligner == "star") {
STARSOLO_WF(samples_channel, params.starindex, params.whitelist, params.output_dir)
}
}
// OnComplete
workflow.onComplete{
println( "\nPipeline completed successfully.\n\n" )
}
// OnError
workflow.onError{
println( "\nPipeline failed.\n\n" )
}