Repository navigation
Expand file tree
/
Copy pathnextflow.config
More file actions
52 lines (47 loc) · 2.3 KB
/
Copy pathnextflow.config
File metadata and controls
52 lines (47 loc) · 2.3 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
// Choose container engine by setting its `enabled` feature as true
docker.enabled = true
apptainer.enabled = false
singularity {
enabled = false
autoMounts = true
cacheDir = "${System.getenv('HOME')}/.singularity/mtg-images/"
// Bind common HPC folders (tmp, cache, scratch spaces, TMPDIR) into the containers, when they exist,
// so the binding is portable across HPC systems without hard-coded paths.
// (A single expression: recent Nextflow versions do not allow functions in config files.)
runOptions = [
'/tmp', '/var/tmp',
System.getenv('HOME') ? "${System.getenv('HOME')}/.cache".toString() : null,
'/scratch', '/lustre', '/work', '/gpfs/scratch',
System.getenv('TMPDIR'),
].findAll { path -> path && new File(path).exists() }
.unique()
.collect { path -> "--bind ${path}:${path}" }
.join(' ')
}
// The defaults of the parameters, from parameters.yaml (where they are described), under what the params file and the
// command line set. main.nf also completes the groups a params file gives in part (e.g. flashweave_args). The file
// is found from main.nf, and from the modules and sub-workflows run on their own (modules/x/, workflows/subworkflows/x/).
// (Expressions only: recent Nextflow versions do not allow functions in config files.)
params = [projectDir, "${projectDir}/../..", "${projectDir}/../../.."]
.collect { dir -> new File("${dir}/parameters.yaml") }
.findAll { f -> f.exists() }
.take(1)
.collect { f -> new groovy.yaml.YamlSlurper().parse(f) }
.collect { spec ->
(spec.sections*.parameters + [spec.internal]).sum().collectEntries { name, p ->
[name, { f, q -> q.parameters ? q.parameters.collectEntries { k, v -> [k, f.call(f, v)] } : q.value }
.with { f -> f.call(f, p) }]
}
}
.sum([:]) + params
// The files GEMs are reconstructed from: the proteins if given, else the genomes
params.recon_files = params.recon_files ?: (params.faa_dir ?: params.genomes)
profiles {
// Run the processes without a container engine, with the tools on the PATH, e.g. inside the
// microbetag server image (server/services/web/Dockerfile.v2)
local {
docker.enabled = false
singularity.enabled = false
apptainer.enabled = false
}
}