This repository has been archived by the owner on Jan 27, 2020. It is now read-only.
forked from nf-core/sarek
-
Notifications
You must be signed in to change notification settings - Fork 7
/
nextflow.config
152 lines (148 loc) · 4.85 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
/*
* -------------------------------------------------
* Nextflow config file for Sarek
* -------------------------------------------------
* Default config options for all environments.
* Cluster-specific config options should be saved
* in the configuration folder and imported under a
* profile name here.
*/
manifest {
author = 'Szilvester Juhos, Maxime Garcia'
description = 'Sarek - Workflow For Somatic And Germline Variations'
homePage = 'http://sarek.scilifelab.se'
mainScript = 'main.nf'
name = 'Sarek'
nextflowVersion = '>=0.32.0'
version = '2.3'
}
env {
NXF_OPTS="-Xms1g"
}
profiles {
// AWS Batch with Docker profile
// Docker images will be pulled automatically
awsbatch {
includeConfig 'conf/base.config'
includeConfig 'conf/aws-batch.config'
includeConfig 'conf/docker.config'
includeConfig 'conf/igenomes.config'
includeConfig 'conf/resources.config'
includeConfig 'conf/containers.config'
}
// Default config for german BinAC cluster
// Runs the pipeline using the pbs executor
// Singularity images will be pulled automatically
binac {
includeConfig 'conf/base.config'
includeConfig 'conf/binac.config'
includeConfig 'conf/igenomes.config'
includeConfig 'conf/singularity.config'
includeConfig 'conf/resources.config'
includeConfig 'conf/containers.config'
}
// Default profile for BTB server
// Runs the pipeline locally
// Singularity images need to be set up
btb {
includeConfig 'conf/base.config'
includeConfig 'conf/resources.config'
includeConfig 'conf/munin.config'
includeConfig 'conf/igenomes.config'
includeConfig 'conf/singularity-path.config'
}
// Default config for CFC cluster in Tuebingen/Germany
cfc {
includeConfig 'conf/base.config'
includeConfig 'conf/cfc.config'
includeConfig 'conf/igenomes.config'
includeConfig 'conf/singularity.config'
includeConfig 'conf/resources.config'
includeConfig 'conf/containers.config'
}
// Defines a conda environment.yml file in the current directory.
// Careful when using it with other profiles as it might overwrite
// the genomes/igenomes.config
conda {
includeConfig 'conf/base.config'
includeConfig 'conf/travis.config'
includeConfig 'conf/genomes.config'
includeConfig 'conf/conda.config'
}
// Small testing with Docker profile
// Docker images will be pulled automatically
docker {
includeConfig 'conf/base.config'
includeConfig 'conf/travis.config'
includeConfig 'conf/genomes.config'
includeConfig 'conf/docker.config'
includeConfig 'conf/containers.config'
}
// Small testing with Singularity profile
// Singularity images will be pulled automatically
singularity {
includeConfig 'conf/base.config'
includeConfig 'conf/travis.config'
includeConfig 'conf/genomes.config'
includeConfig 'conf/singularity.config'
includeConfig 'conf/containers.config'
}
// Small testing with Singularity profile
// Singularity images need to be set up
singularityPath {
includeConfig 'conf/base.config'
includeConfig 'conf/travis.config'
includeConfig 'conf/genomes.config'
includeConfig 'conf/singularity-path.config'
}
// slurm profile for UPPMAX secure clusters
// Runs the pipeline using the job scheduler
// Singularity images are already set up
slurm {
includeConfig 'conf/base.config'
includeConfig 'conf/uppmax-slurm.config'
includeConfig 'conf/genomes.config'
includeConfig 'conf/singularity-path.config'
}
// Default profile for UPPMAX secure clusters
// Runs the pipeline locally on a single 16-core node
// Singularity images are already set up
standard {
includeConfig 'conf/base.config'
includeConfig 'conf/uppmax-localhost.config'
includeConfig 'conf/genomes.config'
includeConfig 'conf/singularity-path.config'
}
}
// Function to ensure that resource requirements don't go beyond
// a maximum limit
def check_max(obj, type) {
if(type == 'memory'){
try {
if(obj.compareTo(params.max_memory as nextflow.util.MemoryUnit) == 1)
return params.max_memory as nextflow.util.MemoryUnit
else
return obj
} catch (all) {
println " ### ERROR ### Max memory '${params.max_memory}' is not valid! Using default value: $obj"
return obj
}
} else if(type == 'time'){
try {
if(obj.compareTo(params.max_time as nextflow.util.Duration) == 1)
return params.max_time as nextflow.util.Duration
else
return obj
} catch (all) {
println " ### ERROR ### Max time '${params.max_time}' is not valid! Using default value: $obj"
return obj
}
} else if(type == 'cpus'){
try {
return Math.min( obj, params.max_cpus as int )
} catch (all) {
println " ### ERROR ### Max cpus '${params.max_cpus}' is not valid! Using default value: $obj"
return obj
}
}
}