-
Notifications
You must be signed in to change notification settings - Fork 2
/
nextflow.config
72 lines (61 loc) · 2.1 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
params {
/* Input and output options */
reads = "data/*{1,2}.fastq.gz" // input reads (FASTA/FASTQ, gzip and bzip2 compressed files also supported)
outdir = "./results" // output directory
single_end = false // true if the input reads are single-end
interleaved = false // true if the input paired-end reads are interleaved
kraken2_db = "kraken_db" // Kraken2 database directory
/* Kraken2 options */
report_zero_counts = false // reports taxa with no reads assigned to (or under) them
/* Bracken options */
read_len = 100 // read length in bp
/* Limits */
max_cpus = 8
max_memory = 64.GB
max_time = 96.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 = 'Kraken2/Bracken workflow'
mainScript = 'main.nf'
version = '1.2.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
}
}
}