-
Notifications
You must be signed in to change notification settings - Fork 82
/
Copy pathnextflow.config
506 lines (462 loc) · 20.8 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
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
/*
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
nf-core/eager Nextflow config file
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Default config options for all compute environments
----------------------------------------------------------------------------------------
*/
// Global default params, used in configs
params {
// TODO nf-core: Specify your pipeline's command line flags
// Input options
input = null
// Input BAM conversion
convert_inputbam = false
// References
genome = null
igenomes_base = 's3://ngi-igenomes/igenomes/'
igenomes_ignore = false
// MultiQC options
multiqc_config = null
multiqc_title = null
multiqc_logo = null
max_multiqc_email_size = '25.MB'
multiqc_methods_description = null
// Main references
fasta = null
fasta_fai = null
fasta_dict = null
fasta_mapperindexdir = null
fasta_circular_target = null
fasta_largeref = false
fasta_sheet = null
fasta_circularmapper_elongationfactor = 500
fasta_circularmapper_elongatedfasta = null
fasta_circularmapper_elongatedindex = null
// Shard Fastq options
run_fastq_sharding = false
fastq_shard_size = 1000000
// bedtools options
run_bedtools_coverage = false
mapstats_bedtools_featurefile = null
// Boilerplate options
outdir = null
publish_dir_mode = 'copy'
email = null
email_on_fail = null
plaintext_email = false
monochrome_logs = false
hook_url = null
help = false
version = false
pipelines_testdata_base_path = 'https://raw.githubusercontent.com/nf-core/test-datasets/'
// Config options
config_profile_name = null
config_profile_description = null
custom_config_version = 'master'
custom_config_base = "https://raw.githubusercontent.com/nf-core/configs/${params.custom_config_version}"
config_profile_contact = null
config_profile_url = null
// Max resource options
// Defaults only, expecting to be overwritten
max_memory = '128.GB'
max_cpus = 16
max_time = '240.h'
// Schema validation default options
validationFailUnrecognisedParams = false
validationLenientMode = false
validationSchemaIgnoreParams = 'genomes,igenomes_base'
validationShowHiddenParams = false
validate_params = true
// References
save_reference = false
// Sequencing QC
sequencing_qc_tool = 'fastqc'
// Preprocessing
// TODO Add validation checks for tool specific params
skip_preprocessing = false
preprocessing_tool = 'fastp'
preprocessing_skippairmerging = false
preprocessing_excludeunmerged = false
preprocessing_skipadaptertrim = false
preprocessing_adapter1 = null
preprocessing_adapter2 = null
preprocessing_adapterlist = null
preprocessing_minlength = 25
preprocessing_savepreprocessedreads = false
preprocessing_trim5p = 0 // WARN: slightly different behaviour between fastp & adapterremoval
preprocessing_trim3p = 0 // WARN: slightly different behaviour between fastp & adapterremoval
preprocessing_fastp_complexityfilter = false
preprocessing_fastp_complexityfilter_threshold = 10
preprocessing_adapterremoval_preserve5p = false
preprocessing_adapterremoval_adapteroverlap = 1
preprocessing_adapterremoval_skipqualitytrimming = false
preprocessing_adapterremoval_trimbasequalitymin = 20
preprocessing_adapterremoval_skipntrimming = false
preprocessing_adapterremoval_qualitymax = 41
// Mapping
mapping_tool = 'bwaaln'
mapping_bwaaln_n = 0.01 // From Oliva et al. 2021 (10.1093/bib/bbab076)
mapping_bwaaln_k = 2
mapping_bwaaln_l = 1024 // From Oliva et al. 2021 (10.1093/bib/bbab076)
mapping_bwaaln_o = 2 // From Oliva et al. 2021 (10.1093/bib/bbab076)
mapping_bwamem_k = 19
mapping_bwamem_r = 1.5
mapping_bowtie2_alignmode = 'local'
mapping_bowtie2_sensitivity = 'sensitive'
mapping_bowtie2_n = 0
mapping_bowtie2_l = 20
mapping_bowtie2_trim5 = 0
mapping_bowtie2_trim3 = 0
mapping_bowtie2_maxins = 500
mapping_circularmapper_circularfilter = false
// BAM Filtering
run_bamfiltering = false
bamfiltering_minreadlength = 0
bamfiltering_mappingquality = 0
bamfilter_genomicbamfilterflag = 4
bamfiltering_retainunmappedgenomicbam = false // downstream genomics only
bamfiltering_generateunmappedfastq = false
bamfiltering_generatemappedfastq = false
bamfiltering_savefilteredbams = false // can include unmapped reads if --bamfiltering_retainunmappedgenomicbam specified
// Metagenomic Screening
run_metagenomics = false
metagenomics_input = 'unmapped' // mapped, all, unmapped -> mapped vs all specified in SAMTOOLS_FASTQ_MAPPED in modules.conf, unmapped hardcoded SAMTOOLS_FASTQ_UNMAPPED
run_metagenomics_complexityfiltering = false
metagenomics_complexity_tool = 'bbduk'
metagenomics_complexity_savefastq = false
metagenomics_complexity_entropy = 0.3
metagenomics_prinseq_mode = 'entropy' // entropy or dust
metagenomics_prinseq_dustscore = 0.5
metagenomics_profiling_tool = null
metagenomics_profiling_database = null
metagenomics_krakenuniq_ramchunksize = "16G"
metagenomics_kraken2_savereads = false
metagenomics_kraken2_savereadclassifications = false
metagenomics_kraken2_saveminimizers = false
metagenomics_malt_mode = 'BlastN'
metagenomics_malt_alignmentmode = 'SemiGlobal'
metagenomics_malt_savereads = false
metagenomics_malt_minsupportmode = 'percent'
metagenomics_malt_minsupportpercent = 0.01
metagenomics_malt_minsupportreads = 1
metagenomics_malt_minpercentidentity = 85
metagenomics_malt_toppercent = 1
metagenomics_malt_maxqueries = 100
metagenomics_malt_memorymode = 'load'
metagenomics_malt_group_size = 0
metagenomics_run_postprocessing = false
metagenomics_maltextract_taxonlist = null
metagenomics_maltextract_ncbidir = null
metagenomics_maltextract_filter = 'def_anc'
metagenomics_maltextract_toppercent = 0.01
metagenomics_maltextract_destackingoff = false
metagenomics_maltextract_downsamplingoff = false
metagenomics_maltextract_duplicateremovaloff = false
metagenomics_maltextract_matches = false
metagenomics_maltextract_megansummary = false
metagenomics_maltextract_minpercentidentity = 85.0
metagenomics_maltextract_usetopalignment = false
// Host Removal
run_host_removal = false
host_removal_mode = 'remove' // remove, replace
// Deduplication options
skip_deduplication = false
deduplication_tool = 'markduplicates'
// Qualimap
skip_qualimap = false
snpcapture_bed = null
// Contamination estimation
run_contamination_estimation_angsd = false
contamination_estimation_angsd_chrom_name = 'X'
contamination_estimation_angsd_range_from = 5000000
contamination_estimation_angsd_range_to = 154900000
contamination_estimation_angsd_mapq = 30
contamination_estimation_angsd_minq = 30
contamination_estimation_angsd_hapmap = "${projectDir}/assets/angsd_resources/HapMapChrX.gz"
// MtNucRatio
run_mtnucratio = false
mitochondrion_header = 'MT'
// Mapping statistics options
// Preseq
mapstats_skip_preseq = false
mapstats_preseq_stepsize = 1000
mapstats_preseq_mode = 'c_curve'
mapstats_preseq_maxextrap = 10000000000
mapstats_preseq_terms = 100
mapstats_preseq_bootstrap = 100
mapstats_preseq_cval = 0.95
mapstats_preseq_defects_mode = false
// Damage Calculation options
skip_damagecalculation = false
damagecalculation_tool = 'damageprofiler'
damagecalculation_yaxis = 0.3
damagecalculation_xaxis = 25
damagecalculation_damageprofiler_length = 100
damagecalculation_mapdamage_downsample = 0
// Damage Manipulation options
run_mapdamage_rescaling = false
damage_manipulation_rescale_seqlength = 12
damage_manipulation_rescale_length_5p = 0
damage_manipulation_rescale_length_3p = 0
run_pmd_filtering = false
damage_manipulation_pmdtools_threshold = 3
damage_manipulation_pmdtools_masked_reference = null
damage_manipulation_pmdtools_reference_mask = null
run_trim_bam = false
damage_manipulation_bamutils_trim_double_stranded_none_udg_left = 0
damage_manipulation_bamutils_trim_double_stranded_none_udg_right = 0
damage_manipulation_bamutils_trim_double_stranded_half_udg_left = 0
damage_manipulation_bamutils_trim_double_stranded_half_udg_right = 0
damage_manipulation_bamutils_trim_single_stranded_none_udg_left = 0
damage_manipulation_bamutils_trim_single_stranded_none_udg_right = 0
damage_manipulation_bamutils_trim_single_stranded_half_udg_left = 0
damage_manipulation_bamutils_trim_single_stranded_half_udg_right = 0
damage_manipulation_bamutils_softclip = false
// Sex determination
run_sexdeterrmine = false
sexdeterrmine_bedfile = null
// Genotyping
run_genotyping = false
genotyping_tool = null
genotyping_source = null
skip_bcftools_stats = false
genotyping_reference_ploidy = 2
genotyping_pileupcaller_min_base_quality = 30
genotyping_pileupcaller_min_map_quality = 30
genotyping_pileupcaller_bedfile = null
genotyping_pileupcaller_snpfile = null
genotyping_pileupcaller_method = 'randomHaploid'
genotyping_pileupcaller_transitions_mode = 'AllSites'
genotyping_gatk_call_conf = 30
genotyping_gatk_dbsnp = null
genotyping_gatk_ug_downsample = 250
genotyping_gatk_ug_out_mode = 'EMIT_VARIANTS_ONLY'
genotyping_gatk_ug_genotype_mode = 'SNP'
genotyping_gatk_ug_defaultbasequalities = -1
genotyping_gatk_ug_keeprealignbam = false
genotyping_gatk_hc_out_mode = 'EMIT_VARIANTS_ONLY'
genotyping_gatk_hc_emitrefconf = 'GVCF'
genotyping_freebayes_min_alternate_count = 1
genotyping_freebayes_skip_coverage = 0
genotyping_angsd_glmodel = 'samtools'
genotyping_angsd_glformat = 'binary'
}
// 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")
}
// Additional configs for subworkflows
includeConfig 'subworkflows/nf-core/bam_split_by_region/nextflow.config'
includeConfig 'subworkflows/nf-core/bam_docounts_contamination_angsd/nextflow.config'
includeConfig 'subworkflows/nf-core/fastq_align_bwaaln/nextflow.config'
profiles {
debug {
dumpHashes = true
process.beforeScript = 'echo $HOSTNAME'
cleanup = false
nextflow.enable.configProcessNamesValidation = true
}
conda {
conda.enabled = true
docker.enabled = false
singularity.enabled = false
podman.enabled = false
shifter.enabled = false
charliecloud.enabled = false
conda.channels = ['conda-forge', 'bioconda', 'defaults']
apptainer.enabled = false
}
mamba {
conda.enabled = true
conda.useMamba = true
docker.enabled = false
singularity.enabled = false
podman.enabled = false
shifter.enabled = false
charliecloud.enabled = false
apptainer.enabled = false
}
docker {
docker.enabled = true
conda.enabled = false
singularity.enabled = false
podman.enabled = false
shifter.enabled = false
charliecloud.enabled = false
apptainer.enabled = false
docker.runOptions = '-u $(id -u):$(id -g)'
}
arm {
docker.runOptions = '-u $(id -u):$(id -g) --platform=linux/amd64'
}
singularity {
singularity.enabled = true
singularity.autoMounts = true
conda.enabled = false
docker.enabled = false
podman.enabled = false
shifter.enabled = false
charliecloud.enabled = false
apptainer.enabled = false
}
podman {
podman.enabled = true
conda.enabled = false
docker.enabled = false
singularity.enabled = false
shifter.enabled = false
charliecloud.enabled = false
apptainer.enabled = false
}
shifter {
shifter.enabled = true
conda.enabled = false
docker.enabled = false
singularity.enabled = false
podman.enabled = false
charliecloud.enabled = false
apptainer.enabled = false
}
charliecloud {
charliecloud.enabled = true
conda.enabled = false
docker.enabled = false
singularity.enabled = false
podman.enabled = false
shifter.enabled = false
apptainer.enabled = false
}
apptainer {
apptainer.enabled = true
apptainer.autoMounts = true
conda.enabled = false
docker.enabled = false
singularity.enabled = false
podman.enabled = false
shifter.enabled = false
charliecloud.enabled = false
}
wave {
apptainer.ociAutoPull = true
singularity.ociAutoPull = true
wave.enabled = true
wave.freeze = true
wave.strategy = 'conda,container'
}
gitpod {
executor.name = 'local'
executor.cpus = 4
executor.memory = 8.GB
}
test { includeConfig 'conf/test.config' }
test_full { includeConfig 'conf/test_full.config' }
test_nothing { includeConfig 'conf/test_nothing.config' }
test_humanbam { includeConfig 'conf/test_humanbam.config' }
test_multiref { includeConfig 'conf/test_multiref.config' }
test_kraken2 { includeConfig 'conf/test_kraken2.config' }
test_malt { includeConfig 'conf/test_malt.config' }
test_krakenuniq { includeConfig 'conf/test_krakenuniq.config'}
test_metaphlan { includeConfig 'conf/test_metaphlan.config' }
}
// Set default registry for Apptainer, Docker, Podman and Singularity independent of -profile
// Will not be used unless Apptainer / Docker / Podman / Singularity are enabled
// Set to your registry if you have a mirror of containers
apptainer.registry = 'quay.io'
docker.registry = 'quay.io'
podman.registry = 'quay.io'
singularity.registry = 'quay.io'
// Nextflow plugins
plugins {
id '[email protected]' // Validation of pipeline parameters and creation of an input channel from a sample sheet
}
// Load igenomes.config if required
if (!params.igenomes_ignore) {
includeConfig 'conf/igenomes.config'
} else {
params.genomes = [:]
}
// Export these variables to prevent local Python/R libraries from conflicting with those in the container
// The JULIA depot path has been adjusted to a fixed path `/usr/local/share/julia` that needs to be used for packages in the container.
// See https://apeltzer.github.io/post/03-julia-lang-nextflow/ for details on that. Once we have a common agreement on where to keep Julia packages, this is adjustable.
env {
PYTHONNOUSERSITE = 1
R_PROFILE_USER = "/.Rprofile"
R_ENVIRON_USER = "/.Renviron"
JULIA_DEPOT_PATH = "/usr/local/share/julia"
}
// Capture exit codes from upstream processes when piping
process.shell = ['/bin/bash', '-euo', 'pipefail']
// Disable process selector warnings by default. Use debug profile to enable warnings.
nextflow.enable.configProcessNamesValidation = false
def trace_timestamp = new java.util.Date().format( 'yyyy-MM-dd_HH-mm-ss')
timeline {
enabled = true
file = "${params.outdir}/pipeline_info/execution_timeline_${trace_timestamp}.html"
}
report {
enabled = true
file = "${params.outdir}/pipeline_info/execution_report_${trace_timestamp}.html"
}
trace {
enabled = true
file = "${params.outdir}/pipeline_info/execution_trace_${trace_timestamp}.txt"
}
dag {
enabled = true
file = "${params.outdir}/pipeline_info/pipeline_dag_${trace_timestamp}.html"
}
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 = '!>=23.04.0'
version = '3.0.0dev'
doi = '10.7717/peerj.10947'
}
// Load modules.config for DSL2 module specific options
includeConfig 'conf/modules.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
}
}
}