-
Notifications
You must be signed in to change notification settings - Fork 81
/
nextflow.config
456 lines (410 loc) · 13.3 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
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
/*
* -------------------------------------------------
* nf-core/eager Nextflow config file
* -------------------------------------------------
* Default config options for all environments.
*/
// Global default params, used in configs
params {
// Workflow flags
genome = false
input = null
input_paths = null
single_end = false
outdir = './results'
publish_dir_mode = 'copy'
config_profile_name = null
// aws
awsqueue = null
awsregion = 'eu-west-1'
awscli = null
//Pipeline options
enable_conda = false
validate_params = true
schema_ignore_params = 'genome'
show_hidden_params = false
//Input reads
udg_type = 'none'
single_stranded = false
single_end = false
colour_chemistry = 4
bam = false
// Optional input information
snpcapture_bed = null
run_convertinputbam = false
//Input reference
fasta = null
bwa_index = null
bt2_index = null
fasta_index = null
seq_dict = null
large_ref = false
save_reference = false
// this is just to stop the iGenomes WARN as we set as FALSE by default. Otherwise should be overwritten by optional config load below.
genomes = false
//Skipping parts of the pipeline for impatient users
skip_fastqc = false
skip_adapterremoval = false
skip_preseq = false
skip_deduplication = false
skip_damage_calculation = false
skip_qualimap = false
//More defaults
complexity_filter_poly_g = false
complexity_filter_poly_g_min = 10
//Read clipping and merging parameters
clip_forward_adaptor = 'AGATCGGAAGAGCACACGTCTGAACTCCAGTCAC'
clip_reverse_adaptor = 'AGATCGGAAGAGCGTCGTGTAGGGAAAGAGTGTA'
clip_adapters_list = null
clip_readlength = 30
clip_min_read_quality = 20
min_adap_overlap = 1
skip_collapse = false
skip_trim = false
preserve5p = false
mergedonly = false
qualitymax = 41
run_post_ar_trimming = false
post_ar_trim_front = 7
post_ar_trim_tail = 7
post_ar_trim_front2 = 7
post_ar_trim_tail2 = 7
//Mapping algorithm
mapper = 'bwaaln'
bwaalnn = 0.01 // From Oliva et al. 2021 (10.1093/bib/bbab076)
bwaalnk = 2
bwaalnl = 1024 // From Oliva et al. 2021 (10.1093/bib/bbab076)
bwaalno = 2 // From Oliva et al. 2021 (10.1093/bib/bbab076)
circularextension = 500
circulartarget = 'MT'
circularfilter = false
bt2_alignmode = 'local' // from Cahill 2018 (10.1093/molbev/msy018) and, Poullet and Orlando (10.3389/fevo.2020.00105)
bt2_sensitivity = 'sensitive' // from Poullet and Orlando (10.3389/fevo.2020.00105)
bt2n = 0 // Do not set Cahill 2018 recommendation of 1 here, so not to 'hide' overriding bowtie2 presets
bt2l = 0
bt2_trim5 = 0
bt2_trim3 = 0
bt2_maxins = 500
//Mapped read removal from input FASTQ
hostremoval_input_fastq = false
hostremoval_mode = 'remove'
//BAM Filtering steps (default = discard unmapped reads)
run_bam_filtering = false
bam_mapping_quality_threshold = 0
bam_filter_minreadlength = 0
bam_unmapped_type = 'discard'
//DeDuplication settings
dedupper = 'markduplicates'
dedup_all_merged = false
//Preseq settings
preseq_step_size = 1000
preseq_mode = 'c_curve'
preseq_bootstrap = 100
preseq_maxextrap = 10000000000
preseq_cval = 0.95
preseq_terms = 100
//Damage estimation settings
damage_calculation_tool = 'damageprofiler'
damageprofiler_length = 100
damageprofiler_threshold = 15
damageprofiler_yaxis = 0.30
mapdamage_downsample = 0
mapdamage_yaxis = 0.30
//PMDTools settings
run_pmdtools = false
pmdtools_range = 10
pmdtools_threshold = 3
pmdtools_reference_mask = null
pmdtools_max_reads = 10000
pmdtools_platypus = false
// mapDamage
run_mapdamage_rescaling = false
rescale_length_5p = 0
rescale_length_3p = 0
rescale_seqlength = 12
//Bedtools settings
run_bedtools_coverage = false
anno_file = null
anno_file_is_unsorted = false
//bamUtils trimbam settings
run_trim_bam = false
bamutils_clip_double_stranded_half_udg_left = 0
bamutils_clip_double_stranded_half_udg_right = 0
bamutils_clip_double_stranded_none_udg_left = 0
bamutils_clip_double_stranded_none_udg_right = 0
bamutils_clip_single_stranded_half_udg_left = 0
bamutils_clip_single_stranded_half_udg_right = 0
bamutils_clip_single_stranded_none_udg_left = 0
bamutils_clip_single_stranded_none_udg_right = 0
bamutils_softclip = false
//Genotyping options
run_genotyping = false
genotyping_tool = null
genotyping_source = 'raw'
// gatk options
gatk_call_conf = 30
gatk_ploidy = 2
gatk_downsample = 250
gatk_dbsnp = null
gatk_hc_out_mode = 'EMIT_VARIANTS_ONLY'
gatk_hc_emitrefconf = 'GVCF'
gatk_ug_genotype_model = 'SNP'
gatk_ug_out_mode = 'EMIT_VARIANTS_ONLY'
gatk_ug_keep_realign_bam = false
gatk_ug_defaultbasequalities = null
// freebayes options
freebayes_C = 1
freebayes_g = 0
freebayes_p = 2
// Sequencetools pileupCaller
pileupcaller_snpfile = null
pileupcaller_bedfile = null
pileupcaller_method = 'randomHaploid'
pileupcaller_transitions_mode = 'AllSites'
pileupcaller_min_map_quality = 30
pileupcaller_min_base_quality = 30
// ANGSD Genotype Likelihoods
angsd_glmodel = 'samtools'
angsd_glformat = 'binary'
angsd_createfasta = false
angsd_fastamethod = 'random'
run_bcftools_stats = true
//Consensus sequence generation
run_vcf2genome = false
vcf2genome_outfile = ''
vcf2genome_header = ''
vcf2genome_minc = 5
vcf2genome_minq = 30
vcf2genome_minfreq = 0.8
//MultiVCFAnalyzer Options
run_multivcfanalyzer = false
write_allele_frequencies = false
min_genotype_quality = 30
min_base_coverage = 5
min_allele_freq_hom = 0.9
min_allele_freq_het = 0.9
additional_vcf_files = null
reference_gff_annotations = 'NA'
reference_gff_exclude = 'NA'
snp_eff_results = 'NA'
//mtnucratio
run_mtnucratio = false
mtnucratio_header = 'MT'
//Sex.DetERRmine settings
run_sexdeterrmine = false
sexdeterrmine_bedfile = null
//Nuclear contamination based on chromosome X heterozygosity.
run_nuclear_contamination = false
contamination_chrom_name = 'X' // Default to using hs37d5 name
// taxonomic classifier
run_metagenomic_screening = false
metagenomic_complexity_filter = false
metagenomic_complexity_entropy = 0.3
metagenomic_tool = null
database = null
metagenomic_min_support_reads = 1
percent_identity = 85
malt_mode = 'BlastN'
malt_alignment_mode = 'SemiGlobal'
malt_top_percent = 1
malt_min_support_mode = 'percent'
malt_min_support_percent = 0.01
malt_max_queries = 100
malt_memory_mode = 'load'
malt_sam_output = false
// maltextract - only including number
// parameters if default documented or duplicate of MALT
run_maltextract = false
maltextract_taxon_list = null
maltextract_ncbifiles = null
maltextract_filter = 'def_anc'
maltextract_toppercent = 0.01
maltextract_destackingoff = false
maltextract_downsamplingoff = false
maltextract_duplicateremovaloff = false
maltextract_matches = false
maltextract_megansummary = false
maltextract_percentidentity = 85.0
maltextract_topalignment = false
// Boilerplate options
multiqc_config = false
email = false
email_on_fail = false
max_multiqc_email_size = 25.MB
plaintext_email = false
monochrome_logs = false
help = false
igenomes_base = 's3://ngi-igenomes/igenomes'
tracedir = "${params.outdir}/pipeline_info"
igenomes_ignore = true
custom_config_version = 'master'
custom_config_base = "https://raw.githubusercontent.com/nf-core/configs/${params.custom_config_version}"
hostnames = false
config_profile_name = null
config_profile_description = false
config_profile_contact = false
config_profile_url = false
validate_params = true
show_hidden_params = false
schema_ignore_params = 'genomes,input_paths'
// Defaults only, expecting to be overwritten
max_memory = 128.GB
max_cpus = 16
max_time = 240.h
}
// Container slug. Stable releases should specify release tag!
// Developmental code should specify :dev
process.container = 'nfcore/eager:2.5.2'
// Load base.config by default for all pipelines
includeConfig 'conf/base.config'
// Load nf-core custom profiles from different Institutions
try {
includeConfig "${params.custom_config_base}/nfcore_custom.config"
} catch (Exception e) {
System.err.println("WARNING: Could not load nf-core/config profiles: ${params.custom_config_base}/nfcore_custom.config")
}
// Load nf-core/eager custom profiles from different institutions
try {
includeConfig "${params.custom_config_base}/pipeline/eager.config"
} catch (Exception e) {
System.err.println("WARNING: Could not load nf-core/config/eager profiles: ${params.custom_config_base}/pipeline/eager.config")
}
profiles {
conda {
docker.enabled = false
singularity.enabled = false
podman.enabled = false
shifter.enabled = false
charliecloud.enabled = false
process.conda = "$projectDir/environment.yml"
}
debug { process.beforeScript = 'echo $HOSTNAME' }
docker {
docker.enabled = true
singularity.enabled = false
podman.enabled = false
shifter.enabled = false
charliecloud.enabled = false
// Avoid this error:
// WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap.
// Testing this in nf-core after discussion here https://github.com/nf-core/tools/pull/351
// once this is established and works well, nextflow might implement this behavior as new default.
docker.runOptions = '-u \$(id -u):\$(id -g)'
}
singularity {
docker.enabled = false
singularity.enabled = true
podman.enabled = false
shifter.enabled = false
charliecloud.enabled = false
singularity.autoMounts = true
}
podman {
singularity.enabled = false
docker.enabled = false
podman.enabled = true
shifter.enabled = false
charliecloud.enabled = false
}
shifter {
singularity.enabled = false
docker.enabled = false
podman.enabled = false
shifter.enabled = true
charliecloud.enabled = false
}
charliecloud {
singularity.enabled = false
docker.enabled = false
podman.enabled = false
shifter.enabled = false
charliecloud.enabled = true
}
test { includeConfig 'conf/test.config'}
test_direct { includeConfig 'conf/test_direct.config' }
test_full { includeConfig 'conf/test_full.config' }
test_bam { includeConfig 'conf/test_bam.config'}
test_fna { includeConfig 'conf/test_fna.config'}
test_humanbam { includeConfig 'conf/test_humanbam.config' }
test_pretrim { includeConfig 'conf/test_pretrim.config' }
test_kraken { includeConfig 'conf/test_kraken.config' }
test_tsv_bam { includeConfig 'conf/test_tsv_bam.config'}
test_tsv_fna { includeConfig 'conf/test_tsv_fna.config'}
test_tsv_humanbam { includeConfig 'conf/test_tsv_humanbam.config' }
test_tsv_pretrim { includeConfig 'conf/test_tsv_pretrim.config' }
test_tsv_kraken { includeConfig 'conf/test_tsv_kraken.config' }
test_tsv_complex { includeConfig 'conf/test_tsv_complex.config' }
test_stresstest_human { includeConfig 'conf/test_stresstest_human.config' }
benchmarking_human { includeConfig 'conf/benchmarking_human.config' }
benchmarking_vikingfish { includeConfig 'conf/benchmarking_vikingfish.config' }
}
// Load igenomes.config if required
if (!params.igenomes_ignore) {
includeConfig 'conf/igenomes.config'
}
// 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"
}
manifest {
name = 'nf-core/eager'
author = 'The nf-core/eager community'
homePage = 'https://github.com/nf-core/eager'
description = 'A fully reproducible and state-of-the-art ancient DNA analysis pipeline'
mainScript = 'main.nf'
nextflowVersion = '>=20.07.1'
version = '2.5.2'
}
// 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
}
}
}