forked from GlobalPneumoSeq/gps-pipeline
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnextflow.config
195 lines (173 loc) · 5.68 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
nextflow.enable.dsl=2
// Default parameters that can be overridden
params {
// Show help message
help = false
// Alternative workflow for initialisation only
init = false
// Alternative workflow for getting versions of pipeline and tools
version = false
// Default directory for input reads
reads = "$projectDir/input"
// Default output directory
output = "$projectDir/output"
// Default databases directory for saving all the required databases
db = "$projectDir/databases"
// Default assembler
assembler = "shovill"
// Default assembler thread count (0 means all)
assembler_thread = 0
// Default minimum contig length
min_contig_length = 500
// Default assembly publish mode
assembly_publish = "link"
// Default link for SeroBA repository, and KMC kmer size for SeroBA
seroba_db_remote = "https://github.com/GlobalPneumoSeq/seroba/archive/refs/tags/v2.0.4.tar.gz"
seroba_kmer = 71
// Default link for Kraken2 Database, and usage of memory mapping
kraken2_db_remote = "https://genome-idx.s3.amazonaws.com/kraken/minikraken2_v1_8GB_201904.tgz"
kraken2_memory_mapping = true
// Default referece genome assembly path for its BWA database
ref_genome = "$projectDir/data/ATCC_700669_v1.fa"
// Default links for PopPUNK Database and External Clusters
poppunk_db_remote = "https://gps-project.cog.sanger.ac.uk/GPS_v9.tar.gz"
poppunk_ext_remote = "https://gps-project.cog.sanger.ac.uk/GPS_v9_external_clusters.csv"
// Default values for QC
spneumo_percentage = 60.00
non_strep_percentage = 2.00
ref_coverage = 60.00
het_snp_site = 220
contigs = 500
length_low = 1900000
length_high = 2300000
depth = 20.00
// Default ARIBA referece sequences and metadata paths
ariba_ref = "$projectDir/data/ariba_ref_sequences.fasta"
ariba_metadata = "$projectDir/data/ariba_metadata.tsv"
// Default resistance phenotypes to MIC (minimum inhibitory concentration) lookup table
resistance_to_mic = "$projectDir/data/resistance_to_MIC.tsv"
// Toggle for removing .bam and .sam files mid-run to reduce storage requirement
// Warning: This will break the -resume function of Nextflow
lite = false
}
// Set auto-retry and process container images
process {
maxRetries = 2
errorStrategy = { task.attempt <= process.maxRetries ? 'retry' : 'ignore' }
withLabel: bash_container {
container = 'wbitt/network-multitool:69aa4d5'
}
withLabel: python_container {
container = 'amancevice/pandas:2.0.2'
}
withLabel: fastp_container {
container = 'staphb/fastp:0.23.4'
}
withLabel: unicycler_container {
container = 'staphb/unicycler:0.5.0'
}
withLabel: shovill_container {
container = 'staphb/shovill:1.1.0-2022Dec'
}
withLabel: quast_container {
container = 'staphb/quast:5.0.2'
}
withLabel: bwa_container {
container = 'staphb/bwa:0.7.17'
}
withLabel: samtools_container {
container = 'staphb/samtools:1.16'
}
withLabel: bcftools_container {
container = 'staphb/bcftools:1.16'
}
withLabel: poppunk_container {
container = 'staphb/poppunk:2.6.3'
}
withLabel: spn_pbp_amr_container {
container = 'sangerbentleygroup/spn-pbp-amr:23.10.2'
}
withLabel: ariba_container {
container = 'staphb/ariba:2.14.6'
}
withLabel: mlst_container {
container = 'staphb/mlst:2.23.0-2024-07-01'
}
withLabel: kraken2_container {
container = 'staphb/kraken2:2.1.2-no-db'
}
withLabel: seroba_container {
container = 'sangerbentleygroup/seroba:2.0.4'
}
}
// Set parameters of different run environments
profiles {
// Default Profile for local machine
// Docker as container engine, execute by local machine
standard {
process{
executor = 'local'
}
docker {
enabled = true
runOptions = '-u $(id -u):$(id -g)'
}
}
// Alternative Profile for local machine
// Singularity as container engine, execute by local machine
singularity {
params.singularity_cachedir = "$projectDir/singularity_cache"
singularity {
enabled = true
autoMounts = true
cacheDir = params.singularity_cachedir
}
}
// Profile for LSF, tested on Sanger farm5
// Singularity as container engine, execute by LSF
lsf {
params.singularity_cachedir = "$projectDir/singularity_cache"
params.kraken2_memory_mapping = false
process {
executor = 'lsf'
scratch = true
time = {30.min * task.attempt}
maxRetries = 4
withLabel: farm_low {
cpus = 1
memory = {1.GB * task.attempt}
}
withLabel: farm_mid {
cpus = 8
memory = {4.GB * task.attempt}
}
withLabel: farm_high {
cpus = 32
memory = {16.GB * task.attempt}
}
withLabel: farm_slow {
time = {2.hour * task.attempt}
}
withLabel: farm_scratchless {
scratch = false
}
withLabel: farm_local {
executor = 'local'
}
}
executor {
perJobMemLimit = true
}
singularity {
enabled = true
autoMounts = true
cacheDir = params.singularity_cachedir
}
}
sangertower {
tower {
enabled = true
endpoint = 'https://tower.internal.sanger.ac.uk/api/'
}
}
}