-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.nf
60 lines (40 loc) · 1.36 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
#!/usr/bin/env nextflow
// enable dsl2
nextflow.enable.dsl=2
// include modules
include {SUBSAMPLE} from './modules/assemble.nf'
include {ASSEMBLE} from './modules/assemble.nf'
include {POLISH} from './modules/assemble.nf'
include {SEQKIT} from './modules/assemble.nf'
include {PROKKA} from './modules/assemble.nf'
include {BAKTA_DOWNLOAD} from './modules/assemble.nf'
include {BAKTA} from './modules/assemble.nf'
include {ROARY} from './modules/assemble.nf'
include {SPADES} from './modules/assemble.nf'
include {MLST} from './modules/assemble.nf'
workflow {
// channels
Channel.fromPath( "${params.inputFastq}/*" )
.map{ file -> tuple(file.simpleName, file) }
.set{ ch_fqs }
Channel.fromPath("${params.inputmodel}")
.set{ ch_model }
Channel.fromFilePairs("illumina_fqs/*{1,2}.fastq.gz")
.map{ row -> tuple(row[0], row[1][0], row[1][1])}
.set{illumina_fqs}
main:
SUBSAMPLE(ch_fqs)
ASSEMBLE(SUBSAMPLE.out.fq)
SEQKIT(ASSEMBLE.out.fasta)
POLISH(ASSEMBLE.out.fasta.combine(SUBSAMPLE.out.fq, by:0), ch_model)
//PROKKA(ASSEMBLE.out.fasta)
BAKTA_DOWNLOAD()
SPADES(illumina_fqs)
contigs=POLISH.out.fasta.mix(SPADES.out.fasta)
BAKTA(contigs.combine(BAKTA_DOWNLOAD.out))
gff3s=BAKTA.out.gff3
.map{ row -> row[1]}
.collect()
ROARY(gff3s)
MLST(contigs)
}