OpenMS
ProtonDistributionModel.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: Timo Sachsenberg $
6 // $Authors: Andreas Bertsch $
7 // --------------------------------------------------------------------------
8 
9 
10 #pragma once
11 
12 #include <OpenMS/CONCEPT/Types.h>
15 #include <vector>
16 
17 namespace OpenMS
18 {
19  class AASequence;
20 
44  class OPENMS_DLLAPI ProtonDistributionModel :
45  public DefaultParamHandler
46  {
47 public:
48 
54 
57 
61 
64 
70  {
71  ChargeDirected = 0,
73  SideChain
74  };
76 
85  void getProtonDistribution(std::vector<double> & bb_charges, std::vector<double> & sc_charges, const AASequence & peptide, Int charge, Residue::ResidueType res_type = Residue::YIon);
86 
98  //void getChargeStateIntensities(const AASequence& peptide, const AASequence& n_term_ion, const AASequence& c_term_ion, Int charge, Residue::ResidueType n_term_type, double& n_term1, double& c_term1, double& n_term2, double& c_term2, FragmentationType type);
99 
100 
101  void getChargeStateIntensities(const AASequence & peptide, const AASequence & n_term_ion, const AASequence & c_term_ion, Int charge, Residue::ResidueType n_term_type,
102  std::vector<double> & n_term_intensities, std::vector<double> & c_term_intensities, FragmentationType type);
103 
105  void setPeptideProtonDistribution(const std::vector<double> & bb_charge, const std::vector<double> & sc_charge);
106 
107 protected:
108 
109  // calculates the proton distribution
110  void calculateProtonDistribution_(const AASequence & peptide, Int charge, Residue::ResidueType res_type = Residue::YIon, bool fixed_proton = false, Size cleavage_site = 0, bool use_most_basic_site = false);
111 
113  void calculateProtonDistributionCharge2_(const AASequence & peptide, Residue::ResidueType res_type, bool fixed_proton, Size cleavage_site, bool use_most_basic_site);
115 
116  void calculateProtonDistributionIonPair_(const AASequence & peptide, Residue::ResidueType type, Size cleavage_site);
117 
118  // returns the proton affinity of the peptide with the given charge and ion type
119  //double getProtonAffinity_(const AASequence& ion, Int charge, Residue::ResidueType res_type);
120 
121  // returns the (relative) Intensities of the possible charge states of the ion from peptide
122  //std::vector<double> getChargeStateIntensities_(const AASequence& peptide, const AASequence& ion, Int charge, Residue::ResidueType res_type);
123 
124 
125  void calcChargeStateIntensities_(const AASequence & peptide, const AASequence & n_term_ion, const AASequence & c_term_ion, Int charge,
126  Residue::ResidueType n_term_type, std::vector<double> & n_term_intensities, std::vector<double> & c_term_intensities, FragmentationType type);
127 
128  // calculates the intensities of the different possible charge states
129  void calcChargeStateIntensities_(const AASequence & peptide, const AASequence & n_term_ion, const AASequence & c_term_ion, Int charge, Residue::ResidueType n_term_type, double & n_term1, double & c_term1, double & n_term2, double & c_term2, FragmentationType type);
130 
131  // returns the left and right GB values, NH2 and COOH if at terminus
132  void getLeftAndRightGBValues_(const AASequence & peptide, double & left_gb, double & right_gb, Size position);
133 
134  std::vector<double> sc_charge_;
135  std::vector<double> bb_charge_;
136  std::vector<double> sc_charge_full_;
137  std::vector<double> bb_charge_full_;
138  std::vector<double> sc_charge_ion_n_term_;
139  std::vector<double> bb_charge_ion_n_term_;
140  std::vector<double> sc_charge_ion_c_term_;
141  std::vector<double> bb_charge_ion_c_term_;
142  double E_;
143  double E_c_term_;
144  double E_n_term_;
145 
146  };
147 }
Representation of a peptide/protein sequence.
Definition: AASequence.h:86
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:66
A proton distribution model to calculate the proton distribution over charged peptides.
Definition: ProtonDistributionModel.h:46
ProtonDistributionModel(const ProtonDistributionModel &model)
copy constructor
double E_n_term_
Definition: ProtonDistributionModel.h:144
std::vector< double > bb_charge_ion_n_term_
Definition: ProtonDistributionModel.h:139
void calculateProtonDistributionCharge1_(const AASequence &peptide, Residue::ResidueType res_type)
void getLeftAndRightGBValues_(const AASequence &peptide, double &left_gb, double &right_gb, Size position)
FragmentationType
the type of fragmentation
Definition: ProtonDistributionModel.h:70
@ ChargeRemote
Definition: ProtonDistributionModel.h:72
std::vector< double > bb_charge_ion_c_term_
Definition: ProtonDistributionModel.h:141
void getProtonDistribution(std::vector< double > &bb_charges, std::vector< double > &sc_charges, const AASequence &peptide, Int charge, Residue::ResidueType res_type=Residue::YIon)
calculates a proton distribution of the given charged peptide
void calcChargeStateIntensities_(const AASequence &peptide, const AASequence &n_term_ion, const AASequence &c_term_ion, Int charge, Residue::ResidueType n_term_type, std::vector< double > &n_term_intensities, std::vector< double > &c_term_intensities, FragmentationType type)
double E_
Definition: ProtonDistributionModel.h:142
void calculateProtonDistributionGreater2_(const AASequence &peptide, Int charge, Residue::ResidueType res_type)
ProtonDistributionModel & operator=(const ProtonDistributionModel &pdm)
assignment operator
std::vector< double > sc_charge_full_
Definition: ProtonDistributionModel.h:136
std::vector< double > sc_charge_ion_c_term_
Definition: ProtonDistributionModel.h:140
double E_c_term_
Definition: ProtonDistributionModel.h:143
void getChargeStateIntensities(const AASequence &peptide, const AASequence &n_term_ion, const AASequence &c_term_ion, Int charge, Residue::ResidueType n_term_type, std::vector< double > &n_term_intensities, std::vector< double > &c_term_intensities, FragmentationType type)
calculates the charge state intensities of different charge states of the same ion
void calculateProtonDistribution_(const AASequence &peptide, Int charge, Residue::ResidueType res_type=Residue::YIon, bool fixed_proton=false, Size cleavage_site=0, bool use_most_basic_site=false)
void calculateProtonDistributionCharge2_(const AASequence &peptide, Residue::ResidueType res_type, bool fixed_proton, Size cleavage_site, bool use_most_basic_site)
std::vector< double > bb_charge_full_
Definition: ProtonDistributionModel.h:137
ProtonDistributionModel()
default constructor
void calcChargeStateIntensities_(const AASequence &peptide, const AASequence &n_term_ion, const AASequence &c_term_ion, Int charge, Residue::ResidueType n_term_type, double &n_term1, double &c_term1, double &n_term2, double &c_term2, FragmentationType type)
void setPeptideProtonDistribution(const std::vector< double > &bb_charge, const std::vector< double > &sc_charge)
sets the proton distributions of the whole peptide, they are needed for the getChargeStateIntensities...
~ProtonDistributionModel() override
destructor
std::vector< double > bb_charge_
Definition: ProtonDistributionModel.h:135
void calculateProtonDistributionIonPair_(const AASequence &peptide, Residue::ResidueType type, Size cleavage_site)
std::vector< double > sc_charge_ion_n_term_
Definition: ProtonDistributionModel.h:138
std::vector< double > sc_charge_
Definition: ProtonDistributionModel.h:134
ResidueType
Definition: Residue.h:126
@ YIon
MS:1001220 peptide bond up to the C-terminus.
Definition: Residue.h:135
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