-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnextflow.config
More file actions
80 lines (68 loc) · 2.78 KB
/
nextflow.config
File metadata and controls
80 lines (68 loc) · 2.78 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
params {
/* Input and output options */
reads = "data/*{1,2}.fastq.gz" // input reads (FASTA/FASTQ, gzip compressed files also supported)
db = "db/*.fa" // genomes or sequences on which test the containment. Supported
// formats are FASTA (gzip compressed also supported) or mash
// sketches (if 'db_format = "sketch"')
db_format = "fasta" // db format, 'fasta' or 'sketch'
outdir = "./results" // output directory
/* Results filtering options */
min_identity = 0.99 // min identity to report (it should be >0.8)
max_pval = 0.05 // max p-value to report
winner_takes_all = false // winner-takes-all strategy
/* Mash sketch options (if db_format = 'fasta') */
sketch_size = 1000 // sketch size
amino_acid = false // amino acid alphabet
individual = false // sketch individual sequences, rather than whole files
/* Limits */
max_cpus = 8
max_memory = 32.GB
max_time = 24.h
scratch = false // Execute the process in a temporary folder that is local
// to the execution node (https://www.nextflow.io/docs/latest/process.html#scratch)
}
/* 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 = 'Containment estimation of genomes, proteomes, plasmids and other sequences'
mainScript = 'main.nf'
version = '1.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
}
}
}