OpenMS  3.0.0
NuXLFragmentIonGenerator.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 
44 #include <vector>
45 #include <map>
46 #include <set>
47 #include <iostream>
48 
49 namespace OpenMS
50 {
51 
52 // helper class that adds special ions not covered by TheoreticalSpectrumGenerator
53 class OPENMS_DLLAPI NuXLFragmentIonGenerator
54 {
55  public:
56  // prefix used to denote marker ions in fragment annotations
57  static constexpr const char* ANNOTATIONS_MARKER_ION_PREFIX = "MI:";
58 
59  // add RNA-marker ions of charge 1
60  // this includes the protonated nitrogenous base and all shifts (e.g., U-H2O, U'-H20, ...)
61  static void addMS2MarkerIons(
62  const std::vector<NuXLFragmentAdductDefinition>& marker_ions,
63  PeakSpectrum& spectrum,
64  PeakSpectrum::IntegerDataArray& spectrum_charge,
65  PeakSpectrum::StringDataArray& spectrum_annotation);
66 
67  static void addShiftedImmoniumIons(
68  const String & unmodified_sequence,
69  const String & fragment_shift_name,
70  const double fragment_shift_mass,
71  PeakSpectrum & partial_loss_spectrum,
72  PeakSpectrum::IntegerDataArray& partial_loss_spectrum_charge,
73  PeakSpectrum::StringDataArray& partial_loss_spectrum_annotation);
74 
75  static void generatePartialLossSpectrum(const String& unmodified_sequence,
76  const double& fixed_and_variable_modified_peptide_weight,
77  const String& precursor_rna_adduct,
78  const double& precursor_rna_mass,
79  const int& precursor_charge,
80  const std::vector<NuXLFragmentAdductDefinition>& partial_loss_modification,
81  const PeakSpectrum& patial_loss_template_z1,
82  const PeakSpectrum& patial_loss_template_z2,
83  const PeakSpectrum& patial_loss_template_z3,
84  PeakSpectrum& partial_loss_spectrum);
85  static void addPrecursorWithCompleteRNA_(const double fixed_and_variable_modified_peptide_weight,
86  const String & precursor_rna_adduct,
87  const double precursor_rna_mass,
88  const int charge,
89  PeakSpectrum & partial_loss_spectrum,
90  MSSpectrum::IntegerDataArray & partial_loss_spectrum_charge,
91  MSSpectrum::StringDataArray & partial_loss_spectrum_annotation);
92 
93  static void addSpecialLysImmonumIons(const String& unmodified_sequence,
94  PeakSpectrum &spectrum,
95  PeakSpectrum::IntegerDataArray &spectrum_charge,
96  PeakSpectrum::StringDataArray &spectrum_annotation);
97  };
98 }
A more convenient string class.
Definition: String.h:58
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
Integer data array class.
Definition: DataArrays.h:52
The representation of a 1D spectrum.
Definition: MSSpectrum.h:66
String data array class.
Definition: DataArrays.h:59
Definition: NuXLFragmentIonGenerator.h:53