-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.nf
36 lines (28 loc) · 938 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
process rampart {
container "${params.wf.container}"
publishDir "${params.out_dir}", mode: 'copy'
input:
path protocol
path fastq_ch
path barcodes_ch
output:
path annotations
script:
extra = ""
if ( params.barcodes_csv )
extra += " --barcode ${barcodes_ch}"
if ( params.extra_flags )
extra += " ${params.extra_flags}"
"""
rampart --protocol ${protocol} --basecalledPath ${fastq_ch} --clearAnnotated ${extra}
"""
}
workflow {
fastq_ch = channel.fromPath("${params.fastq}", checkIfExists:true)
protocol_ch = channel.fromPath("${projectDir}/protocols/${params.protocol}", checkIfExists:true)
if (params.barcodes_csv)
barcodes_ch = channel.fromPath("${params.barcodes_csv}", checkIfExists:true)
else
barcodes_ch = channel.fromPath("${projectDir}/${params.default_barcodes_csv}", checkIfExists:true)
rampart(protocol_ch, fastq_ch, barcodes_ch)
}