-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathnextflow.config
More file actions
64 lines (55 loc) · 1.71 KB
/
nextflow.config
File metadata and controls
64 lines (55 loc) · 1.71 KB
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
params {
/* Input and output options */
genomes = "data/*.fa" // input genomes (FASTA format)
gtdbtk_db = "gtdbtk_db" // GTDB database
outdir = "./results" // output directory
/* Limits */
max_cpus = 8
max_memory = 70.GB
max_time = 168.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 = 'Assign objective taxonomic classifications to bacterial and archaeal genomes'
mainScript = 'main.nf'
version = '1.3.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
}
}
}