forked from MaestSi/UMInator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
UMInator.conf
236 lines (203 loc) · 8.9 KB
/
UMInator.conf
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
/*
* -------------------------------------------------
* MaestSi/UMInator Nextflow config file
* -------------------------------------------------
*/
params {
//Path to fastq files, use wildcards to select multiple samples
fastq_files = "/path/to/samples*fastq"
//Directory containing all scripts
scripts_dir = "/path/to/scripts_dir"
//Path to a folder where to store results
results_dir = "/path/to/results_dir"
//UMI design: "double"
//double: FW_adapter-UMI1-FW_primer-----amplicon------rc(RV_adapter-UMI2-RV_primer)
//or RV_adapter-UMI2-RV_primer-----amplicon------rc(FW_adapter-UMI1-FW_primer)
//FW1 and RV1 are forward and reverse adapter sequences
FW_adapter = "sequence of interest"
RV_adapter = "sequence of interest"
//FW2 and RV2 are forward and reverse primer sequences
FW_primer = "sequence of interest"
RV_primer = "sequence of interest"
//min Q value for reads filtering
minQ = 10
//min read length for reads filtering
minLen = 200
//max read length for reads filtering
maxLen = 15000
//Amount of bases at the beginning and end of each read to search for UMIs
searchLen = 200
//Cutadapt maximum allowed error rate [0, 1]
tolCutadaptErr = 0.2
//Min overlap between read and adapter
minLenOvlp = 11
//UMI length (before merging UMI1 and UMI2 in case of double UMI design)
UMILen = 18
//UMI structure (after merging UMI1 and UMI2, in case of double UMI design) in the form of a regex of the type: [nucl.]{cardinality}
UMIPattern="[ATCG]{3}[CT][AG][ATCG]{3}[CT][AG][ATCG]{3}[CT][AG][ATCG]{6}[CT][AG][ATCG]{3}[CT][AG][ATCG]{3}[CT][AG][ATCG]{3}"
//UMI clustering identity
UMIClustID = 0.9
//BWA aln maximum number of differences
maxDiff = 6
//maximum tolerated mean mapping difference between UMI and query reads
max_NM_mean = 3
//maximum tolerated sd of mapping difference between UMI and query reads
max_NM_sd = 2
//Max forks, i. e. maximum number of processes running simultaneously
maxF=100
//Minimum number of reads assigned to UMI for generating a consensus sequence
min_UMI_freq=30
//Maximum number of reads used for consensus calling
target_reads_consensus = 200
//Maximum number of reads used for consensus polishing
target_reads_polishing = 200
//fast_consensus_flag = 1 for obtaining draft consensus with VSEARCH, instead of MAFFT + EMBOSS cons
fast_consensus_flag = 1
//fast_polishing_flag = 1 for polishing with Racon, instead of Racon + Medaka
fast_polishing_flag = 0
//MAFFT plurality value: minimum fraction of aligned reads supporting a basis for including it in the preliminary consensus
plurality=0.15
//Set fast_alignment_flag=1 if you want to perform fast multiple sequence alignment; otherwise set fast_alignment_flag=0
fast_alignment_flag = 1
//Medaka model
medaka_model = "r941_min_sup_g507"
help = false
// Flags to select which process to run
readsFiltering = true
candidateUMIsExtraction = true
candidateUMIsFiltering = true
readsUMIsAssignment = true
QC = true
draftConsensusCalling = true
consensusPolishing = true
primersTrimming = true
}
profiles {
singularity {
singularity.enabled = true
singularity.autoMounts = false
//singularity.cacheDir = "/path/to/singularity/cacheDir" // if commented, work dir is going to be used
process {
cpus = 1
executor = 'local' // set to 'local' if you are not using a queue management system
queue = 'workq'
perJobMemLimit = true
queueStatInterval = '1 ms'
pollInterval = '1 ms'
container = 'maestsi/uminator:latest'
containerOptions = '--bind /home:/home' // adjust according to which directory you wish to make accessible to singularity
withName:readsFiltering {
cpus = { params.readsFiltering ? 1 : 1 }
memory = { params.readsFiltering ? 10.GB + (5.GB * (task.attempt-1)) : 1.GB }
errorStrategy = { task.exitStatus == 137 ? 'retry' : 'terminate' }
maxRetries = 3
}
withName:candidateUMIsExtraction {
cpus = { params.candidateUMIsExtraction ? 1 : 1 }
memory = { params.candidateUMIsExtraction ? 10.GB + (5.GB * (task.attempt-1)) : 1.GB }
errorStrategy = { task.exitStatus == 137 ? 'retry' : 'terminate' }
maxRetries = 3
}
withName:candidateUMIsFiltering {
cpus = { params.candidateUMIsFiltering ? 1 : 1 }
memory = { params.candidateUMIsFiltering ? 10.GB + (5.GB * (task.attempt-1)) : 1.GB }
errorStrategy = { task.exitStatus == 137 ? 'retry' : 'terminate' }
maxRetries = 3
}
withName:readsUMIsAssignment {
cpus = { params.readsUMIsAssignment ? 4 : 1 }
memory = { params.readsUMIsAssignment ? 30.GB + (5.GB * (task.attempt-1)) : 1.GB }
errorStrategy = { task.exitStatus == 137 ? 'retry' : 'terminate' }
maxRetries = 3
}
withName:QC {
cpus = { params.QC ? 4 : 1 }
memory = { params.QC ? 30.GB + (5.GB * (task.attempt-1)) : 1.GB }
errorStrategy = { task.exitStatus == 137 ? 'retry' : 'terminate' }
maxRetries = 3
}
withName:draftConsensusCalling {
cpus = { params.draftConsensusCalling ? 4 : 1 }
memory = { params.draftConsensusCalling ? 30.GB + (5.GB * (task.attempt-1)) : 1.GB }
errorStrategy = { task.exitStatus == 137 ? 'retry' : 'terminate' }
maxRetries = 3
}
withName:consensusPolishing {
cpus = { params.consensusPolishing ? 4 : 1 }
memory = { params.consensusPolishing ? 20.GB + (2.GB * (task.attempt-1)) : 1.GB }
errorStrategy = { task.exitStatus == 137 ? 'retry' : 'terminate' }
maxRetries = 3
}
withName:primersTrimming {
cpus = { params.primersTrimming ? 4 : 1 }
memory = { params.primersTrimming ? 20.GB + (2.GB * (task.attempt-1)) : 1.GB }
errorStrategy = { task.exitStatus == 137 ? 'retry' : 'terminate' }
maxRetries = 3
}
}
}
docker {
docker.enabled = true
docker.autoMounts = false
//docker.cacheDir = "/path/to/docker/cacheDir" // if commented, work dir is going to be used
process {
cpus = 1
executor = 'local'
container = 'maestsi/uminator:latest'
containerOptions = '-v /home:/home' // adjust according to which directory you wish to make accessible to docker
withName:readsFiltering {
cpus = { params.readsFiltering ? 1 : 1 }
memory = { params.readsFiltering ? 10.GB + (5.GB * (task.attempt-1)) : 1.GB }
errorStrategy = { task.exitStatus == 137 ? 'retry' : 'terminate' }
maxRetries = 3
}
withName:candidateUMIsExtraction {
cpus = { params.candidateUMIsExtraction ? 1 : 1 }
memory = { params.candidateUMIsExtraction ? 10.GB + (5.GB * (task.attempt-1)) : 1.GB }
errorStrategy = { task.exitStatus == 137 ? 'retry' : 'terminate' }
maxRetries = 3
}
withName:candidateUMIsFiltering {
cpus = { params.candidateUMIsFiltering ? 1 : 1 }
memory = { params.candidateUMIsFiltering ? 10.GB + (5.GB * (task.attempt-1)) : 1.GB }
errorStrategy = { task.exitStatus == 137 ? 'retry' : 'terminate' }
maxRetries = 3
}
withName:readsUMIsAssignment {
cpus = { params.readsUMIsAssignment ? 4 : 1 }
memory = { params.readsUMIsAssignment ? 30.GB + (5.GB * (task.attempt-1)) : 1.GB }
errorStrategy = { task.exitStatus == 137 ? 'retry' : 'terminate' }
maxRetries = 3
}
withName:QC {
cpus = { params.QC ? 4 : 1 }
memory = { params.QC ? 30.GB + (5.GB * (task.attempt-1)) : 1.GB }
errorStrategy = { task.exitStatus == 137 ? 'retry' : 'terminate' }
maxRetries = 3
}
withName:draftConsensusCalling {
cpus = { params.draftConsensusCalling ? 4 : 1 }
memory = { params.draftConsensusCalling ? 30.GB + (5.GB * (task.attempt-1)) : 1.GB }
errorStrategy = { task.exitStatus == 137 ? 'retry' : 'terminate' }
maxRetries = 3
}
withName:consensusPolishing {
cpus = { params.consensusPolishing ? 4 : 1 }
memory = { params.consensusPolishing ? 20.GB + (2.GB * (task.attempt-1)) : 1.GB }
errorStrategy = { task.exitStatus == 137 ? 'retry' : 'terminate' }
maxRetries = 3
}
withName:primersTrimming {
cpus = { params.primersTrimming ? 4 : 1 }
memory = { params.primersTrimming ? 20.GB + (2.GB * (task.attempt-1)) : 1.GB }
errorStrategy = { task.exitStatus == 137 ? 'retry' : 'terminate' }
maxRetries = 3
}
}
}
}
tower {
enabled = false
endpoint = '-'
accessToken = 'insert access token'
}