-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathnextflow.config
248 lines (227 loc) · 7.51 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
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
manifest {
name = 'panHiTE'
author = 'Kang Hu'
homePage = 'https://github.com/CSU-KangHu/HiTE'
description = 'detecting intact transposable elements based on genome assembly'
mainScript = 'main.nf'
nextflowVersion = '!>=21.04.0'
version = '0.0.1'
}
params {
// from nanome
conda_base_dir = null // sample: /opt/conda
conda_name = null // sample: /opt/conda/envs/HiTE
conda_cache = 'local_conda_cache'
docker_name = "kanghu/hite:3.2.0"
singularity_name = "docker://kanghu/hite:3.2.0"
singularity_cache = 'local_singularity_cache'
// Specify your pipeline's command line flags
// Input options
help = false
genome = null
out_dir = null
fixed_extend_base_threshold = 1000
chunk_size = 400
tandem_region_cutoff = 0.5
max_repeat_len = 30000
chrom_seg_length = 1000000
flanking_len = 50
plant = 1
recover = 0
classified = 1
domain = 0
annotate = 0
remove_nested = 1
debug = 0
is_denovo_nonltr = 1
miu = '1.3e-8'
threads = 10
is_output_LTR_lib = 1
use_HybridLTR = 1
use_NeuralTE = 1
is_wicker = 0
classify_chunk_size = 500
search_struct = 1
curated_lib = null
// ===================================================================================
skip_HiTE = 0
BM_RM2 = 0
BM_EDTA = 0
BM_HiTE = 0
species = 'test'
EDTA_home = ''
// ===================================================================================
dependencies = ["LTR_retriever", "RepeatMasker", "rmblastn", "RepeatModeler"]
dep_satisfied = false
// Max resource options
// Defaults only, expecting to be overwritten
max_memory = '200.GB'
max_cpus = 40
max_time = '360.h'
tracedir = "${params.out_dir}/pipeline_info"
}
// Load base.config by default for all pipelines
includeConfig 'nextflow_base.config'
profiles {
debug { process.beforeScript = 'echo $HOSTNAME' }
conda {
//params.enable_conda = true
conda.enabled = true
docker.enabled = false
singularity.enabled = false
podman.enabled = false
shifter.enabled = false
charliecloud.enabled = false
process.conda = params.conda_name
conda.cacheDir = params.conda_cache
}
docker {
params {
containerOptions = null
}
process.container = params.docker_name
process.containerOptions = params.containerOptions
docker.envWhitelist = ''
docker.enabled = true
docker.userEmulation = true
singularity.enabled = false
podman.enabled = false
shifter.enabled = false
charliecloud.enabled = false
}
singularity {
params {
containerOptions = ""
}
process {
container = params.singularity_name
containerOptions = params.containerOptions
}
singularity.cacheDir = params.singularity_cache
singularity.envWhitelist = ''
singularity.enabled = true
singularity.autoMounts = true
docker.enabled = false
podman.enabled = false
shifter.enabled = false
charliecloud.enabled = false
}
// hpc with singularity-loading, refer from nanome
hpc { // general hpc configuration
params {
// hpc slurm default parameters
qos = 'cpuq'
partition = 'cpuQ'
queue = partition
processors = 48
memory = '100.GB'
time = '30.d'
gresOptions = null // 'gpu:1'
account = 'pi_wangjianxin_r'
queueSize = 16 // max number of job submit
//qos_gpu = "gpuq"
//partition_gpu = 'gpu2Q'
//queue_gpu = partition_gpu
//gresOptions_gpu = 'gpu:1'
// Defaults max resource
max_memory = 200.GB
max_cpus = 48
max_time = 360.h
}
process {
executor = 'slurm'
queue = params.queue
qos = params.qos
cpus = params.processors
memory = params.memory
time = params.time
clusterOptions = "-A ${params.account} -q ${params.qos} -c ${params.processors} -p ${params.partition} ${params.gresOptions ? '--gres=' + params.gresOptions : ' '}"
// beforeScript = 'module load singularity' // this is for combining singularity with hpc
}
executor {
queueSize = params.queueSize
submitRateLimit = '60/1min'
exitReadTimeout = '10 min'
pollInterval = '60 sec'
queueGlobalStatus = true
}
}
podman {
podman.enabled = true
docker.enabled = false
singularity.enabled = false
shifter.enabled = false
charliecloud.enabled = false
}
shifter {
shifter.enabled = true
docker.enabled = false
singularity.enabled = false
podman.enabled = false
charliecloud.enabled = false
}
charliecloud {
charliecloud.enabled = true
docker.enabled = false
singularity.enabled = false
podman.enabled = false
shifter.enabled = false
}
}
// Export these variables to prevent local Python/R libraries from conflicting with those in the container
env {
PYTHONNOUSERSITE = 1
R_PROFILE_USER = "/.Rprofile"
R_ENVIRON_USER = "/.Renviron"
}
// Capture exit codes from upstream processes when piping
process.shell = ['/bin/bash', '-euo', 'pipefail']
def trace_timestamp = new java.util.Date().format( 'yyyy-MM-dd_HH-mm-ss')
timeline {
enabled = true
file = "${params.tracedir}/execution_timeline_${trace_timestamp}.html"
}
report {
enabled = true
file = "${params.tracedir}/execution_report_${trace_timestamp}.html"
}
trace {
enabled = true
file = "${params.tracedir}/execution_trace_${trace_timestamp}.txt"
}
dag {
enabled = true
file = "${params.tracedir}/pipeline_dag_${trace_timestamp}.svg"
}
// 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
}
}
}