-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.nf
40 lines (30 loc) · 864 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
#!/usr/bin/env nextflow
nextflow.enable.dsl=2
include { prokka } from './modules/prokka'
include { roary; roary_plots } from './modules/roary'
include { raxml } from './modules/gubbins'
workflow {
Channel
.fromPath( params.genomes )
.map { file -> tuple(file.baseName, file) }
.set { genomes_ch }
if (params.annotate) {
proteins_file = file(params.proteins, type: 'file')
prokka(genomes_ch, proteins_file)
gff_ch = prokka.out.gff
} else {
gff_ch = genomes_ch
}
gff_collection_ch = gff_ch
.map { row -> row[1] }
.collect()
roary(gff_collection_ch)
if (!params.skip_core_tree){
raxml(roary.out.aln)
tree_ch = raxml.out.tree
}
else {
tree_ch = roary.out.accessory_tree
}
roary_plots(tree_ch, roary.out.gene_pa)
}