OpenMS
NucleicAcidSpectrumGenerator.h
Go to the documentation of this file.
1 // Copyright (c) 2002-2023, The OpenMS Team -- EKU Tuebingen, ETH Zurich, and FU Berlin
2 // SPDX-License-Identifier: BSD-3-Clause
3 //
4 // --------------------------------------------------------------------------
5 // $Maintainer: Hendrik Weisser $
6 // $Authors: Hendrik Weisser $
7 // --------------------------------------------------------------------------
8 
9 #pragma once
10 
15 
16 namespace OpenMS
17 {
18  class NASequence;
19 
27  class OPENMS_DLLAPI NucleicAcidSpectrumGenerator :
28  public DefaultParamHandler
29  {
30  public:
31 
37 
40 
44 
47 
52  void getSpectrum(MSSpectrum& spectrum, const NASequence& oligo, Int min_charge, Int max_charge) const;
53 
68  void getMultipleSpectra(std::map<Int, MSSpectrum>& spectra, const NASequence& oligo, const std::set<Int>& charges, Int base_charge = 1) const;
69 
71  void updateMembers_() override;
73 
74  protected:
75 
77  void addFragmentPeaks_(MSSpectrum& spectrum, const std::vector<double>& fragment_masses, const String& ion_type, double offset, double intensity, Size start = 0) const;
78 
80  void addAMinusBPeaks_(MSSpectrum& spectrum, const std::vector<double>& fragment_masses, const NASequence& oligo, Size start = 0) const;
81 
84 
86  void addChargedSpectrum_(MSSpectrum& spectrum, const MSSpectrum& uncharged_spectrum, Int charge, bool add_precursor) const;
87 
101  double a_intensity_;
102  double b_intensity_;
103  double c_intensity_;
104  double d_intensity_;
105  double w_intensity_;
106  double x_intensity_;
107  double y_intensity_;
108  double z_intensity_;
111  };
112 }
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:66
The representation of a 1D spectrum.
Definition: MSSpectrum.h:44
Representation of a nucleic acid sequence.
Definition: NASequence.h:34
Generates theoretical spectra for nucleic acid sequences.
Definition: NucleicAcidSpectrumGenerator.h:29
bool add_x_ions_
Definition: NucleicAcidSpectrumGenerator.h:93
bool add_precursor_peaks_
Definition: NucleicAcidSpectrumGenerator.h:99
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:100
bool add_d_ions_
Definition: NucleicAcidSpectrumGenerator.h:91
bool add_a_ions_
Definition: NucleicAcidSpectrumGenerator.h:88
double c_intensity_
Definition: NucleicAcidSpectrumGenerator.h:103
bool add_b_ions_
Definition: NucleicAcidSpectrumGenerator.h:89
double z_intensity_
Definition: NucleicAcidSpectrumGenerator.h:108
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:94
NucleicAcidSpectrumGenerator()
default constructor
double w_intensity_
Definition: NucleicAcidSpectrumGenerator.h:105
NucleicAcidSpectrumGenerator(const NucleicAcidSpectrumGenerator &source)
copy constructor
~NucleicAcidSpectrumGenerator() override
destructor
double aB_intensity_
Definition: NucleicAcidSpectrumGenerator.h:109
double d_intensity_
Definition: NucleicAcidSpectrumGenerator.h:104
bool add_aB_ions_
Definition: NucleicAcidSpectrumGenerator.h:96
double x_intensity_
Definition: NucleicAcidSpectrumGenerator.h:106
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:101
bool add_w_ions_
Definition: NucleicAcidSpectrumGenerator.h:92
bool add_first_prefix_ion_
Definition: NucleicAcidSpectrumGenerator.h:97
double precursor_intensity_
Definition: NucleicAcidSpectrumGenerator.h:110
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:102
void updateMembers_() override
overwrite
double y_intensity_
Definition: NucleicAcidSpectrumGenerator.h:107
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:90
NucleicAcidSpectrumGenerator & operator=(const NucleicAcidSpectrumGenerator &source)
assignment operator
bool add_z_ions_
Definition: NucleicAcidSpectrumGenerator.h:95
bool add_metainfo_
Definition: NucleicAcidSpectrumGenerator.h:98
A more convenient string class.
Definition: String.h:34
int Int
Signed integer type.
Definition: Types.h:76
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:101
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:22