errorMessages.cpp
Go to the documentation of this file.
1 /* *****************************************************************************
2 
3  trimAl v2.0: a tool for automated alignment trimming in large-scale
4  phylogenetics analyses.
5 
6  readAl v2.0: a tool for automated alignment conversion among different
7  formats.
8 
9  2009-2019
10  Fernandez-Rodriguez V. (victor.fernandez@bsc.es)
11  Capella-Gutierrez S. (salvador.capella@bsc.es)
12  Gabaldon, T. (tgabaldon@crg.es)
13 
14  This file is part of trimAl/readAl.
15 
16  trimAl/readAl are free software: you can redistribute it and/or modify
17  it under the terms of the GNU General Public License as published by
18  the Free Software Foundation, the last available version.
19 
20  trimAl/readAl are distributed in the hope that it will be useful,
21  but WITHOUT ANY WARRANTY; without even the implied warranty of
22  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23  GNU General Public License for more details.
24 
25  You should have received a copy of the GNU General Public License
26  along with trimAl/readAl. If not, see <http://www.gnu.org/licenses/>.
27 
28 ***************************************************************************** */
29 
30 #include "reportsystem.h"
31 
32 const std::map<ErrorCode, const char *> reporting::reportManager::ErrorMessages =
33 {
35  "Alignment not loaded: \" [tag] \" Check the file's content"},
36 
38  "You must specify at least one format after the '-formats' argument"},
39 
41  "Alternative matrix \" [tag] \" not recognized"},
42 
44  "Reference file \" [tag] \" not loaded"},
45 
47  "The gap threshold value should be between 0 and 1"},
48 
50  "The gap threshold value should be a positive real number between 0 and 1"},
51 
53  "The similarity threshold value should be between 0 and 1"},
54 
56  "The similarity threshold value should be a positive real number between 0 and 1"},
57 
59  "The consistency threshold value should be between 0 and 1"},
60 
62  "The consistency threshold value should be a positive real number between 0 and 1"},
63 
65  "The similarity threshold value should be between 0 and 100"},
66 
68  "The similarity threshold value should be a positive real number between 0 and 100"},
69 
71  "The residue overlap value should be between 0 and 1"},
72 
74  "The residue overlap value should be a positive real number between 0 and 100"},
75 
77  "The sequences overlap value should be between 0 and 100"},
78 
80  "The sequences overlap value should be a positive real number between 0 and 100"},
81 
83  "The max identity value should be between 0 and 1"},
84 
86  "The max identity value should be a positive real number between 0 and 1"},
87 
89  "The clusters value should be greater than 0"},
90 
92  "The clusters value should be a positive integer number greater than 0"},
93 
95  "The window value should be greater than 0"},
96 
98  "The window value should be a positive integer number greater than 0"},
99 
101  "Could not parse the -selectseqs ranges"},
102 
104  "Could not parse the -selectres ranges"},
105 
107  "The gap window value should be greater than 0"},
108 
110  "The gap window value should be a positive integer number grater than 0"},
111 
113  "The similarity window value should be greater than 0"},
114 
116  "The similarity window value should be a positive integer number grater than 0"},
117 
119  "The consistency window value should be greater than 0"},
120 
122  "The consistency window value should be a positive integer number grater than 0"},
123 
125  "The consistency window value should be greater than 0"},
126 
128  "The consistency window value should be a positive integer number grater than 0"},
129 
131  "Option -in not valid in combination with file comparision options: -sft || -sfc || -ct"},
132 
134  "Argument [tag] is not compatible with argument [tag]"},
135 
137  "Options -selectCols and -selectSeqs are not allowed in combination with threshold options: (-gt || -st || -ct || -cons)"},
138 
140  "Options -selectCols and -selectSeqs are not allowed in combination with automated trimming options: (-nogaps || -noallgaps || -gappyout || -strict || -strictplus || -automated1)."},
141 
143  "Options -selectCols and -selectSeqs are not allowed in combination with window options: (-w || -sw || -gw || -wc)"},
144 
146  "Options -selectCols and -selectSeqs are not allowed in combination of overlap options (-resoverlap || -seqoverlap)"},
147 
149  "Only one method to chose sequences can be applied: (-selectseqs || -clusters || -maxIdentity"},
150 
152  "Only one trimming method can be used at the same time, either automatic or manual. Manual argument: \"[tag]\" + \"[tag]\""},
153 
155  "Combination between automatic methods and -block options is not allowed"},
156 
158  "Combination between general and specific windows is not allowed"},
159 
161  "Combination of -ct + -cons + either -gt or -st is not allowed"},
162 
164  "General window (-w) is not compatible with specific window options: (-cw, -gw, -sw)"},
165 
167  "Parameter [tag] is not valid when statistics' parameters are defined"},
168 
170  "Parameter [tag] can only be used with either an automatic or a manual method"},
171 
173  "You can not force the alignment selection without setting an alignment dataset to compare against"},
174 
176  "You need to specify an input alignment (-in or -forcefile) to use a Coding Sequence File (-backtranslation) to apply the back translation method"},
177 
179  "The sequences in the input alignment [tag] should be aligned in order to use any trimming method or statistics"},
180 
182  "The Similarity Matrix can only be used with methods that use this matrix"},
183 
185  "The [tag] and [tag] files can't be the same"},
186 
188  "Sequence and residues overlap values are mutually needed. You only specified [tag]"},
189 
191  "Out file must be specified in order to print any statistics"},
192 
194  "The alignments' datatypes are different. Check your dataset"},
195 
197  "The block size value is too big. Please, choose another one smaller than residues number / 4. In this case, the limit is: [tag]"},
198 
200  "The [tag] parameter can be only set up with backtranslation functionality"},
201 
203  "The input protein file has to be aligned to carry out the backtranslation process"},
204 
206  "Check your Coding sequences file. It has been detected other kind of biological sequences"},
207 
209  "Impossible to generate [tag]"},
210 
212  "It's impossible to process the Similarity Matrix"},
213 
215  "Option [tag] only accepts ranges from 0 to number of [tag] - 1"},
216 
218  "The number of clusters from the Alignment can not be larger than the number of sequences from that alignment"},
219 
221  "Check your manually set left '[tag]' and right '[tag]' boundaries'"},
222 
224  "The files to compare do not have the same number of sequences"},
225 
227  "Sequences names differ in compareset files"},
228 
230  "Check input CDS file. It seems to content protein residues."},
231 
233  "Sequence \"[tag]\" has, at least, one gap"},
234 
236  "Sequence length \"[tag]\" is not multiple of 3 (length: [tag])"},
237 
239  "Sequence \"[tag]\" has stop codon \"[tag]\" (residue \"[tag]\") at position [tag] (length: [tag])"},
240 
242  "Sequence \"[tag]\" is not in CDS file"},
243 
245  "The sequence \"[tag]\" has an unknown ([tag]) character"},
246 
248  "The sequence \"[tag]\" ([tag]) does not have the same number of residues fixed by the alignment ([tag])"},
249 
251  "the symbol '[tag]' is incorrect"},
252 
254  "the symbol '[tag]' accesing the matrix is not defined in this object"},
255 
257  "Parameter \"[tag]\" not valid or repeated"},
258 
260  "The Similarity Matrix can only be used with general/similarity windows size"},
261 
263  "Possible (\") mismatch for comments"},
264 
266  "Brackets (]) mismatch found"},
267 
269  "Sequences are not aligned. Format ([tag]) not compatible with unaligned sequences."},
270 
272  "File [tag] not found or impossible to open"},
273 
275  "File [tag] is empty"},
276 
278  "Alignment not loaded: \"[tag]\". Format couldn't be recognized."},
279 
281  "Output format [tag] not recognized"},
282 
284  "You must specify only one output format if you don't provide an output file pattern"},
285 
287  "Alignment couldn't be saved on [tag] format"},
288 
290  "Verbose Level specified ([tag]) wasn't recognized. Current level is: [tag]"},
291 
293  "Verbose Level has to be specified after the [tag] argument. Acceptable values are: 'error', 'warning', 'info', 'none' and their numerical equivalents '3', '2', '1' and '0'. Current level is [tag]"},
294 
296  "No reference sequence found for contig \"[tag]\""},
297 
299  "SNP at positon \"[tag]\" in file \"[tag]\" cannot be applied as sequence has a length of \"[tag]\""},
300 
302  "An MSA input file has to be provided"},
303 
305  "Compareset couldn't be performed as some alignments are missing"},
306 
308  "Gap window size (-gw) provided is too big, please specify a window lesser than 1/4 of residues"},
309 
311  "Similarity window size (-sw) provided is too big, please specify a window lesser than 1/4 of residues"},
312 
314  "Consistency window size (-cw) provided is too big, please specify a window lesser than 1/4 of residues"},
315 
317  "Window size (-w) provided is too big, please specify a window lesser than 1/4 of residues"},
318 
320  "Couldn't output any alignment as it doesn't contain any sequence."},
321 
323  "Couldn't perform the trimming step, alignment type unkwnown. "},
324 
326  "Multiple formats have been requested, but output pattern does not contain tags \"[extension]\" or \"[format]\".\n"
327  " Output files will be overwritten. Please, provide an output pattern containing tags to prevent overwritting."},
328 
330  "Multiple input files have been provided (Ej: \"-in X Y\"). This is not supported."},
331 
333  "Something went wrong. Please, report to the developer with this message: \"[tag]\""},
334 
336  "Failed to apply SNP to \"[tag]\":\"[tag]\" at position \"[tag]\".\n"
337  "\tCharacter expected at reference: \"[tag]\"\n"
338  "\tCharacter at reference: \"[tag]\""},
339 
341  "Overwriting SNP to \"[tag]\":\"[tag]\" at position \"[tag]\".\n"
342  "\tCharacter found at reference: \"[tag]\"\n"
343  "\tCharacter found at destination: \"[tag]\"\n"
344  "\tCharacter applied to destination: \"[tag]\""},
345 
347  "There are more donors on the line than present on header. Please check your VCF: \"[tag]\""},
348 
350  "Min Quality should be equal or greater than 0."},
351 
353  "Min Quality provided not recognized"},
354 
356  "Min Coverage should be equal or greater than 0."},
357 
359  "Min Coverage provided not recognized"},
360 
362  "[tag] only valid in combination with -vcf argument."},
363 
365  "[[tag]] Tried to prevent overriding file [tag] but found no luck adding suffixes.\n"
366  "Overwritting file [tag]"
367  "You should check your output folder."},
369  "Combination among absolute (-gat) and relative (-gt) gap thresholds is not allowed."},
371  "The absolute gap window value should be greater or equal to 0"},
373  "The absolute gap window value should be lesser than the number of sequences.\n"
374  "\tNumber of sequences: \"[tag]\".\n"
375  "\tAbsolute Gap Threshold provided: \"[tag]\"."},
377  "Absolute gap (-gat) not recognized"},
378 
380  "More than one automated method has been requested."},
381 
383  "Arguments -in <x> and -forceselect <x> are incompatible"},
384 
386  "Arguments -in <x> and -compareset <x> are incompatible"},
387 
388 };
Class that allows us to centralize all the reporting messages that should be used to inform the user ...
Definition: reportsystem.h:354
Internal classes to handle reporting to user in several ways. The reporting system is made so a devel...
Definition: reportsystem.h:307
ErrorCode
Definition: reportsystem.h:56
static const std::map< ErrorCode, const char * > ErrorMessages
Definition: reportsystem.h:371