| OpenMS 2.5.0

NucleicAcidSpectrumGenerator.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-2020.
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: Hendrik Weisser $
32 // $Authors: Hendrik Weisser $
33 // --------------------------------------------------------------------------
34
35 #pragma once
36
37 #include <OpenMS/DATASTRUCTURES/DefaultParamHandler.h>
38 #include <OpenMS/KERNEL/MSSpectrum.h>
39 #include <OpenMS/METADATA/DataArrays.h>
40 #include <OpenMS/CHEMISTRY/NASequence.h>
41
42 namespace OpenMS
43 {
44 class NASequence;
45
53 class OPENMS_DLLAPI NucleicAcidSpectrumGenerator :
54 public DefaultParamHandler
55 {
56 public:
57
61 NucleicAcidSpectrumGenerator();
63
65 NucleicAcidSpectrumGenerator(const NucleicAcidSpectrumGenerator& source);
66
68 ~NucleicAcidSpectrumGenerator() override;
70
72 NucleicAcidSpectrumGenerator& operator=(const NucleicAcidSpectrumGenerator& source);
73
77 void getSpectrum(MSSpectrum& spectrum, const NASequence& oligo, Int min_charge, Int max_charge) const;
79
94 void getMultipleSpectra(std::map<Int, MSSpectrum>& spectra, const NASequence& oligo, const std::set<Int>& charges, Int base_charge = 1) const;
95
97 void updateMembers_() override;
99
100 protected:
101
103 void addFragmentPeaks_(MSSpectrum& spectrum, const std::vector<double>& fragment_masses, const String& ion_type, double offset, double intensity, Size start = 0) const;
104
106 void addAMinusBPeaks_(MSSpectrum& spectrum, const std::vector<double>& fragment_masses, const NASequence& oligo, Size start = 0) const;
107
109 MSSpectrum getUnchargedSpectrum_(const NASequence& oligo) const;
110
112 void addChargedSpectrum_(MSSpectrum& spectrum, const MSSpectrum& uncharged_spectrum, Int charge, bool add_precursor) const;
113
114 bool add_a_ions_;
115 bool add_b_ions_;
116 bool add_c_ions_;
117 bool add_d_ions_;
118 bool add_w_ions_;
119 bool add_x_ions_;
120 bool add_y_ions_;
121 bool add_z_ions_;
122 bool add_aB_ions_;
123 bool add_first_prefix_ion_;
124 bool add_metainfo_;
125 bool add_precursor_peaks_;
126 bool add_all_precursor_charges_ ;
127 double a_intensity_;
128 double b_intensity_;
129 double c_intensity_;
130 double d_intensity_;
131 double w_intensity_;
132 double x_intensity_;
133 double y_intensity_;
134 double z_intensity_;
135 double aB_intensity_;
136 double precursor_intensity_;
137 };
138 }
OpenMS::NucleicAcidSpectrumGenerator::c_intensity_
double c_intensity_
Definition: NucleicAcidSpectrumGenerator.h:129
OpenMS::String
A more convenient string class.
Definition: String.h:58
OpenMS::NucleicAcidSpectrumGenerator::add_b_ions_
bool add_b_ions_
Definition: NucleicAcidSpectrumGenerator.h:115
OpenMS::NucleicAcidSpectrumGenerator::add_a_ions_
bool add_a_ions_
Definition: NucleicAcidSpectrumGenerator.h:114
OpenMS::DefaultParamHandler
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:91
OpenMS::NucleicAcidSpectrumGenerator::add_x_ions_
bool add_x_ions_
Definition: NucleicAcidSpectrumGenerator.h:119
OpenMS::NucleicAcidSpectrumGenerator::d_intensity_
double d_intensity_
Definition: NucleicAcidSpectrumGenerator.h:130
OpenMS::NucleicAcidSpectrumGenerator::add_z_ions_
bool add_z_ions_
Definition: NucleicAcidSpectrumGenerator.h:121
OpenMS::NucleicAcidSpectrumGenerator::add_aB_ions_
bool add_aB_ions_
Definition: NucleicAcidSpectrumGenerator.h:122
OpenMS::NucleicAcidSpectrumGenerator::add_first_prefix_ion_
bool add_first_prefix_ion_
Definition: NucleicAcidSpectrumGenerator.h:123
NASequence.h
DataArrays.h
OpenMS::NucleicAcidSpectrumGenerator::add_c_ions_
bool add_c_ions_
Definition: NucleicAcidSpectrumGenerator.h:116
OpenMS::NucleicAcidSpectrumGenerator::precursor_intensity_
double precursor_intensity_
Definition: NucleicAcidSpectrumGenerator.h:136
OpenMS::NucleicAcidSpectrumGenerator::z_intensity_
double z_intensity_
Definition: NucleicAcidSpectrumGenerator.h:134
OpenMS::NucleicAcidSpectrumGenerator::x_intensity_
double x_intensity_
Definition: NucleicAcidSpectrumGenerator.h:132
OpenMS::NucleicAcidSpectrumGenerator::add_d_ions_
bool add_d_ions_
Definition: NucleicAcidSpectrumGenerator.h:117
OpenMS::MSSpectrum
The representation of a 1D spectrum.
Definition: MSSpectrum.h:67
OpenMS::NucleicAcidSpectrumGenerator::add_w_ions_
bool add_w_ions_
Definition: NucleicAcidSpectrumGenerator.h:118
OpenMS::NucleicAcidSpectrumGenerator::add_y_ions_
bool add_y_ions_
Definition: NucleicAcidSpectrumGenerator.h:120
OpenMS
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
OpenMS::NucleicAcidSpectrumGenerator::add_all_precursor_charges_
bool add_all_precursor_charges_
Definition: NucleicAcidSpectrumGenerator.h:126
DefaultParamHandler.h
MSSpectrum.h
OpenMS::NucleicAcidSpectrumGenerator
Generates theoretical spectra for nucleic acid sequences.
Definition: NucleicAcidSpectrumGenerator.h:53
OpenMS::NASequence
Representation of a nucleic acid sequence.
Definition: NASequence.h:62
OpenMS::NucleicAcidSpectrumGenerator::y_intensity_
double y_intensity_
Definition: NucleicAcidSpectrumGenerator.h:133
int
OpenMS::NucleicAcidSpectrumGenerator::add_precursor_peaks_
bool add_precursor_peaks_
Definition: NucleicAcidSpectrumGenerator.h:125
OpenMS::NucleicAcidSpectrumGenerator::b_intensity_
double b_intensity_
Definition: NucleicAcidSpectrumGenerator.h:128
OpenMS::NucleicAcidSpectrumGenerator::a_intensity_
double a_intensity_
Definition: NucleicAcidSpectrumGenerator.h:127
OpenMS::NucleicAcidSpectrumGenerator::aB_intensity_
double aB_intensity_
Definition: NucleicAcidSpectrumGenerator.h:135
OpenMS::NucleicAcidSpectrumGenerator::add_metainfo_
bool add_metainfo_
Definition: NucleicAcidSpectrumGenerator.h:124
OpenMS::NucleicAcidSpectrumGenerator::w_intensity_
double w_intensity_
Definition: NucleicAcidSpectrumGenerator.h:131
OpenMS::Size
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:127