Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
CompNovoIdentificationBase.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-2017.
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: Andreas Bertsch $
33 // --------------------------------------------------------------------------
34 
35 
36 #ifndef OPENMS_ANALYSIS_DENOVO_COMPNOVOIDENTIFICATIONBASE_H
37 #define OPENMS_ANALYSIS_DENOVO_COMPNOVOIDENTIFICATIONBASE_H
38 
39 // OpenMS includes
47 
48 // stl includes
49 #include <vector>
50 
51 namespace OpenMS
52 {
58  class OPENMS_DLLAPI CompNovoIdentificationBase :
59  public DefaultParamHandler
60  {
61 
62 public:
63 
69 
72 
74  virtual ~CompNovoIdentificationBase();
76 
78  CompNovoIdentificationBase & operator=(const CompNovoIdentificationBase & source);
79 
83  virtual void getIdentifications(std::vector<PeptideIdentification> & ids, const PeakMap & exp) = 0;
86 
88 
89 protected:
90 
92  void updateMembers_();
93 
95  void filterPermuts_(std::set<String> & permut);
96 
98  void selectPivotIons_(std::vector<Size> & pivots, Size left, Size right, Map<double, IonScore> & CID_nodes, const PeakSpectrum & CID_orig_spec, double precursor_weight, bool full_range = false);
99 
101  void filterDecomps_(std::vector<MassDecomposition> & decomps);
102 
104  void getDecompositions_(std::vector<MassDecomposition> & decomps, double mass, bool no_caching = false);
105 
107  void permute_(String prefix, String s, std::set<String> & permutations);
108 
109  Size countMissedCleavagesTryptic_(const String & peptide) const;
110 
112  void getCIDSpectrumLight_(PeakSpectrum & spec, const String & sequence, double prefix, double suffix);
113 
115  void getCIDSpectrum_(PeakSpectrum & spec, const String & sequence, Size charge, double prefix = 0.0, double suffix = 0.0);
116 
118  void initIsotopeDistributions_();
119 
121  double estimatePrecursorWeight_(const PeakSpectrum & ETD_spec, Size & charge);
122 
124  void windowMower_(PeakSpectrum & spec, double windowsize, Size no_peaks);
125 
127  double compareSpectra_(const PeakSpectrum & s1, const PeakSpectrum & s2);
128 
130  AASequence getModifiedAASequence_(const String & sequence);
131 
133  String getModifiedStringFromAASequence_(const AASequence & sequence);
134 
137 
140 
143 
146 
148 
150 
152 
154 
156 
158 
160 
162 
164 
165  double max_mz_;
166 
167  double min_mz_;
168 
170 
172 
174 
176 
178 
179 public:
180 
186  class Permut
187  {
188 private:
189 
190  Permut() :
191  score_(0)
192  {
193  }
194 
195 public:
196 
197  Permut(const std::set<String>::const_iterator & permut, double s) :
198  permut_(permut),
199  score_(s)
200  {
201  }
202 
203  Permut(const Permut & rhs) :
204  permut_(rhs.permut_),
205  score_(rhs.score_)
206  {
207  }
208 
209  virtual ~Permut()
210  {
211  }
212 
213  Permut & operator=(const Permut & rhs)
214  {
215  if (&rhs != this)
216  {
217  permut_ = rhs.permut_;
218  score_ = rhs.score_;
219  }
220  return *this;
221  }
222 
223  const std::set<String>::const_iterator & getPermut() const
224  {
225  return permut_;
226  }
227 
228  void setPermut(const std::set<String>::const_iterator & it)
229  {
230  permut_ = it;
231  }
232 
233  double getScore() const
234  {
235  return score_;
236  }
237 
238  void setScore(double score)
239  {
240  score_ = score;
241  }
242 
243 protected:
244 
245  std::set<String>::const_iterator permut_;
246  double score_;
247  };
248 
249  };
250 
251  namespace Internal
252  {
254  }
255 }
256 
257 #endif
void setScore(double score)
Definition: CompNovoIdentificationBase.h:238
A more convenient string class.
Definition: String.h:57
std::set< String >::const_iterator permut_
Definition: CompNovoIdentificationBase.h:245
Map< char, const Residue * > name_to_residue_
mapping for the internal representation character to the actual residue
Definition: CompNovoIdentificationBase.h:136
Map< const Residue *, char > residue_to_name_
mapping of the actual residue to the internal representing character
Definition: CompNovoIdentificationBase.h:139
double score_
Definition: CompNovoIdentificationBase.h:246
Permut(const Permut &rhs)
Definition: CompNovoIdentificationBase.h:203
double fragment_mass_tolerance_
Definition: CompNovoIdentificationBase.h:159
Map< Size, std::vector< double > > isotope_distributions_
Definition: CompNovoIdentificationBase.h:142
Representation of a peptide/protein sequence.
Definition: AASequence.h:108
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
Size max_isotope_
Definition: CompNovoIdentificationBase.h:173
double getScore() const
Definition: CompNovoIdentificationBase.h:233
CompNovoIonScoringBase::IonScore IonScore
Definition: CompNovoIdentificationBase.h:87
The representation of a 1D spectrum.
Definition: MSSpectrum.h:67
Similarity score of Zhang.
Definition: ZhangSimilarityScore.h:55
ZhangSimilarityScore zhang_
Definition: CompNovoIdentificationBase.h:151
double min_aa_weight_
Definition: CompNovoIdentificationBase.h:149
bool PermutScoreComparator(const CompNovoIdentificationBase::Permut &p1, const CompNovoIdentificationBase::Permut &p2)
virtual ~Permut()
Definition: CompNovoIdentificationBase.h:209
const std::set< String >::const_iterator & getPermut() const
Definition: CompNovoIdentificationBase.h:223
Map< double, std::vector< MassDecomposition > > decomp_cache_
Definition: CompNovoIdentificationBase.h:175
double max_decomp_weight_
Definition: CompNovoIdentificationBase.h:169
double decomp_weights_precision_
Definition: CompNovoIdentificationBase.h:163
Size max_number_aa_per_decomp_
Definition: CompNovoIdentificationBase.h:155
Permut & operator=(const Permut &rhs)
Definition: CompNovoIdentificationBase.h:213
double max_mz_
Definition: CompNovoIdentificationBase.h:165
Size max_number_pivot_
Definition: CompNovoIdentificationBase.h:161
In-Memory representation of a mass spectrometry experiment.
Definition: MSExperiment.h:82
void setPermut(const std::set< String >::const_iterator &it)
Definition: CompNovoIdentificationBase.h:228
run with CompNovoIdentificationBase
Definition: CompNovoIdentificationBase.h:58
Permut(const std::set< String >::const_iterator &permut, double s)
Definition: CompNovoIdentificationBase.h:197
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:128
Map< Size, Map< Size, std::set< String > > > subspec_to_sequences_
Definition: CompNovoIdentificationBase.h:153
Map< String, std::set< String > > permute_cache_
Definition: CompNovoIdentificationBase.h:177
MassDecompositionAlgorithm mass_decomp_algorithm_
Definition: CompNovoIdentificationBase.h:147
A base class for all classes handling default parameters.
Definition: DefaultParamHandler.h:92
Map< char, double > aa_to_weight_
masses of the amino acids
Definition: CompNovoIdentificationBase.h:145
Mass decomposition algorithm, given a mass it suggests possible compositions.
Definition: MassDecompositionAlgorithm.h:69
Size max_subscore_number_
Definition: CompNovoIdentificationBase.h:171
Simple class to store permutations and a score.
Definition: CompNovoIdentificationBase.h:186
Definition: CompNovoIonScoringBase.h:67
Map class based on the STL map (containing several convenience functions)
Definition: Map.h:51
double min_mz_
Definition: CompNovoIdentificationBase.h:167
bool tryptic_only_
Definition: CompNovoIdentificationBase.h:157
Permut()
Definition: CompNovoIdentificationBase.h:190

OpenMS / TOPP release 2.3.0 Documentation generated on Tue Jan 9 2018 18:21:59 using doxygen 1.8.13