-
Notifications
You must be signed in to change notification settings - Fork 1
/
nextflow.config
179 lines (169 loc) · 6.28 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
manifest {
name = 'ngsmanager'
author = '[email protected]'
homePage = 'https://github.com/genpat-it/cohesive-ngsmanager'
description = ''
mainScript = 'main.nf'
nextflowVersion = ''
version = '1.0.0'
defaultBranch = 'master'
}
def MAX_MEMORY = System.getenv("NXF_EXECUTOR_MEMORY") ?: '200.GB'
def MAX_CPU = System.getenv("NXF_EXECUTOR_CPU") ?: '64'
params {
// Defaults only, expecting to be overwritten
max_memory = MAX_MEMORY
max_cpus = MAX_CPU
max_time = '24h'
outdir = './results'
tracedir = "./pipeline_info"
inputdir =''
report_dir = "./pipeline_info"
timeline_dir = "./pipeline_info"
dag_dir = "./pipeline_info"
assets_dir = "${projectDir}/assets"
hosts_dir = ''
use_run_date = false
always_retry = false
max_retries = 2
full_output = false
error_strategy_after_retries = 'finish'
check_file_existence = true
step_1PP_trimming__chopper__minlength = 500
step_1PP_trimming__chopper__quality = 10
step_2AS_denovo__flye__genome_size = ''
step_2AS_denovo__flye__meta = false
step_2AS_filtering__seqio = ''
step_2AS_hybrid__unicycler__mode = 'normal'
step_2AS_mapping__ivar___q = 20
step_3TX_class__centrifuge__db_name = ''
step_3TX_class__centrifuge__db_path = ''
step_3TX_class__kraken__db_bracken = ''
step_3TX_class__kraken__db_kraken = ''
step_3TX_class__kraken2__db = ''
step_3TX_species__blast___blastdb = ''
step_3TX_species__blast___num_threads = 64
step_3TX_species__kmerfinder__dbs = ''
step_3TX_species__vdabricate__db = ''
step_4AN_AMR__blast__db_name = ''
step_4AN_AMR__blast__db_path = ''
step_4TY_lineage__westnile___references = "westnile_lineage_references.json"
step_4TY_lineage__westnile___threshold = 0.85
step_4TY_MLST__mlst___excluded_schemas = 'ecoli,abaumannii,vcholerae_2,flaA'
module_obitools__trimmomatic_min_len = 50
module_obitools__trimmomatic_sliding_window = '10:20'
module_obitools__illuminapairedend_score_min = '40'
module_obitools__obiclean_d = '1'
module_obitools__obiclean_r = '0.05'
module_obitools__blast_evalue = '0.0001'
module_obitools__blast_identity= '0.97'
multi_pangenome__panaroo__clean_mode = 'strict'
multi_pangenome__panaroo__threshold = '0.95'
multi_pangenome__panaroo__family_threshold = '0.7'
multi_pangenome__panaroo__len_dif_percent = '0.98'
multi_pangenome__panaroo__threads = 32
multi_pangenome__panaroo__extra = ''
multi_clustering__augur__align_extra = ''
multi_clustering__augur__ancestral_extra = ''
multi_clustering__augur__ancestral_inference = 'joint'
multi_clustering__augur__export_extra = ''
multi_clustering__augur__refine_coalescent = 'opt'
multi_clustering__augur__refine_extra = ''
multi_clustering__augur__traits_columns = ''
multi_clustering__augur__traits_extra = ''
multi_clustering__augur__translate_extra =''
multi_clustering__augur__tree_method = 'iqtree'
multi_clustering__augur__tree_extra = ''
multi_clustering__reportree__input = 'alleles'
multi_clustering__reportree__sample_of_interest = ''
multi_clustering__reportree__zoom_cluster_of_interest = ''
multi_clustering__reportree__thr = ''
multi_clustering__reportree__extra = ''
multi_clustering__reportree__report_threshold = ''
multi_clustering__reportree__HC_threshold = ''
multi_clustering__reportree__loci_called = ''
multi_clustering__reportree__site_inclusion = ''
multi_clustering__reportree__summary_columns = ''
multi_clustering__reportree__summary_date_aliases = 'none_alias/none_alias'
multi_clustering__reportree__summary_sample_column = ''
multi_clustering__reportree__summary_geo_column = ''
multi_clustering__cfsan__version = '2.0.2'
skip_checkm = true
skip_bestref_mapping = false
raw_reads_threshold = 0
segmented_mapping = false
incompatible_step_warning = true
ncbi_max_download_assembly = '10M'
ncbi_max_download_sra = '3G'
allelic_profile_encoding = 'crc32'
}
profiles {
cohesive { includeConfig 'profiles/cohesive.config' }
scratch { includeConfig 'profiles/scratch.config' }
}
process {
errorStrategy = { getErrorStrategy(task) }
maxRetries = params.max_retries
maxErrors = '-1'
shell = ['/bin/bash', '-euo', 'pipefail']
memory = params.max_memory
time = params.max_time
}
executor {
name = 'local'
cpus = params.max_cpus
memory = params.max_memory
}
/* docker */
docker {
enabled = true
runOptions = "-u \$(id -u):\$(id -g) --memory-swappiness 0 --cpus ${params.max_cpus}"
fixOwnership = true
}
/* reports */
def report_suffix = params.containsKey('report_suffix') ? (params.report_suffix ?: '') : '_' + new java.text.SimpleDateFormat("yyMMdd.HHmmss").format(new Date())
def report_prefix = params.containsKey('report_prefix') ? (params.report_prefix ?: '') : ''
timeline {
enabled = true
file = "${params.timeline_dir}/${report_prefix}timeline${report_suffix}.html"
}
report {
enabled = true
file = "${params.report_dir}/${report_prefix}report${report_suffix}.html"
}
trace {
enabled = true
file = "${params.tracedir}/${report_prefix}trace${report_suffix}.txt"
fields = 'task_id,hash,native_id,process,tag,name,status,exit,module,container,cpus,time,disk,memory,attempt,submit,start,complete,duration,realtime,queue,%cpu,%mem,rss,vmem,peak_rss,peak_vmem,rchar,wchar,syscr,syscw,read_bytes,write_bytes,vol_ctxt,inv_ctxt,workdir,scratch,error_action'
}
dag {
// GraphViz installation required
enabled = false
file = "${params.dag_dir}/${report_prefix}dag${report_suffix}.svg"
}
def getErrorStrategy(task) {
try {
if (!task) {
// should NOT happen
return params.error_strategy_after_retries
}
if (task.getMemory() == params.max_memory && task.getTime() == params.max_time) {
// already using max memory and max time: no need to retry
return params.error_strategy_after_retries
}
// task.exitStatus > 255 -> process timeout
def result = (task.exitStatus in [143,137,104,134,139] || params.always_retry) && (task.attempt <= params.max_retries)
return result ? 'retry' : params.error_strategy_after_retries
} catch (t) {
println "unexpected exception: ${t.asString()}"
return params.error_strategy_after_retries
}
}
def checkRequiredParameter(key) {
if (!params.containsKey(key) || !(params[key])) {
System.err.println("""
'${key}' is a required parameter
""");
System.exit(2)
}
}