OpenMS  3.0.0
NuXLPresets.h
Go to the documentation of this file.
1 // --------------------------------------------------------------------------
2 // OpenMS -- Open-Source Mass Spectrometry
3 // --------------------------------------------------------------------------
4 // Copyright The OpenMS Team -- Eberhard Karls University Tuebingen,
5 // ETH Zurich, and Freie Universitaet Berlin 2002-2018.
6 //
7 // This software is released under a three-clause BSD license:
8 // * Redistributions of source code must retain the above copyright
9 // notice, this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above copyright
11 // notice, this list of conditions and the following disclaimer in the
12 // documentation and/or other materials provided with the distribution.
13 // * Neither the name of any author or any participating institution
14 // may be used to endorse or promote products derived from this software
15 // without specific prior written permission.
16 // For a full list of authors, refer to the file AUTHORS.
17 // --------------------------------------------------------------------------
18 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21 // ARE DISCLAIMED. IN NO EVENT SHALL ANY OF THE AUTHORS OR THE CONTRIBUTING
22 // INSTITUTIONS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
23 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
24 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
25 // OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
26 // WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
27 // OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
28 // ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 //
30 // --------------------------------------------------------------------------
31 // $Maintainer: Timo Sachsenberg $
32 // $Authors: Timo Sachsenberg $
33 // --------------------------------------------------------------------------
34 
35 #pragma once
36 
39 
40 namespace OpenMS
41 {
42 
43  // MS1 (modifications) and MS2 (fragments) for the different protocols
44  namespace NuXLPresets
45  {
46 
47  static constexpr std::array<const char*, 10> modifications_RNA_UV
48  {
49  "U:",
50  "U:-H2O",
51 
52  "C:",
53  "C:-H2O",
54  "C:-NH3",
55 
56  "G:",
57  "G:-H2O",
58  "G:-NH3",
59 
60  "A:",
61  "A:-NH3"
62  };
63 
64  static constexpr std::array<const char*, 29> modifications_RNA_UV_EXTENDED
65  {
66  "U:",
67  "U:-H2O",
68  "U:-HPO3",
69  "U:-H3PO4",
70  "U:-HPO3-C2H3NO", //RBSID
71 
72  "C:",
73  "C:-NH3",
74  "C:-H2O",
75  "C:-HPO3",
76  "C:-H3PO4",
77  "C:-NH3-H2O",
78  "C:-NH3-HPO3",
79  "C:-NH3-H3PO4",
80 
81  "G:",
82  "G:-H2O",
83  "G:-NH3",
84  "G:-HPO3",
85  "G:-H3PO4",
86  "G:-NH3-H2O",
87  "G:-NH3-HPO3",
88  "G:-NH3-H3PO4",
89 
90  "A:",
91  "A:-H2O",
92  "A:-HPO3",
93  "A:-H3PO4",
94  "A:-NH3",
95  "A:-NH3-H2O",
96  "A:-NH3-HPO3",
97  "A:-NH3-H3PO4"
98  };
99 
100  static constexpr std::array<const char*, 6> modifications_RNA_UV_4SU
101  {
102  "S:",
103  "S:-H2O",
104  "S:-H2S",
105  "S:-C5H8O4",
106  "S:-C5H8O4-H2O",
107  "S:-C5H8O4-H2S"
108  };
109 
110  static constexpr std::array<const char*, 14> modifications_RNA_UV_4SU_EXTENDED
111  {
112  "S:",
113  "S:-H2O",
114  "S:-H3PO4",
115  "S:-HPO3",
116  "S:-H2S",
117  "S:+HPO3-H2S", // iTRAPP
118  "S:-HPO3-H2S", //pRBSID
119  "S:+HPO3", //iTRAPP
120 
121  "S:-C5H8O4",
122  "S:-C5H8O4-H2O",
123  "S:-C5H8O4-H3PO4",
124  "S:-C5H8O4-HPO3",
125  "S:-C5H8O4-HPO3-H2S",
126  "S:-C5H8O4-H2S"
127  };
128 
129  static constexpr std::array<const char*, 6> modifications_RNA_UV_6SG
130  {
131  "X:",
132  "X:-H2O",
133  "X:-H2S",
134  "X:-C5H8O4",
135  "X:-C5H8O4-H2O",
136  "X:-C5H8O4-H2S"
137  };
138 
139  static constexpr std::array<const char*, 11> modifications_RNA_UV_6SG_EXTENDED
140  {
141  "X:",
142  "X:-H2O",
143  "X:-H3PO4",
144  "X:-HPO3",
145  "X:-H2S",
146  "X:-HPO3-H2S", //pRBSID
147 
148 
149  "X:-C5H8O4",
150  "X:-C5H8O4-H2O",
151  "X:-C5H8O4-HPO3",
152  "X:-C5H8O4-HPO3-H2S",
153  "X:-C5H8O4-H2S"
154  };
155 
156  static constexpr std::array<const char*, 4> modifications_RNA_NM
157  {
158  "U:+C5H9N1",
159  "G:+C5H9N1",
160  "C:+C5H9N1",
161  "A:+C5H9N1"
162  };
163 
164  static constexpr std::array<const char*, 34> modifications_RNA_NM_EXTENDED
165  {
166  "U:+C5H9N1",
167  "U:+C5H9N1-HPO3",
168  "U:+C5H9N1-H2O",
169  "U:+C5H9N1-H3PO4",
170  "U:+C5H9N1-H2O-H2O",
171  "U:+C5H9N1-H3PO4-H2O",
172 
173  "G:+C5H9N1",
174  "G:+C5H9N1-HPO3",
175  "G:+C5H9N1-H2O",
176  "G:+C5H9N1-H3PO4",
177  "G:+C5H9N1-H2O-H2O",
178  "G:+C5H9N1-H3PO4-H2O",
179  "G:+C5H9N1-NH3",
180  "G:+C5H9N1-NH3-H2O",
181  "G:+C5H9N1-NH3-HPO3",
182  "G:+C5H9N1-NH3-H3PO4",
183 
184  "C:+C5H9N1",
185  "C:+C5H9N1-HPO3",
186  "C:+C5H9N1-H2O",
187  "C:+C5H9N1-H3PO4",
188  "C:+C5H9N1-H2O-H2O",
189  "C:+C5H9N1-H3PO4-H2O",
190  "C:+C5H9N1-NH3",
191  "C:+C5H9N1-NH3-H2O",
192  "C:+C5H9N1-NH3-HPO3",
193  "C:+C5H9N1-NH3-H3PO4",
194 
195  "A:+C5H9N1",
196  "A:+C5H9N1-HPO3",
197  "A:+C5H9N1-H2O",
198  "A:+C5H9N1-H3PO4",
199  "A:+C5H9N1-NH3",
200  "A:+C5H9N1-NH3-H2O",
201  "A:+C5H9N1-NH3-HPO3",
202  "A:+C5H9N1-NH3-H3PO4"
203  };
204 
205  static constexpr std::array<const char*, 4> modifications_RNA_DEB
206  {
207  "U:+C4H6O2",
208  "G:+C4H6O2",
209  "C:+C4H6O2",
210  "A:+C4H6O2"
211  };
212 
213  static constexpr std::array<const char*, 34> modifications_RNA_DEB_EXTENDED
214  {
215  "U:+C4H6O2",
216  "U:+C4H6O2-H2O",
217  "U:+C4H6O2-HPO3",
218  "U:+C4H6O2-H3PO4",
219  "U:+C4H6O2-H2O-H2O",
220  "U:+C4H6O2-H3PO4-H2O",
221 
222  "G:+C4H6O2",
223  "G:+C4H6O2-H2O",
224  "G:+C4H6O2-HPO3",
225  "G:+C4H6O2-H3PO4",
226  "G:+C4H6O2-H2O-H2O",
227  "G:+C4H6O2-H3PO4-H2O",
228  "G:+C4H6O2-NH3",
229  "G:+C4H6O2-NH3-H2O",
230  "G:+C4H602-NH3-HPO3",
231  "G:+C4H6O2-NH3-H3PO4",
232 
233  "C:+C4H6O2",
234  "C:+C4H6O2-H2O",
235  "C:+C4H6O2-HPO3",
236  "C:+C4H6O2-H3PO4",
237  "C:+C4H6O2-H2O-H2O",
238  "C:+C4H6O2-H3PO4-H2O",
239  "C:+C4H6O2-NH3",
240  "C:+C4H6O2-NH3-H2O",
241  "C:+C4H602-NH3-HPO3",
242  "C:+C4H6O2-NH3-H3PO4",
243 
244  "A:+C4H6O2",
245  "A:+C4H6O2-H2O",
246  "A:+C4H6O2-HPO3",
247  "A:+C4H6O2-H3PO4",
248  "A:+C4H6O2-NH3",
249  "A:+C4H6O2-NH3-H2O",
250  "A:+C4H6O2-NH3-HPO3",
251  "A:+C4H6O2-NH3-H3PO4"
252  };
253 
254  static constexpr std::array<const char*, 12> modifications_RNA_FA
255  {
256  "G:+C",
257  "G:+C-HPO3",
258  "G:+C-H3PO4",
259  "G:+C-H2O",
260 
261  "C:+C",
262  "C:+C-H2O",
263  "C:+C-HPO3",
264  "C:+C-H3PO4",
265 
266  "A:+C",
267  "A:+C-HPO3",
268  "A:+C-H3PO4",
269  "A:+C-H2O",
270  };
271 
272  static constexpr std::array<const char*, 24> modifications_RNA_FA_EXTENDED
273  {
274  "G:+C",
275  "G:+C-HPO3",
276  "G:+C-H3PO4",
277  "G:+C-H2O",
278  "G:+C2",
279  "G:+C2-HPO3",
280  "G:+C2-H2O",
281  "G:+C2-H3PO4",
282 
283  "C:+C",
284  "C:+C-H2O",
285  "C:+C-HPO3",
286  "C:+C-H3PO4",
287  "C:+C2",
288  "C:+C2-HPO3",
289  "C:+C2-H2O",
290  "C:+C2-H3PO4",
291 
292  "A:+C",
293  "A:+C-HPO3",
294  "A:+C-H3PO4",
295  "A:+C-H2O",
296  "A:+C2",
297  "A:+C2-HPO3",
298  "A:+C2-H2O",
299  "A:+C2-H3PO4"
300  };
301  static constexpr std::array<const char*, 16> modifications_DNA_FA
302  {
303  "G:+C",
304  "G:+C-HPO3",
305  "G:+C-H3PO4",
306  "G:+C-H2O",
307 
308  "C:+C",
309  "C:+C-H2O",
310  "C:+C-HPO3",
311  "C:+C-H3PO4",
312 
313  "A:+C",
314  "A:+C-HPO3",
315  "A:+C-H2O",
316  "A:+C-H3PO4",
317 
318  "d:",
319  "d:-H2O",
320  "d:-H3PO4",
321  "d:-HPO3"
322  };
323 
324  static constexpr std::array<const char*, 28> modifications_DNA_FA_EXTENDED
325  {
326  "G:+C",
327  "G:+C-HPO3",
328  "G:+C-H3PO4",
329  "G:+C-H2O",
330  "G:+C2",
331  "G:+C2-HPO3",
332  "G:+C2-H3PO4",
333  "G:+C2-H2O",
334 
335  "C:+C",
336  "C:+C-H2O",
337  "C:+C-HPO3",
338  "C:+C-H3PO4",
339  "C:+C2",
340  "C:+C2-HPO3",
341  "C:+C2-H3PO4",
342  "C:+C2-H2O",
343 
344  "A:+C",
345  "A:+C-HPO3",
346  "A:+C-H2O",
347  "A:+C-H3PO4",
348  "A:+C2",
349  "A:+C2-HPO3",
350  "A:+C2-H3PO4",
351  "A:+C2-H2O",
352 
353  "d:",
354  "d:-H2O",
355  "d:-H3PO4",
356  "d:-HPO3"
357  };
358 
359  static constexpr std::array<const char*, 12> modifications_DNA_UV
360  {
361  "T:",
362  "T:-H2O",
363 
364  "G:",
365  "G:-H2O",
366  "G:-NH3",
367 
368  "A:",
369  "A:-NH3",
370 
371  "C:",
372  "C:-H2O",
373  "C:-NH3",
374 
375  "d:", // deoxyribosephosphate (d in lower-letter = needs to be the cross-linked nt)
376  "d:-H2O"
377  };
378 
379  static constexpr std::array<const char*, 32> modifications_DNA_UV_EXTENDED
380  {
381  "T:",
382  "T:-H2O",
383  "T:-H3PO4",
384  "T:-HPO3",
385 
386  "C:",
387  "C:-H2O",
388  "C:-H3PO4",
389  "C:-HPO3",
390  "C:-NH3",
391  "C:-NH3-H2O",
392  "C:-NH3-HPO3",
393  "C:-NH3-H3PO4",
394 
395  "G:",
396  "G:-H2O",
397  "G:-H3PO4",
398  "G:-HPO3",
399  "G:-NH3",
400  "G:-NH3-H2O",
401  "G:-NH3-HPO3",
402  "G:-NH3-H3PO4",
403 
404  "A:",
405  "A:-NH3",
406  "A:-H2O",
407  "A:-H3PO4",
408  "A:-HPO3",
409  "A:-NH3-H2O",
410  "A:-NH3-HPO3",
411  "A:-NH3-H3PO4",
412 
413  "d:", // deoxyribosephosphate (d in lower-letter = needs to be the cross-linked nt)
414  "d:-H2O",
415  "d:-H3PO4",
416  "d:-HPO3"
417  };
418 
419  static constexpr std::array<const char*, 6> modifications_DNA_DEB
420  {
421  "T:+C4H6O2",
422  "G:+C4H6O2",
423  "C:+C4H6O2",
424  "A:+C4H6O2",
425 
426  "d:", // deoxyribosephosphate (d in lower-letter = needs to be the cross-linked nt)
427  "d:-H2O"
428  };
429 
430  static constexpr std::array<const char*, 38> modifications_DNA_DEB_EXTENDED
431  {
432  "T:+C4H6O2",
433  "T:+C4H6O2-H2O",
434  "T:+C4H6O2-HPO3",
435  "T:+C4H6O2-H3PO4",
436  "T:+C4H6O2-H2O-H2O",
437  "T:+C4H6O2-H3PO4-H2O",
438 
439  "G:+C4H6O2",
440  "G:+C4H6O2-H2O",
441  "G:+C4H6O2-HPO3",
442  "G:+C4H6O2-H3PO4",
443  "G:+C4H6O2-H2O-H2O",
444  "G:+C4H6O2-H3PO4-H2O",
445  "G:+C4H6O2-NH3",
446  "G:+C4H6O2-NH3-H2O",
447  "G:+C4H6O2-NH3-HPO3",
448  "G:+C4H6O2-NH3-H3PO4",
449 
450  "C:+C4H6O2",
451  "C:+C4H6O2-H2O",
452  "C:+C4H6O2-HPO3",
453  "C:+C4H6O2-H3PO4",
454  "C:+C4H6O2-H2O-H2O",
455  "C:+C4H6O2-H3PO4-H2O",
456  "C:+C4H6O2-NH3-H2O",
457  "C:+C4H6O2-NH3",
458  "C:+C4H6O2-NH3-HPO3",
459  "C:+C4H6O2-NH3-H3PO4",
460 
461  "A:+C4H6O2",
462  "A:+C4H6O2-H2O",
463  "A:+C4H6O2-H3PO4",
464  "A:+C4H6O2-HPO3",
465  "A:+C4H6O2-NH3",
466  "A:+C4H6O2-NH3-H2O",
467  "A:+C4H6O2-NH3-HPO3",
468  "A:+C4H6O2-NH3-H3PO4",
469 
470  "d:", // deoxyribosephosphate (d in lower-letter = needs to be the cross-linked nt)
471  "d:-H2O",
472  "d:-H3PO4",
473  "d:-HPO3"
474  };
475 
476  static constexpr std::array<const char*, 6> modifications_DNA_NM
477  {
478  "T:+C5H9N1",
479  "G:+C5H9N1",
480  "C:+C5H9N1",
481  "A:+C5H9N1",
482  "d:",
483  "d:-H2O"
484  };
485 
486  static constexpr std::array<const char*, 38> modifications_DNA_NM_EXTENDED
487  {
488  "T:+C5H9N1",
489  "T:+C5H9N1-H2O",
490  "T:+C5H9N1-HPO3",
491  "T:+C5H9N1-H3PO4",
492  "T:+C5H9N1-H2O-H2O",
493  "T:+C5H9N1-H3PO4-H2O",
494 
495  "G:+C5H9N1",
496  "G:+C5H9N1-H2O",
497  "G:+C5H9N1-HPO3",
498  "G:+C5H9N1-H3PO4",
499  "G:+C5H9N1-H2O-H2O",
500  "G:+C5H9N1-H3PO4-H2O",
501  "G:+C5H9N1-NH3",
502  "G:+C5H9N1-NH3-H2O",
503  "G:+C5H9N1-NH3-HPO3",
504  "G:+C5H9N1-NH3-H3PO4",
505 
506  "C:+C5H9N1",
507  "C:+C5H9N1-H2O",
508  "C:+C5H9N1-HPO3",
509  "C:+C5H9N1-H3PO4",
510  "C:+C5H9N1-H2O-H2O",
511  "C:+C5H9N1-H3PO4-H2O",
512  "C:+C5H9N1-NH3",
513  "C:+C5H9N1-NH3-HPO3",
514  "C:+C5H9N1-NH3-H2O",
515  "C:+C5H9N1-NH3-H3PO4",
516 
517  "A:+C5H9N1",
518  "A:+C5H9N1-HPO3",
519  "A:+C5H9N1-H2O",
520  "A:+C5H9N1-H3PO4",
521  "A:+C5H9N1-NH3",
522  "A:+C5H9N1-NH3-HPO3",
523  "A:+C5H9N1-NH3-H2O",
524  "A:+C5H9N1-NH3-H3PO4",
525 
526  "d:",
527  "d:-H2O",
528  "d:-H3PO4",
529  "d:-HPO3"
530  };
531 
533  // fragment definitions
535 
536  // shared by default and Extended
537  static constexpr std::array<const char*, 39> fragments_RNA_UV
538  {
539  "U:C3O;C3O",
540  "U:C4H4N2O2;U'",
541  "U:C4H2N2O1;U'-H2O",
542  "U:C9H13N2O9P1;U",
543  "U:C9H11N2O8P1;U-H2O",
544  "U:C9H12N2O6;U-HPO3",
545  "U:C9H10N2O5;U-H3PO4",
546 
547  "C:C4H5N3O;C'",
548  "C:C4H3N3;C'-H2O",
549  "C:C4H2N2O;C'-NH3",
550  "C:C9H14N3O8P;C",
551  "C:C9H11N2O8P;C-NH3",
552  "C:C9H12N3O7P;C-H2O",
553  "C:C9H9N2O7P;C-NH3-H2O",
554  "C:C9H13N3O5;C-HPO3",
555  "C:C9H11N3O4;C-H3PO4",
556  "C:C9H10N2O5;C-NH3-HPO3",
557  "C:C9H8N2O4;C-NH3-H3PO4",
558 
559 
560  "G:C5H5N5O;G'",
561  "G:C5H3N5;G'-H2O",
562  "G:C5H2N4O;G'-NH3",
563  "G:C10H14N5O8P;G",
564  "G:C10H12N5O7P;G-H2O",
565  "G:C10H11N4O8P;G-NH3",
566  "G:C10H9N4O7P;G-NH3-H2O",
567  "G:C10H13N5O5;G-HPO3",
568  "G:C10H11N5O4;G-H3PO4",
569  "G:C10H10N4O5;G-NH3-HPO3",
570  "G:C10H8N4O4;G-NH3-H3PO4",
571 
572  "A:C5H5N5;A'",
573  "A:C5H2N4;A'-NH3",
574  "A:C10H14N5O7P;A",
575  "A:C10H12N5O6P;A-H2O",
576  "A:C10H11N4O7P;A-NH3",
577  "A:C10H9N4O6P;A-NH3-H2O",
578  "A:C10H13N5O4;A-HPO3",
579  "A:C10H11N5O3;A-H3PO4",
580  "A:C10H10N5O4;A-NH3-HPO3",
581  "A:C10H8N5O3;A-NH3-H3PO4"
582  };
583 
584  // shared by default and Extended
585  static constexpr std::array<const char*, 41> fragments_RNA_UV_4SU
586  {
587  "S:C9H10N2O5;tU-H2S", // 4SU - H2S
588  "S:C4H2N2O1;tU'-H2S", // 4SU base - H2S
589 
590  "U:C3O;C3O",
591  "U:C4H4N2O2;U'",
592  "U:C4H2N2O1;U'-H2O",
593  "U:C9H13N2O9P1;U",
594  "U:C9H11N2O8P1;U-H2O",
595  "U:C9H12N2O6;U-HPO3",
596  "U:C9H10N2O5;U-H3PO4",
597 
598  "C:C4H5N3O;C'",
599  "C:C4H3N3;C'-H2O",
600  "C:C4H2N2O;C'-NH3",
601  "C:C9H14N3O8P;C",
602  "C:C9H11N2O8P;C-NH3",
603  "C:C9H12N3O7P;C-H2O",
604  "C:C9H9N2O7P;C-NH3-H2O",
605  "C:C9H13N3O5;C-HPO3",
606  "C:C9H11N3O4;C-H3PO4",
607  "C:C9H10N2O5;C-NH3-HPO3",
608  "C:C9H8N2O4;C-NH3-H3PO4",
609 
610  "G:C5H5N5O;G'",
611  "G:C5H3N5;G'-H2O",
612  "G:C5H2N4O;G'-NH3",
613  "G:C10H14N5O8P;G",
614  "G:C10H12N5O7P;G-H2O",
615  "G:C10H11N4O8P;G-NH3",
616  "G:C10H9N4O7P;G-NH3-H2O",
617  "G:C10H13N5O5;G-HPO3",
618  "G:C10H11N5O4;G-H3PO4",
619  "G:C10H10N4O5;G-NH3-HPO3",
620  "G:C10H8N4O4;G-NH3-H3PO4",
621 
622  "A:C5H5N5;A'",
623  "A:C5H2N4;A'-NH3",
624  "A:C10H14N5O7P;A",
625  "A:C10H12N5O6P;A-H2O",
626  "A:C10H11N4O7P;A-NH3",
627  "A:C10H9N4O6P;A-NH3-H2O",
628  "A:C10H13N5O4;A-HPO3",
629  "A:C10H11N5O3;A-H3PO4",
630  "A:C10H10N5O4;A-NH3-HPO3",
631  "A:C10H8N5O3;A-NH3-H3PO4"
632  };
633 
634  static constexpr std::array<const char*, 41> fragments_RNA_UV_6SG
635  {
636  "X:C10H11N5O4;tG-H2S",
637  "X:C5H3N5;tG'-H2S",
638 
639  "U:C3O;C3O",
640  "U:C4H4N2O2;U'",
641  "U:C4H2N2O1;U'-H2O",
642  "U:C9H13N2O9P1;U",
643  "U:C9H11N2O8P1;U-H2O",
644  "U:C9H12N2O6;U-HPO3",
645  "U:C9H10N2O5;U-H3PO4",
646 
647  "C:C4H5N3O;C'",
648  "C:C4H3N3;C'-H2O",
649  "C:C4H2N2O;C'-NH3",
650  "C:C9H14N3O8P;C",
651  "C:C9H11N2O8P;C-NH3",
652  "C:C9H12N3O7P;C-H2O",
653  "C:C9H9N2O7P;C-NH3-H2O",
654  "C:C9H13N3O5;C-HPO3",
655  "C:C9H11N3O4;C-H3PO4",
656  "C:C9H10N2O5;C-NH3-HPO3",
657  "C:C9H8N2O4;C-NH3-H3PO4",
658 
659  "G:C5H5N5O;G'",
660  "G:C5H3N5;G'-H2O",
661  "G:C5H2N4O;G'-NH3",
662  "G:C10H14N5O8P;G",
663  "G:C10H12N5O7P;G-H2O",
664  "G:C10H11N4O8P;G-NH3",
665  "G:C10H9N4O7P;G-NH3-H2O",
666  "G:C10H13N5O5;G-HPO3",
667  "G:C10H11N5O4;G-H3PO4",
668  "G:C10H10N4O5;G-NH3-HPO3",
669  "G:C10H8N4O4;G-NH3-H3PO4",
670 
671  "A:C5H5N5;A'",
672  "A:C5H2N4;A'-NH3",
673  "A:C10H14N5O7P;A",
674  "A:C10H12N5O6P;A-H2O",
675  "A:C10H11N4O7P;A-NH3",
676  "A:C10H9N4O6P;A-NH3-H2O",
677  "A:C10H13N5O4;A-HPO3",
678  "A:C10H11N5O3;A-H3PO4",
679  "A:C10H10N5O4;A-NH3-HPO3",
680  "A:C10H8N5O3;A-NH3-H3PO4"
681  };
682 
683  // shared by default and Extended
684  static constexpr std::array<const char*, 42> fragments_DNA_UV
685  {
686  "T:C5H6N2O2;T'",
687  "T:C5H4N2O;T'-H2O",
688  "T:C10H15N2O8P;T",
689  "T:C10H13N2O7P;T-H2O",
690  "T:C10H14N2O5;T-HPO3",
691  "T:C10H12N2O4;T-H3PO4",
692 
693  "C:C9H14N3O7P;C",
694  "C:C9H11N2O7P;C-NH3",
695  "C:C9H12N3O6P;C-H2O",
696  "C:C9H9N2O6P;C-NH3-H2O",
697  "C:C9H13N3O4;C-HPO3",
698  "C:C9H11N3O3;C-H3PO4",
699  "C:C9H10N2O4;C-NH3-HPO3",
700  "C:C9H8N2O3;C-NH3-H3PO4",
701  "C:C4H5N3O;C'",
702  "C:C4H3N3;C'-H2O",
703  "C:C4H2N2O;C'-NH3",
704 
705  "G:C10H14N5O7P;G",
706  "G:C10H12N5O6P;G-H2O",
707  "G:C10H11N4O7P;G-NH3",
708  "G:C10H9N4O6P;G-NH3-H2O",
709  "G:C10H13N5O4;G-HPO3",
710  "G:C10H10N4O4;G-NH3-HPO3",
711  "G:C10H11N5O3;G-H3PO4",
712  "G:C10H8N4O3;G-NH3-H3PO4",
713  "G:C5H5N5O;G'",
714  "G:C5H3N5;G'-H2O",
715  "G:C5H2N4O;G'-NH3",
716 
717  "A:C10H14N5O6P;A",
718  "A:C10H12N5O5P;A-H2O",
719  "A:C10H11N4O6P;A-NH3",
720  "A:C10H9N4O5P;A-NH3-H2O",
721  "A:C10H13N5O3;A-HPO3",
722  "A:C10H11N5O2;A-H3PO4",
723  "A:C10H10N5O3;A-NH3-HPO3",
724  "A:C10H8N5O2;A-NH3-H3PO4",
725  "A:C5H5N5;A'",
726  "A:C5H2N4;A'-NH3",
727 
728  // base was lost -> only dribose = C5H9O6P remains
729  "d:C5H9O6P;C5H9O6P",
730  "d:C5H7O5P;C5H9O6P-H2O",
731  "d:C5H8O3;C5H9O6P-HPO3",
732  "d:C5H6O2;C5H9O6P-H3PO4"
733  };
734 
735  // shared by default and Extended
736  static constexpr std::array<const char*, 47> fragments_RNA_DEB
737  {
738  "U:C4H6O2;DEB",
739  "U:C4H4O;DEB-H2O",
740  "U:C7H6O3;DEB+C3O",
741  "U:C8H10N2O4;DEB+U'",
742  "U:C8H8N2O3;DEB+U'-H2O",
743  "U:C13H19N2O11P1;DEB+U",
744  "U:C13H17N2O10P1;DEB+U-H2O",
745  "U:C13H18N2O8;DEB+U-HPO3",
746  "U:C13H16N2O7;DEB+U-H3PO4",
747 
748  "G:C4H6O2;DEB",
749  "G:C4H4O;DEB-H2O",
750  "G:C9H11N5O3;DEB+G'",
751  "G:C8H9N5O3;DEB+G'-H2O",
752  "G:C9H8N4O3;DEB+G'-NH3",
753  "G:C14H20N5O10P1;DEB+G",
754  "G:C14H18N5O9P1;DEB+G-H2O",
755  "G:C14H17N4O10P1;DEB+G-NH3",
756  "G:C14H19N5O7;DEB+G-HPO3",
757  "G:C14H17N5O6;DEB+G-H3PO4",
758  "G:C14H16N4O7;DEB+G-NH3-HPO3",
759  "G:C14H14N4O6;DEB+G-NH3-H3PO4",
760  "G:C14H15N4O9P1;DEB+G-NH3-H2O",
761 
762  "C:C4H6O2;DEB",
763  "C:C4H4O;DEB-H2O",
764  "C:C8H11N3O3;DEB+C'",
765  "C:C8H9N3O2;DEB+C'-H2O",
766  "C:C8H8N2O3;DEB+C'-NH3",
767  "C:C13H20N3O10P1;DEB+C",
768  "C:C13H18N3O9P1;DEB+C-H2O",
769  "C:C13H17N2O10P1;DEB+C-NH3",
770  "C:C13H19N3O7;DEB+C-HPO3",
771  "C:C13H17N3O6;DEB+C-H3PO4",
772  "C:C13H16N2O7;DEB+C-NH3-HPO3",
773  "C:C13H14N2O6;DEB+C-NH3-H3PO4",
774  "C:C13H15N2O9P1;DEB+C-NH3-H2O",
775 
776  "A:C4H6O2;DEB",
777  "A:C4H4O;DEB-H2O",
778  "A:C9H11N5O2;DEB+A'",
779  "A:C9H17N4O;DEB+A'-NH3",
780  "A:C14H20N5O9P1;DEB+A",
781  "A:C14H18N5O8P1;DEB+A-H2O",
782  "A:C14H17N4O9P1;DEB+A-NH3",
783  "A:C14H19N5O6;DEB+A-HPO3",
784  "A:C14H17N5O5;DEB+A-H3PO4",
785  "A:C14H16N4O6;DEB+A-NH3-HPO3",
786  "A:C14H14N4O5;DEB+A-NH3-H3PO4",
787  "A:C14H15N4O8P1;DEB+A-NH3-H2O"
788  };
789 
790  // shared by default and Extended
791  static constexpr std::array<const char*, 50> fragments_DNA_DEB
792  {
793  "T:C4H6O2;DEB",
794  "T:C4H4O;DEB-H2O",
795  "T:C9H12N2O4;DEB+T'",
796  "T:C9H10N2O3;DEB+T'-H2O",
797  "T:C14H21N2O10P1;DEB+T",
798  "T:C14H19N2O9P1;DEB+T-H2O",
799  "T:C14H20N2O7;DEB+T-HPO3",
800  "T:C14H18N2O6;DEB+T-H3PO4",
801 
802  "C:C4H6O2;DEB",
803  "C:C4H4O;DEB-H2O",
804  "C:C8H11N3O3;DEB+C'",
805  "C:C8H8N2O3;DEB+C'-NH3",
806  "C:C8H9N3O2;DEB+C'-H2O",
807  "C:C13H20N3O9P1;DEB+C",
808  "C:C13H17N2O9P1;DEB+C-NH3",
809  "C:C13H18N3O8P1;DEB+C-H2O",
810  "C:C13H19N3O6;DEB+C-HPO3",
811  "C:C13H17N3O5;DEB+C-H3PO4",
812  "C:C13H16N2O6;DEB+C-NH3-HPO3",
813  "C:C13H14N2O5;DEB+C-NH3-H3PO4",
814  "C:C13H15N2O8P1;DEB+C-NH3-H2O",
815 
816  "G:C4H6O2;DEB",
817  "G:C4H4O;DEB-H2O",
818  "G:C9H11N5O3;DEB+G'",
819  "G:C9H8N4O3;DEB+G'-NH3",
820  "G:C9H9N5O2;DEB+G'-H2O",
821  "G:C14H20N5O9P1;DEB+G",
822  "G:C14H17N4O9P1;DEB+G-NH3",
823  "G:C14H18N5O8P1;DEB+G-H2O",
824  "G:C14H19N5O6;DEB+G-HPO3",
825  "G:C14H17N5O5;DEB+G-H3PO4",
826  "G:C14H16N4O6;DEB+G-NH3-HPO3",
827  "G:C14H14N4O5;DEB+G-NH3-H3PO4",
828  "G:C14H15N4O8P1;DEB+G-NH3-H2O",
829 
830  "A:C4H6O2;DEB",
831  "A:C4H4O;DEB-H2O",
832  "A:C9H11N5O2;DEB+A'",
833  "A:C9H8N4O2;DEB+A'-NH3",
834  "A:C14H20N5O8P1;DEB+A",
835  "A:C14H17N4O8P1;DEB+A-NH3",
836  "A:C14H18N5O7P1;DEB+A-H2O",
837  "A:C14H19N5O5;DEB+A-HPO3",
838  "A:C14H17N5O4;DEB+A-H3PO4",
839  "A:C14H16N4O5;DEB+A-NH3-HPO3",
840  "A:C14H14N4O4;DEB+A-NH3-H3PO4",
841  "A:C14H15N4O7P1;DEB+A-NH3-H2O",
842 
843  "d:C5H9O6P;C5H9O6P",
844  "d:C5H7O5P;C5H9O6P-H2O",
845  "d:C5H8O3;C5H9O6P-HPO3",
846  "d:C5H6O2;C5H9O6P-H3PO4"
847  };
848 
849  // shared by default and Extended
850  static constexpr std::array<const char*, 43> fragments_RNA_NM
851  {
852  "U:C5H9N1;NM",
853  "U:C8H9N1O1;NM+C3O",
854  "U:C14H22N3O9P1;NM+U",
855  "U:C14H20N3O8P1;NM+U-H2O",
856  "U:C14H21N3O6;NM+U-HPO3",
857  "U:C14H19N3O5;NM+U-H3PO4",
858  "U:C9H13N3O2;NM+U'",
859  "U:C9H11N3O1;NM+U'-H2O",
860 
861  "C:C5H9N1;NM",
862  "C:C14H23N4O8P1;NM+C",
863  "C:C14H21N4O7P1;NM+C-H2O",
864  "C:C14H20N3O8P1;NM+C-NH3",
865  "C:C14H22N4O5;NM+C-HPO3",
866  "C:C14H20N4O4;NM+C-H3PO4",
867  "C:C14H19N3O5;NM+C-NH3-HPO3",
868  "C:C14H17N3O4;NM+C-NH3-H3PO4",
869  "C:C9H14N4O1;NM+C'",
870  "C:C9H12N4;NM+C'-H2O",
871  "C:C9H11N3O1;NM+C'-NH3",
872  "C:C14H18N3O7P1;NM+C-NH3-H2O",
873 
874  "G:C5H9N1;NM",
875  "G:C15H23N6O8P1;NM+G",
876  "G:C15H21N6O7P1;NM+G-H2O",
877  "G:C15H20N5O8P1;NM+G-NH3",
878  "G:C15H22N6O5;NM+G-HPO3",
879  "G:C15H20N6O4;NM+G-H3PO4",
880  "G:C15H19N5O5;NM+G-NH3-HPO3",
881  "G:C15H17N5O4;NM+G-NH3-H3PO4",
882  "G:C10H14N6O1;NM+G'",
883  "G:C10H12N6;NM+G'-H2O",
884  "G:C10H14N6O1;NM+G'-NH3",
885  "G:C15H18N5O7P1;NM+G-NH3-H2O",
886 
887  "A:C5H9N1;NM",
888  "A:C15H23N6O7P1;NM+A",
889  "A:C15H21N6O6P1;NM+A-H2O",
890  "A:C15H20N5O7P1;NM+A-NH3",
891  "A:C15H22N6O4;NM+A-HPO3",
892  "A:C15H20N6O3;NM+A-H3PO4",
893  "A:C15H19N5O4;NM+A-NH3-HPO3",
894  "A:C15H17N5O3;NM+A-NH3-H3PO4",
895  "A:C10H14N6;NM+A'",
896  "A:C10H11N5;NM+A'-NH3",
897  "A:C15H18N5O6P1;NM+A-NH3-H2O"
898  };
899 
900  static constexpr std::array<const char*, 46> fragments_RNA_FA
901  {
902  "U:C3O;C3O",
903  "U:C4H4N2O2;U'",
904  "U:C4H2N2O1;U'-H2O",
905  "U:C9H13N2O9P1;U",
906  "U:C9H11N2O8P1;U-H2O",
907  "U:C9H12N2O6;U-HPO3",
908  "U:C9H10N2O5;U-H3PO4",
909 
910  "G:C;FA",
911  "G:C5H5N5O;G'",
912  "G:C10H14N5O8P;G",
913  "G:C6H5N5O;G'+FA",
914  "G:C11H14N5O8P;G+FA",
915  "G:C11H12N5O7P;G+FA-H2O",
916  "G:C11H11N5O4;G+FA-H3PO4",
917  "G:C11H13N5O5;G+FA-HPO3",
918  "G:C7H5N5O;G'+2FA",
919  "G:C12H14N5O8P;G+2FA",
920  "G:C12H12N5O7P;G+2FA-H2O",
921  "G:C12H11N5O4;G+2FA-H3PO4",
922  "G:C12H13N5O5;G+2FA-HPO3",
923 
924  "C:C;FA",
925  "C:C4H5N3O;C'",
926  "C:C9H14N3O8P;C",
927  "C:C5H5N3O;C'+FA",
928  "C:C10H14N3O8P;C+FA",
929  "C:C10H13N3O5;C+FA-HPO3",
930  "C:C10H12N3O7P;C+FA-H2O",
931  "C:C10H11N3O4;C+FA-H3PO4",
932  "C:C6H5N3O;C'+2FA",
933  "C:C11H14N3O8P;C+2FA",
934  "C:C11H13N3O5;C+2FA-HPO3",
935  "C:C11H12N3O7P;C+2FA-H2O",
936  "C:C11H11N3O4;C+2FA-H3PO4",
937 
938  "A:C;FA",
939  "A:C5H5N5;A'",
940  "A:C10H14N5O7P;A",
941  "A:C6H5N5;A'+FA",
942  "A:C11H14N5O7P;A+FA",
943  "A:C11H13N5O4;A+FA-HPO3",
944  "A:C11H12N5O6P;A+FA-H2O",
945  "A:C11H11N5O3;A+FA-H3PO4",
946  "A:C7H5N5;A'+2FA",
947  "A:C12H14N5O7P;A+2FA",
948  "A:C12H13N5O4;A+2FA-HPO3",
949  "A:C12H12N5O6P;A+2FA-H2O",
950  "A:C12H11N5O3;A+2FA-H3PO4"
951  };
952 
953  static constexpr std::array<const char*, 49> fragments_DNA_FA
954  {
955  "T:C5H6N2O2;T'",
956  "T:C5H4N2O1;T'-H2O",
957  "T:C10H15N2O8P1;T",
958  "T:C10H13N2O7P1;T-H2O",
959  "T:C10H12N2O4;T-HPO3",
960  "T:C10H10N2O3;T-H3PO4",
961 
962  "G:C;FA",
963  "G:C5H5N5O;G'",
964  "G:C10H14N5O7P;G",
965  "G:C6H5N5O;G'+FA",
966  "G:C11H14N5O7P;G+FA",
967  "G:C11H13N5O4;G+FA-HPO3",
968  "G:C11H12N5O6P;G+FA-H2O",
969  "G:C11H11N5O3;G+FA-H3PO4",
970  "G:C7H5N5O;G'+2FA",
971  "G:C12H14N5O7P;G+2FA",
972  "G:C12H13N5O4;G+2FA-HPO3",
973  "G:C12H12N5O6P;G+2FA-H2O",
974  "G:C12H11N5O3;G+2FA-H3PO4",
975 
976  "C:C;FA",
977  "C:C4H5N3O;C'",
978  "C:C9H14N3O7P;C",
979  "C:C5H5N3O;C'+FA",
980  "C:C10H14N3O7P;C+FA",
981  "C:C10H13N3O4;C+FA-HPO3",
982  "C:C10H12N3O6P;C+FA-H2O",
983  "C:C10H11N3O3;C+FA-H3PO4",
984  "C:C6H5N3O;C'+2FA",
985  "C:C11H14N3O7P;C+2FA",
986  "C:C11H13N3O4;C+2FA-HPO3",
987  "C:C11H12N3O6P;C+2FA-H2O",
988  "C:C11H11N3O3;C+2FA-H3PO4",
989 
990  "A:C;FA",
991  "A:C5H5N5;A'",
992  "A:C10H14N5O6P;A",
993  "A:C6H5N5;A'+FA",
994  "A:C11H14N5O6P;A+FA",
995  "A:C11H13N5O3;A+FA-HPO3",
996  "A:C11H12N5O5P;A+FA-H2O",
997  "A:C11H11N5O2;A+FA-H3PO4",
998  "A:C7H5N5;A'+2FA",
999  "A:C12H14N5O6P;A+2FA",
1000  "A:C12H13N5O3;A+2FA-HPO3",
1001  "A:C12H12N5O5P;A+2FA-H2O",
1002  "A:C12H11N5O2;A+2FA-H3PO4",
1003 
1004  "d:C5H9O6P;C5H9O6P",
1005  "d:C5H7O5P;C5H9O6P-H2O",
1006  "d:C5H8O3;C5H9O6P-HPO3",
1007  "d:C5H6O2;C5H9O6P-H3PO4"
1008  };
1009 
1010  // shared by default and Extended
1011  static constexpr std::array<const char*, 46> fragments_DNA_NM
1012  {
1013  "T:C5H9N1;NM",
1014  "T:C15H24N3O8P1;NM+T",
1015  "T:C15H22N3O7P1;NM+T-H2O",
1016  "T:C15H23N3O5;NM+T-HPO3",
1017  "T:C15H21N3O4;NM+T-H3PO4",
1018  "T:C10H15N3O2;NM+T'",
1019  "T:C10H13N3O1;NM+T'-H2O",
1020 
1021  "C:C5H9N;NM",
1022  "C:C9H14N4O1;NM+C'",
1023  "C:C9H11N3O1;NM+C'-NH3",
1024  "C:C9H12N4;NM+C'-H2O",
1025  "C:C14H23N4O7P1;NM+C",
1026  "C:C14H21N4O6P1;NM+C-H2O",
1027  "C:C14H20N3O7P1;NM+C-NH3",
1028  "C:C14H18N3O6P1;NM+C-NH3-H2O",
1029  "C:C14H20N4O3;NM+C-H3PO4",
1030  "C:C14H22N4O4;NM+C-HPO3",
1031  "C:C14H19N3O4;NM+C-NH3-HPO3",
1032  "C:C14H17N3O3;NM+C-NH3-H3PO4",
1033 
1034  "G:C5H9N1;NM",
1035  "G:C10H14N6O1;NM+G'",
1036  "G:C10H12N6;NM+G'-H2O",
1037  "G:C10H11N5O1;NM+G'-NH3",
1038  "G:C15H23N6O7P1;NM+G",
1039  "G:C15H21N6O6P1;NM+G-H2O",
1040  "G:C15H22N6O4;NM+G-HPO3",
1041  "G:C15H20N6O3;NM+G-H3PO4",
1042  "G:C15H20N5O7P1;NM+G-NH3",
1043  "G:C15H18N5O6P1;NM+G-NH3-H2O",
1044  "G:C15H19N5O4;NM+G-NH3-HPO3",
1045  "G:C15H17N5O3;NM+G-NH3-H3PO4",
1046 
1047  "A:C5H9N1;NM",
1048  "A:C10H14N6;NM+A'",
1049  "A:C10H11N5;NM+A'-NH3",
1050  "A:C15H23N6O6P1;NM+A",
1051  "A:C15H20N6O2;NM+A-H3PO4",
1052  "A:C15H21N6O5P1;NM+A-H2O",
1053  "A:C15H22N6O3;NM+A-HPO3",
1054  "A:C15H20N5O6P1;NM+A-NH3",
1055  "A:C15H18N5O5P1;NM+A-NH3-H2O",
1056  "A:C15H19N5O3;NM+A-NH3-HPO3",
1057  "A:C15H17N5O2;NM+A-NH3-H3PO4",
1058 
1059  "d:C5H9O6P;C5H9O6P",
1060  "d:C5H7O5P;C5H9O6P-H2O",
1061  "d:C5H8O3;C5H9O6P-HPO3",
1062  "d:C5H6O2;C5H9O6P-H3PO4"
1063  };
1064 
1065  // the nucleotides (=mono-phosphates) and the deoxyribosephosphate (for DNA)
1066  static constexpr std::array<const char*, 5> DNA_nucleotides {"A=C10H14N5O6P", "C=C9H14N3O7P", "G=C10H14N5O7P", "T=C10H15N2O8P", "d=C5H9O6P"};
1067  static constexpr std::array<const char*, 4> RNA_nucleotides {"A=C10H14N5O7P", "C=C9H14N3O8P", "G=C10H14N5O8P", "U=C9H13N2O9P"};
1068  static constexpr std::array<const char*, 5> DNA_mapping {"A->A", "C->C", "G->G", "T->T", "d->d"};
1069  static constexpr std::array<const char*, 4> RNA_mapping {"A->A", "C->C", "G->G", "U->U"};
1070 
1071  static constexpr std::array<const char*, 23> presets_names {
1072  "none",
1073  "RNA-UV (U)",
1074  "RNA-UV (UCGA)",
1075  "RNA-UV Extended (U)",
1076  "RNA-UV Extended (UCGA)",
1077  "RNA-UV (4SU)",
1078  "RNA-UV Extended (4SU)",
1079  "RNA-UV (6SG)",
1080  "RNA-UV Extended (6SG)",
1081  "RNA-DEB",
1082  "RNA-DEB Extended",
1083  "RNA-NM",
1084  "RNA-NM Extended",
1085  "DNA-UV",
1086  "DNA-UV Extended",
1087  "DNA-DEB",
1088  "DNA-DEB Extended",
1089  "DNA-NM",
1090  "DNA-NM Extended",
1091  "RNA-FA",
1092  "RNA-FA Extended",
1093  "DNA-FA",
1094  "DNA-FA Extended"
1095  };
1096 
1097  void getPresets(const String& p,
1098  StringList& nucleotides,
1099  StringList& mapping,
1100  StringList& modifications,
1101  StringList& fragment_adducts,
1102  String& can_cross_link)
1103  {
1104  // construct name list from constexpr array
1105  const StringList names(presets_names.begin(), presets_names.end());
1106 
1107  // sanity check: preset name needs to be in the list of supported presets
1108  if (auto it = find(names.begin(), names.end(), p); it == names.end())
1109  {
1110  throw std::runtime_error("Error: unknown preset.");
1111  }
1112 
1113  // set NTs for RNA / DNA
1114  if (p.hasPrefix("RNA"))
1115  {
1116  nucleotides = StringList(RNA_nucleotides.begin(), RNA_nucleotides.end());
1117  mapping = StringList(RNA_mapping.begin(), RNA_mapping.end());
1118  }
1119  else if (p.hasPrefix("DNA"))
1120  {
1121  nucleotides = StringList(DNA_nucleotides.begin(), DNA_nucleotides.end());
1122  mapping = StringList(DNA_mapping.begin(), DNA_mapping.end());
1123  }
1124 
1125  // initialize all StringLists from constexpr arrays
1126  // note: we do this here as this raises a logic error if e.g., size of the array doesn't match the reserved size.
1127  // This can easily happen if a comma is omitted and two string literals on two lines joined
1128  StringList RNA_UV_modifications(modifications_RNA_UV.begin(), modifications_RNA_UV.end());
1129  StringList RNA_UV_EXTENDED_modifications(modifications_RNA_UV_EXTENDED.begin(), modifications_RNA_UV_EXTENDED.end());
1130  StringList RNA_UV_fragments(fragments_RNA_UV.begin(), fragments_RNA_UV.end());
1131 
1132  StringList RNA_UV_4SU_modifications(modifications_RNA_UV_4SU.begin(), modifications_RNA_UV_4SU.end());
1133  StringList RNA_UV_4SU_EXTENDED_modifications(modifications_RNA_UV_4SU_EXTENDED.begin(), modifications_RNA_UV_4SU_EXTENDED.end());
1134  StringList RNA_UV_4SU_fragments(fragments_RNA_UV_4SU.begin(), fragments_RNA_UV_4SU.end());
1135 
1136  StringList RNA_UV_6SG_modifications(modifications_RNA_UV_6SG.begin(), modifications_RNA_UV_6SG.end());
1137  StringList RNA_UV_6SG_EXTENDED_modifications(modifications_RNA_UV_6SG_EXTENDED.begin(), modifications_RNA_UV_6SG_EXTENDED.end());
1138  StringList RNA_UV_6SG_fragments(fragments_RNA_UV_6SG.begin(), fragments_RNA_UV_6SG.end());
1139 
1140  StringList DNA_UV_modifications(modifications_DNA_UV.begin(), modifications_DNA_UV.end());
1141  StringList DNA_UV_EXTENDED_modifications(modifications_DNA_UV_EXTENDED.begin(), modifications_DNA_UV_EXTENDED.end());
1142  StringList DNA_UV_fragments(fragments_DNA_UV.begin(), fragments_DNA_UV.end());
1143 
1144  StringList RNA_DEB_modifications(modifications_RNA_DEB.begin(), modifications_RNA_DEB.end());
1145  StringList RNA_DEB_EXTENDED_modifications(modifications_RNA_DEB_EXTENDED.begin(), modifications_RNA_DEB_EXTENDED.end());
1146  StringList RNA_DEB_fragments(fragments_RNA_DEB.begin(), fragments_RNA_DEB.end());
1147 
1148  StringList RNA_NM_modifications(modifications_RNA_NM.begin(), modifications_RNA_NM.end());
1149  StringList RNA_NM_EXTENDED_modifications(modifications_RNA_NM_EXTENDED.begin(), modifications_RNA_NM_EXTENDED.end());
1150  StringList RNA_NM_fragments(fragments_RNA_NM.begin(), fragments_RNA_NM.end());
1151 
1152  StringList DNA_DEB_modifications(modifications_DNA_DEB.begin(), modifications_DNA_DEB.end());
1153  StringList DNA_DEB_EXTENDED_modifications(modifications_DNA_DEB_EXTENDED.begin(), modifications_DNA_DEB_EXTENDED.end());
1154  StringList DNA_DEB_fragments(fragments_DNA_DEB.begin(), fragments_DNA_DEB.end());
1155 
1156  StringList DNA_NM_modifications(modifications_DNA_NM.begin(), modifications_DNA_NM.end());
1157  StringList DNA_NM_EXTENDED_modifications(modifications_DNA_NM_EXTENDED.begin(), modifications_DNA_NM_EXTENDED.end());
1158  StringList DNA_NM_fragments(fragments_DNA_NM.begin(), fragments_DNA_NM.end());
1159 
1160  StringList RNA_FA_modifications(modifications_RNA_FA.begin(), modifications_RNA_FA.end());
1161  StringList RNA_FA_fragments(fragments_RNA_FA.begin(), fragments_RNA_FA.end());
1162  StringList RNA_FA_EXTENDED_modifications(modifications_RNA_FA_EXTENDED.begin(), modifications_RNA_FA_EXTENDED.end());
1163 
1164  StringList DNA_FA_modifications(modifications_DNA_FA.begin(), modifications_DNA_FA.end());
1165  StringList DNA_FA_fragments(fragments_DNA_FA.begin(), fragments_DNA_FA.end());
1166  StringList DNA_FA_EXTENDED_modifications(modifications_DNA_FA_EXTENDED.begin(), modifications_DNA_FA_EXTENDED.end());
1167 
1168 
1169 
1170  const String RNA_U = "U";
1171  const String RNA_UCGA = "UCGA";
1172  const String DNA_TCGAd = "TCGAd";
1173  const String RNA_CGA = "CGA";
1174  const String DNA_CGAd = "CGAd";
1175 
1176  // set precursor + fragment adducts and cross-linked nucleotide
1177  if (p == "RNA-UV (U)" || p == "RNA-UV (UCGA)")
1178  {
1179  modifications = RNA_UV_modifications;
1180  fragment_adducts = RNA_UV_fragments;
1181  can_cross_link = (p == "RNA-UV (U)") ? RNA_U : RNA_UCGA;
1182  return;
1183  }
1184  else if (p == "RNA-UV Extended (U)" || p == "RNA-UV Extended (UCGA)")
1185  {
1186  modifications = RNA_UV_EXTENDED_modifications;
1187  fragment_adducts = RNA_UV_fragments;
1188  can_cross_link = (p == "RNA-UV Extended (U)") ? RNA_U : RNA_UCGA ;
1189  return;
1190  }
1191  else if (p == "RNA-UV (4SU)")
1192  {
1193  nucleotides.push_back("S=C9H13N2O8PS"); // include 4-Thio-UMP
1194  mapping.push_back("S->S");
1195  modifications = RNA_UV_4SU_modifications;
1196  fragment_adducts = RNA_UV_4SU_fragments;
1197  can_cross_link = "S";
1198  return;
1199  }
1200  else if (p == "RNA-UV Extended (4SU)")
1201  {
1202  nucleotides.push_back("S=C9H13N2O8PS"); // include 4-Thio-UMP
1203  mapping.push_back("S->S");
1204  modifications = RNA_UV_4SU_EXTENDED_modifications;
1205  fragment_adducts = RNA_UV_4SU_fragments;
1206  can_cross_link = "S";
1207  return;
1208  }
1209  else if (p == "RNA-UV (6SG)")
1210  {
1211  nucleotides.push_back("X=C10H14N5O7PS"); // include 6-Thio-GMP
1212  mapping.push_back("X->X");
1213  modifications = RNA_UV_6SG_modifications;
1214  fragment_adducts = RNA_UV_6SG_fragments;
1215  can_cross_link = "X";
1216  return;
1217  }
1218  else if (p == "RNA-UV Extended (6SG)")
1219  {
1220  nucleotides.push_back("X=C10H14N5O7PS"); // include 6-Thio-GMP
1221  mapping.push_back("X->X");
1222  modifications = RNA_UV_6SG_EXTENDED_modifications;
1223  fragment_adducts = RNA_UV_6SG_fragments;
1224  can_cross_link = "X";
1225  return;
1226  }
1227  else if (p == "DNA-UV")
1228  {
1229  modifications = DNA_UV_modifications;
1230  fragment_adducts = DNA_UV_fragments;
1231  can_cross_link = DNA_TCGAd;
1232  return;
1233  }
1234  else if (p == "DNA-UV Extended")
1235  {
1236  modifications = DNA_UV_EXTENDED_modifications;
1237  fragment_adducts = DNA_UV_fragments;
1238  can_cross_link = DNA_TCGAd;
1239  return;
1240  }
1241  else if (p == "RNA-FA")
1242  {
1243  modifications = RNA_FA_modifications;
1244  fragment_adducts = RNA_FA_fragments;
1245  can_cross_link = RNA_CGA;
1246  return;
1247  }
1248  else if (p == "RNA-FA Extended")
1249  {
1250  modifications = RNA_FA_EXTENDED_modifications;
1251  fragment_adducts = RNA_FA_fragments;
1252  can_cross_link = RNA_CGA;
1253  return;
1254  }
1255  else if (p == "DNA-FA")
1256  {
1257  modifications = DNA_FA_modifications;
1258  fragment_adducts = DNA_FA_fragments;
1259  can_cross_link = DNA_CGAd;
1260  return;
1261  }
1262  else if (p == "DNA-FA Extended")
1263  {
1264  modifications = DNA_FA_EXTENDED_modifications;
1265  fragment_adducts = DNA_FA_fragments;
1266  can_cross_link = DNA_CGAd;
1267  return;
1268  }
1269  else if (p == "RNA-DEB")
1270  {
1271  // add special methionine loss
1272  auto r_ptr = const_cast<Residue*>(ResidueDB::getInstance()->getResidue('M'));
1273  r_ptr->addLossFormula(EmpiricalFormula("CH4S1"));
1274 
1275  modifications = RNA_DEB_modifications;
1276  fragment_adducts = RNA_DEB_fragments;
1277  can_cross_link = RNA_UCGA;
1278  return;
1279  }
1280  else if (p == "RNA-DEB Extended")
1281  {
1282  // add special methionine loss
1283  auto r_ptr = const_cast<Residue*>(ResidueDB::getInstance()->getResidue('M'));
1284  r_ptr->addLossFormula(EmpiricalFormula("CH4S1"));
1285 
1286  modifications = RNA_DEB_EXTENDED_modifications;
1287  fragment_adducts = RNA_DEB_fragments;
1288  can_cross_link = RNA_UCGA;
1289  return;
1290  }
1291  else if (p == "RNA-NM")
1292  {
1293  // add special methionine loss
1294  auto r_ptr = const_cast<Residue*>(ResidueDB::getInstance()->getResidue('M'));
1295  r_ptr->addLossFormula(EmpiricalFormula("CH4S1"));
1296 
1297  modifications = RNA_NM_modifications;
1298  fragment_adducts = RNA_NM_fragments;
1299  can_cross_link = RNA_UCGA;
1300  return;
1301  }
1302  else if (p == "RNA-NM Extended")
1303  {
1304  // add special methionine loss
1305  auto r_ptr = const_cast<Residue*>(ResidueDB::getInstance()->getResidue('M'));
1306  r_ptr->addLossFormula(EmpiricalFormula("CH4S1"));
1307 
1308  modifications = RNA_NM_EXTENDED_modifications;
1309  fragment_adducts = RNA_NM_fragments;
1310  can_cross_link = RNA_UCGA;
1311  return;
1312  }
1313  else if (p == "DNA-DEB")
1314  {
1315  modifications = DNA_DEB_modifications;
1316  fragment_adducts = DNA_DEB_fragments;
1317  can_cross_link = DNA_TCGAd;
1318  return;
1319  }
1320  else if (p == "DNA-DEB Extended")
1321  {
1322  modifications = DNA_DEB_EXTENDED_modifications;
1323  fragment_adducts = DNA_DEB_fragments;
1324  can_cross_link = DNA_TCGAd;
1325  return;
1326  }
1327  else if (p == "DNA-NM")
1328  {
1329  modifications = DNA_NM_modifications;
1330  fragment_adducts = DNA_NM_fragments;
1331  can_cross_link = DNA_TCGAd;
1332  return;
1333  }
1334  else if (p == "DNA-NM Extended")
1335  {
1336  modifications = DNA_NM_EXTENDED_modifications;
1337  fragment_adducts = DNA_NM_fragments;
1338  can_cross_link = DNA_TCGAd;
1339  return;
1340  }
1341  }
1342  }
1343 
1344 }
static constexpr std::array< const char *, 41 > fragments_RNA_UV_6SG
Definition: NuXLPresets.h:635
static constexpr std::array< const char *, 6 > modifications_DNA_DEB
Definition: NuXLPresets.h:420
A more convenient string class.
Definition: String.h:58
static constexpr std::array< const char *, 24 > modifications_RNA_FA_EXTENDED
Definition: NuXLPresets.h:273
static constexpr std::array< const char *, 12 > modifications_DNA_UV
Definition: NuXLPresets.h:360
static constexpr std::array< const char *, 4 > modifications_RNA_NM
Definition: NuXLPresets.h:157
static constexpr std::array< const char *, 34 > modifications_RNA_DEB_EXTENDED
Definition: NuXLPresets.h:214
static constexpr std::array< const char *, 49 > fragments_DNA_FA
Definition: NuXLPresets.h:954
static constexpr std::array< const char *, 46 > fragments_DNA_NM
Definition: NuXLPresets.h:1012
static constexpr std::array< const char *, 32 > modifications_DNA_UV_EXTENDED
Definition: NuXLPresets.h:380
static constexpr std::array< const char *, 38 > modifications_DNA_DEB_EXTENDED
Definition: NuXLPresets.h:431
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
static constexpr std::array< const char *, 12 > modifications_RNA_FA
Definition: NuXLPresets.h:255
static constexpr std::array< const char *, 14 > modifications_RNA_UV_4SU_EXTENDED
Definition: NuXLPresets.h:111
Representation of an amino acid residue.
Definition: Residue.h:62
static constexpr std::array< const char *, 42 > fragments_DNA_UV
Definition: NuXLPresets.h:685
static constexpr std::array< const char *, 5 > DNA_mapping
Definition: NuXLPresets.h:1068
static constexpr std::array< const char *, 23 > presets_names
Definition: NuXLPresets.h:1071
static constexpr std::array< const char *, 6 > modifications_DNA_NM
Definition: NuXLPresets.h:477
Representation of an empirical formula.
Definition: EmpiricalFormula.h:84
void getPresets(const String &p, StringList &nucleotides, StringList &mapping, StringList &modifications, StringList &fragment_adducts, String &can_cross_link)
Definition: NuXLPresets.h:1097
static constexpr std::array< const char *, 47 > fragments_RNA_DEB
Definition: NuXLPresets.h:737
static constexpr std::array< const char *, 29 > modifications_RNA_UV_EXTENDED
Definition: NuXLPresets.h:65
static constexpr std::array< const char *, 50 > fragments_DNA_DEB
Definition: NuXLPresets.h:792
static constexpr std::array< const char *, 11 > modifications_RNA_UV_6SG_EXTENDED
Definition: NuXLPresets.h:140
static constexpr std::array< const char *, 41 > fragments_RNA_UV_4SU
Definition: NuXLPresets.h:586
static ResidueDB * getInstance()
singleton
static constexpr std::array< const char *, 34 > modifications_RNA_NM_EXTENDED
Definition: NuXLPresets.h:165
static constexpr std::array< const char *, 5 > DNA_nucleotides
Definition: NuXLPresets.h:1066
static constexpr std::array< const char *, 16 > modifications_DNA_FA
Definition: NuXLPresets.h:302
static constexpr std::array< const char *, 28 > modifications_DNA_FA_EXTENDED
Definition: NuXLPresets.h:325
static constexpr std::array< const char *, 4 > modifications_RNA_DEB
Definition: NuXLPresets.h:206
std::vector< String > StringList
Vector of String.
Definition: ListUtils.h:70
static constexpr std::array< const char *, 6 > modifications_RNA_UV_4SU
Definition: NuXLPresets.h:101
void addLossFormula(const EmpiricalFormula &)
adds a neutral loss formula
static constexpr std::array< const char *, 43 > fragments_RNA_NM
Definition: NuXLPresets.h:851
static constexpr std::array< const char *, 6 > modifications_RNA_UV_6SG
Definition: NuXLPresets.h:130
static constexpr std::array< const char *, 39 > fragments_RNA_UV
Definition: NuXLPresets.h:538
bool hasPrefix(const String &string) const
true if String begins with string, false otherwise
static constexpr std::array< const char *, 4 > RNA_mapping
Definition: NuXLPresets.h:1069
static constexpr std::array< const char *, 38 > modifications_DNA_NM_EXTENDED
Definition: NuXLPresets.h:487
static constexpr std::array< const char *, 4 > RNA_nucleotides
Definition: NuXLPresets.h:1067
static constexpr std::array< const char *, 10 > modifications_RNA_UV
Definition: NuXLPresets.h:48
const Residue * getResidue(const String &name) const
returns a pointer to the residue with name, 3 letter code or 1 letter code name
static constexpr std::array< const char *, 46 > fragments_RNA_FA
Definition: NuXLPresets.h:901