-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmain.nf
executable file
·72 lines (55 loc) · 2.13 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
#!/usr/bin/env nextflow
/*
################################################################################
Nextflow Definitions
################################################################################
*/
nextflow.enable.dsl=2
version = '0.0.1'
/*
################################################################################
Accessory functions to include
################################################################################
*/
include {callHelp; checkAndSetArgs; printArguments} from './lib/utilities.nf'
/*
################################################################################
Checking and printing input arguments
################################################################################
*/
callHelp(params, version) // Print help & version
checked_arg_map = checkAndSetArgs(params) // Check args for conflics
printArguments(checked_arg_map) // Print pretty args to terminal
/*
################################################################################
Implicit workflow: Run the RNA-seq sub-workflow
################################################################################
*/
workflow {
// Workflows
include { BCL2FASTQ } from './workflows/bcl2fastq' params(checked_arg_map)
include { RNASEQ } from './workflows/rnaseq' params(checked_arg_map)
// include { DEMULTIPLEX } from './workflows/demultiplex' params(checked_arg_map)
// SAGC sequencing run
if (checked_arg_map.path_bcl) {
BCL2FASTQ()
BCL2FASTQ.out.bcl2fq_reads.set { reads }
BCL2FASTQ.out.bcl2fq_stats.set { stats }
// // Bulk RNAseq - UMI in R1 and reads in R2
// if(checked_arg_map.multiplex) {
// BCL2FASTQ()
// DEMULTIPLEX(BCL2FASTQ.out.bcl2fq)
// DEMULTIPLEX.out.sabre.set { reads }
// // Normal sequencing run - paired or single with/without umi
// } else {
// BCL2FASTQ()
// BCL2FASTQ.out.bcl2fq_reads.set { reads }
// BCL2FASTQ.out.bcl2fq_stats.set { stats }
// }
// Custom dataset
} else {
Channel.empty().set { reads } // Only needed if BCL2FASTQ not being used
}
// RNA-seq sub-workflow
RNASEQ(reads)
}