forked from metashot/prok-annotate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnextflow.config
85 lines (71 loc) · 2.76 KB
/
nextflow.config
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
params {
/* Input and output options */
genomes = "data/*.fa" // input contigs or genomes in FASTA format
outdir = "./results" // output directory
/* General options (except Anvi'o kofam) */
metagenome = false // Improve gene predictions for metagenomes and
// short sequences (<100kbp, e.g viruses)
/* Prokka options */
skip_prokka = false // skip prokka
prokka_kingdom = "Bacteria" // Archaea, Bacteria, Mitochondria, Viruses
/* eggNOG options */
run_eggnog = false // run eggNOG (database required)
eggnog_db = "none" // eggNOG v5.0 db dir. 'none': download from Internet
eggnog_db_mem = false // store the eggNOG sqlite DB into memory (~44GB memory
// required). This increase the annotation speed.
/* KofamScan options */
run_kofamscan = false // run KofamScan (database required)
kofamscan_db = "none" // KofamScan db dir. 'none': download from Internet
/* Anvi'o kofam options */
run_anvio_kofam = false // run KofamScan
anvio_kofam_db = "none" // Anvi'o Kofam db dir. 'none': download from Internet
/* Limits */
max_cpus = 6
max_memory = 64.GB
max_time = 480.h
}
/* Docker options */
docker.enabled = true
docker.runOptions = '-u \$(id -u):\$(id -g)'
/* Import process configuration file*/
includeConfig 'process.config'
/* Manifest */
manifest {
homePage = 'metashot.github.io'
description = 'Annotation pipeline for prokaryotic genomes and metagenomes'
mainScript = 'main.nf'
version = '3.0.0'
}
/* Functions */
def check_max(obj, max) {
// see https://github.com/nextflow-io/nextflow/issues/640
if( obj instanceof nextflow.util.MemoryUnit ) {
try {
def max_type = max as nextflow.util.MemoryUnit
return obj.compareTo(max_type) == 1 ? max_type : obj
}
catch( all ) {
println "ERROR: invalid max memory '${max}', using default value: $obj"
return obj
}
}
if( obj instanceof nextflow.util.Duration ) {
try {
def max_type = max as nextflow.util.Duration
return obj.compareTo(max_type) == 1 ? max_type : obj
}
catch( all ) {
println "ERROR: invalid max time '${max}', using default value $obj"
return obj
}
}
if( obj instanceof Integer ) {
try {
return Math.min(obj, max as int)
}
catch( all ) {
println "ERROR: invalid max cpus '${max}', using default value $obj"
return obj
}
}
}