OpenMS  2.8.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-2021.
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 
41 
42 namespace OpenMS
43 {
44  class NASequence;
45 
53  class OPENMS_DLLAPI NucleicAcidSpectrumGenerator :
54  public DefaultParamHandler
55  {
56  public:
57 
63 
66 
70 
73 
78  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 
110 
112  void addChargedSpectrum_(MSSpectrum& spectrum, const MSSpectrum& uncharged_spectrum, Int charge, bool add_precursor) const;
113 
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_;
137  };
138 }
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:93
The representation of a 1D spectrum.
Definition: MSSpectrum.h:70
Representation of a nucleic acid sequence.
Definition: NASequence.h:63
Generates theoretical spectra for nucleic acid sequences.
Definition: NucleicAcidSpectrumGenerator.h:55
bool add_x_ions_
Definition: NucleicAcidSpectrumGenerator.h:119
bool add_precursor_peaks_
Definition: NucleicAcidSpectrumGenerator.h:125
void addAMinusBPeaks_(MSSpectrum &spectrum, const std::vector< double > &fragment_masses, const NASequence &oligo, Size start=0) const
Special version of addFragmentPeaks_() for a-B ions.
bool add_all_precursor_charges_
Definition: NucleicAcidSpectrumGenerator.h:126
bool add_d_ions_
Definition: NucleicAcidSpectrumGenerator.h:117
bool add_a_ions_
Definition: NucleicAcidSpectrumGenerator.h:114
double c_intensity_
Definition: NucleicAcidSpectrumGenerator.h:129
bool add_b_ions_
Definition: NucleicAcidSpectrumGenerator.h:115
double z_intensity_
Definition: NucleicAcidSpectrumGenerator.h:134
void addFragmentPeaks_(MSSpectrum &spectrum, const std::vector< double > &fragment_masses, const String &ion_type, double offset, double intensity, Size start=0) const
Helper function to add (uncharged) fragment peaks to a spectrum.
bool add_y_ions_
Definition: NucleicAcidSpectrumGenerator.h:120
NucleicAcidSpectrumGenerator()
default constructor
double w_intensity_
Definition: NucleicAcidSpectrumGenerator.h:131
NucleicAcidSpectrumGenerator(const NucleicAcidSpectrumGenerator &source)
copy constructor
~NucleicAcidSpectrumGenerator() override
destructor
double aB_intensity_
Definition: NucleicAcidSpectrumGenerator.h:135
double d_intensity_
Definition: NucleicAcidSpectrumGenerator.h:130
bool add_aB_ions_
Definition: NucleicAcidSpectrumGenerator.h:122
double x_intensity_
Definition: NucleicAcidSpectrumGenerator.h:132
void getSpectrum(MSSpectrum &spectrum, const NASequence &oligo, Int min_charge, Int max_charge) const
Generates a spectrum for an oligonucleotide sequence, with the ion types that are set in the tool par...
double a_intensity_
Definition: NucleicAcidSpectrumGenerator.h:127
bool add_w_ions_
Definition: NucleicAcidSpectrumGenerator.h:118
bool add_first_prefix_ion_
Definition: NucleicAcidSpectrumGenerator.h:123
double precursor_intensity_
Definition: NucleicAcidSpectrumGenerator.h:136
void addChargedSpectrum_(MSSpectrum &spectrum, const MSSpectrum &uncharged_spectrum, Int charge, bool add_precursor) const
Adds a charged version of an uncharged spectrum to another spectrum.
double b_intensity_
Definition: NucleicAcidSpectrumGenerator.h:128
void updateMembers_() override
overwrite
double y_intensity_
Definition: NucleicAcidSpectrumGenerator.h:133
void getMultipleSpectra(std::map< Int, MSSpectrum > &spectra, const NASequence &oligo, const std::set< Int > &charges, Int base_charge=1) const
Generates spectra in multiple charge states for an oligonucleotide sequence.
MSSpectrum getUnchargedSpectrum_(const NASequence &oligo) const
Generates a spectrum containing peaks for uncharged fragment masses.
bool add_c_ions_
Definition: NucleicAcidSpectrumGenerator.h:116
NucleicAcidSpectrumGenerator & operator=(const NucleicAcidSpectrumGenerator &source)
assignment operator
bool add_z_ions_
Definition: NucleicAcidSpectrumGenerator.h:121
bool add_metainfo_
Definition: NucleicAcidSpectrumGenerator.h:124
A more convenient string class.
Definition: String.h:60
int Int
Signed integer type.
Definition: Types.h:102
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:127
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47