-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.nf
121 lines (87 loc) · 2.21 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
#!/usr/bin/env nextflow
nextflow.enable.dsl=2
params.library = null
params.indexs = null
params.output = null
params.eln = null
params.override = null
params.seqonly = null
params.type = null
process illumina_sample_sheet {
publishDir "${params.output}", mode: 'copy', pattern: 'samplesheet_demux.csv'
container "wzheng0520/samplesheet_demux:samplesheet_demux"
input:
path library
path indexs
path output
val eln
output:
path "samplesheet_demux.csv", emit: samplesheet_demux
script:
template 'illumina.py'
}
process tenx_sample_sheet {
publishDir "${params.output}", mode: 'copy', pattern: 'samplesheet_demux.csv'
container "wzheng0520/samplesheet_demux:samplesheet_demux"
cpus 2
memory '8 GB'
input:
path library
path indexs
path output
val eln
val override
output:
path "samplesheet_demux.csv", emit: samplesheet_demux
script:
template 'tenx.py'
}
process seqonly_sample_sheet {
publishDir "${params.output}", mode: 'copy', pattern: 'samplesheet_demux.csv'
container "wzheng0520/samplesheet_demux:samplesheet_demux"
input:
path library
val eln
val type
val override
output:
path "samplesheet_demux.csv", emit: samplesheet_demux
script:
template 'seqonly.py'
}
process neb_sample_sheet {
publishDir "${params.output}", mode: 'copy', pattern: 'samplesheet_demux.csv'
container "wzheng0520/samplesheet_demux:samplesheet_demux"
input:
path library
path indexs
val eln
output:
path "samplesheet_demux.csv", emit: samplesheet_demux
script:
template 'neb.py'
}
workflow {
library = Channel.of(params.library)
indexs = Channel.of(params.indexs)
output = Channel.of(params.output)
eln = Channel.of(params.eln)
type = Channel.of(params.type)
override = Channel.of(params.override)
seqonly = Channel.of(params.seqonly)
file_path_output = Channel.fromPath(params.output).map{ it+ '/samplesheet_demux.csv' }
if (params.seqonly == 'yes'){
seqonly_sample_sheet(library, eln, type, override)
}
else{
if (params.type == "illumina") {
illumina_sample_sheet(library, indexs, file_path_output, eln)
}
else if (params.type == "10x") {
tenx_sample_sheet(library, indexs, file_path_output, eln, override)
}
else {
neb_sample_sheet(library, indexs, eln)
}
}
}