-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnextflow.config
222 lines (186 loc) · 6.47 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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
crisprSNF Nextflow config file
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Default config options for all compute environments
----------------------------------------------------------------------------------------
*/
// Global default params, used in configs
params {
// Input options
input = null
// Qc
skip_fastqc = false
// References
genome = null
save_reference = true
publish_dir_mode = 'copy'
save_align_intermeds = false
skip_markduplicates = false
skip_outliers = false
}
manifest {
name = 'crisprSNF'
author = 'Gualdrini Francesco'
homePage = 'https://github.com/'
description = 'Crispr screening / ....'
mainScript = 'main.nf'
nextflowVersion = '!>=21.10.3'
version = '3.8.1'
}
//Profile config names for nf-core/configs
params {
config_profile_description = 'The European Institute for oncology HPC cluster profile '
config_profile_contact = 'Francesco Gualdrini'
max_memory = 80.GB
max_cpus = 18
max_time = '240.h'
}
timeline {
overwrite = true
enabled = true
file = 'timeline.html'
}
dag {
overwrite = true
enabled = true
file = 'pipeline_dag.html'
}
trace {
overwrite = true
enabled = true
file = 'trace.txt'
}
report {
overwrite = true
enabled = true
file = 'report.html'
}
singularity {
enabled = true
autoMounts = true
runOptions = ' --bind /hpcnfs/ --bind /hpcscratch/ieo/ieo5244/ --bind /scratch/'
envWhitelist = 'LD_PRELOAD,PETASUITE_REFPATH'
}
env {
PATH='$PATH:/hpcnfs/software/singularity/3.11.4/bin/:/hpcnfs/software/anaconda/anaconda3/bin/'
LD_PRELOAD="/hpcnfs/techunits/bioinformatics/software/petagene/petalink_1.3.15/bin/petalink.so"
PETASUITE_REFPATH="/hpcnfs/techunits/bioinformatics/software/petagene/petalink_1.3.15/species"
}
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
}
}
}
executor {
$pbspro {
queueSize = 10
submitRateLimit = '5/1min'
exitReadTimeout = '10 min'
}
$local {
cpus = 2
queueSize = 1
memory = '6 GB'
}
}
process {
executor = 'pbspro'
queue = 'workq'
clusterOptions = { "-l select=1:ncpus=${task.cpus}:mem=${task.memory.toMega()}mb -l maxarray_20=1" }
stageInMode = 'symlink'
stageOutMode = 'copy'
scratch = '/hpcscratch/ieo/ieo5244/'
container = '/hpcnfs/techunits/bioinformatics/singularity/genomics23_v2.16.sif'
cpus = { check_max( 1 * task.attempt, 'cpus' ) }
memory = { check_max( 6.GB * task.attempt, 'memory' ) }
time = { check_max( 4.h * task.attempt, 'time' ) }
errorStrategy = { task.exitStatus in [143,137,104,134,139] ? 'retry' : 'finish' }
maxRetries = 5
maxErrors = '-1'
publishDir = [
path: { "${params.outdir}/${task.process.tokenize(':')[-1].tokenize('_')[0].toLowerCase()}" },
mode: params.publish_dir_mode
]
withLabel: 'process_low' {
cpus = { check_max( 2 * task.attempt, 'cpus' ) }
memory = { check_max( 6.GB * task.attempt, 'memory' ) }
time = { check_max( 4.h * task.attempt, 'time' ) }
}
withLabel: 'process_medium' {
cpus = { check_max( 4 * task.attempt, 'cpus' ) }
memory = { check_max( 24.GB * task.attempt, 'memory' ) }
time = { check_max( 8.h * task.attempt, 'time' ) }
}
withLabel: 'process_high' {
cpus = { check_max( 10 * task.attempt, 'cpus' ) }
memory = { check_max( 36.GB * task.attempt, 'memory' ) }
time = { check_max( 72.h * task.attempt, 'time' ) }
}
withLabel: 'process_high_memory' {
cpus = { check_max( 5 * task.attempt, 'cpus' ) }
memory = { check_max( 32.GB * task.attempt, 'memory' ) }
time = { check_max( 72.h * task.attempt, 'time' ) }
}
withLabel: 'process_long' {
cpus = { check_max( 5 * task.attempt, 'cpus' ) }
memory = { check_max( 24.GB * task.attempt, 'memory' ) }
time = { check_max( 72.h * task.attempt, 'time' ) }
}
withName: 'CRISPRSNF:.*:SAM_BAM_SORT_INDEX_SAMTOOLS:BAM_STATS_SAMTOOLS:.*' {
publishDir = [
path: { "${params.outdir}/${params.aligner}/samtools_stats" },
mode: params.publish_dir_mode,
pattern: "*.{stats,flagstat,idxstats}"
]
}
withName: 'CRISPRSNF:.*:SAM_BAM_SORT_INDEX_SAMTOOLS:SAMTOOLS_SORT:.*' {
publishDir = [
path: { "${params.outdir}/${params.aligner}" },
mode: params.publish_dir_mode,
pattern: "*.bam",
]
}
withName: 'CRISPRSNF:.*:SAM_BAM_SORT_INDEX_SAMTOOLS:SAMTOOLS_INDEX' {
publishDir = [
path: { "${params.outdir}/${params.aligner}" },
mode: params.publish_dir_mode,
pattern: "*.{bam}"
]
}
withName: 'NORMDEG' {
queue = 'nocg_workq'
cpus = { check_max( 9 * task.attempt, 'cpus' ) }
memory = { check_max( 45.GB * task.attempt, 'memory' ) }
time = { check_max( 14.h * task.attempt, 'time' ) }
publishDir = [
path: { "${params.outdir}/CrisprRes" },
mode: params.publish_dir_mode
]
}
}