libpappsomspp
Library for mass spectrometry
msrunretentiontime.cpp
Go to the documentation of this file.
1 
2 /*******************************************************************************
3  * Copyright (c) 2019 Olivier Langella <Olivier.Langella@u-psud.fr>.
4  *
5  * This file is part of the PAPPSOms++ library.
6  *
7  * PAPPSOms++ is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * PAPPSOms++ is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with PAPPSOms++. If not, see <http://www.gnu.org/licenses/>.
19  *
20  * Contributors:
21  * Olivier Langella <Olivier.Langella@u-psud.fr> - initial API and
22  *implementation
23  ******************************************************************************/
24 
25 #include "msrunretentiontime.h"
26 #include "../../exception/exceptionnotpossible.h"
27 #include <QDebug>
28 //#include <odsstream/odsexception.h>
29 //#include <odsstream/odsdocwriter.h>
30 //#include <QFileInfo>
31 
32 using namespace pappso;
33 
34 /*
35 void
36 writeTrace(const QString &filename, const pappso::Trace &trace)
37 {
38  QFile file(filename);
39  qDebug() << __FILE__ << "@" << __LINE__ << __FUNCTION__ << "() "
40  << QFileInfo(filename).absoluteFilePath();
41  // file.open(QIODevice::WriteOnly);
42  OdsDocWriter writer(&file);
43 
44  for(auto &data_point : trace)
45  {
46  writer.writeCell(data_point.x);
47  writer.writeCell(data_point.y);
48  writer.writeLine();
49  }
50  writer.close();
51 }
52 */
53 
55 {
56 
57  public:
58  RetentionTimeReader(std::vector<RtPoint> &rt_points)
59  : m_rtPoints(rt_points){};
60  virtual ~RetentionTimeReader(){};
61  virtual void
63  {
64  if(spectrum.getMsLevel() == 1)
65  {
66  m_rtPoints.push_back({spectrum.getRtInSeconds(),
67  spectrum.getMassSpectrumId().getSpectrumIndex()});
68  }
69  };
70  virtual bool
71  needPeakList() const override
72  {
73  return false;
74  };
75 
76  private:
77  std::vector<RtPoint> &m_rtPoints;
78 };
79 
80 
81 template <class T>
83  : m_ms2MedianFilter(10), m_ms2MeanFilter(15), m_ms1MeanFilter(1)
84 {
85  msp_msrunReader = msrun_reader_sp;
86  mcsp_msrunId = msp_msrunReader.get()->getMsRunId();
88  msrun_reader_sp.get()->readSpectrumCollection(handler);
89 
90 
91  std::sort(m_ms1RetentionTimeVector.begin(),
93  [](const RtPoint &a, const RtPoint &b) {
94  return (a.retentionTime < b.retentionTime);
95  });
96 }
97 
98 template <class T>
100  : m_ms2MedianFilter(other.m_ms2MedianFilter),
101  m_ms2MeanFilter(other.m_ms2MeanFilter),
102  m_ms1MeanFilter(other.m_ms1MeanFilter)
103 {
105  mcsp_msrunId = other.mcsp_msrunId;
108 
109  m_seamarks = other.m_seamarks;
111 
113 
115 }
116 
117 template <class T>
119 {
120 }
121 
122 template <class T>
123 void
125  const FilterMorphoMedian &ms2MedianFilter)
126 {
127  m_ms2MedianFilter = ms2MedianFilter;
128 }
129 
130 template <class T>
131 void
133 {
134  m_ms2MeanFilter = ms2MeanFilter;
135 }
136 
137 template <class T>
138 void
140 {
141  m_ms1MeanFilter = ms1MeanFilter;
142 }
143 
144 template <class T>
145 const std::vector<MsRunRetentionTimeSeamarkPoint<T>> &
147 {
148  qDebug();
149  return m_seamarks;
150 }
151 
152 template <class T>
153 const std::vector<double> &
155 {
156  return m_alignedRetentionTimeVector;
157 }
158 
159 template <class T>
160 std::size_t
162 {
163  return m_valuesCorrected;
164 }
165 template <class T>
166 const std::vector<RtPoint> &
168 {
169  return m_ms1RetentionTimeVector;
170 }
171 
172 template <class T>
173 Trace
175  const std::vector<MsRunRetentionTimeSeamarkPoint<T>> &other_seamarks) const
176 {
177  Trace common_points;
178  getCommonDeltaRt(common_points, other_seamarks);
179  return common_points;
180 }
181 
182 template <class T>
183 void
185  std::size_t ms2_spectrum_index)
186 {
187 
188  qDebug();
189  msp_msrunReader.get()->acquireDevice();
190  PeptideMs2Point ms2point;
191  ms2point.entityHash = peptide_id;
192  QualifiedMassSpectrum spectrum =
193  msp_msrunReader.get()->qualifiedMassSpectrum(ms2_spectrum_index, false);
194  ms2point.precursorIntensity = spectrum.getPrecursorIntensity();
195  ms2point.retentionTime = spectrum.getRtInSeconds();
196 
197  // addSeamark(m_hash_fn(peptide_str.toStdString()), retentionTime);
198 
199  m_allMs2Points.push_back(ms2point);
200 
201  qDebug();
202 }
203 
204 template <class T>
205 void
207 {
208 
209  qDebug();
210  if(msp_msrunReader == nullptr)
211  {
212  throw ExceptionNotPossible(
213  QObject::tr("ERROR : msp_msrunReader == nullptr"));
214  }
215  m_seamarks.clear();
216  if(m_retentionTimeReferenceMethod ==
217  ComputeRetentionTimeReference::maximum_intensity)
218  {
219 
220 
221  std::sort(m_allMs2Points.begin(),
222  m_allMs2Points.end(),
223  [](const PeptideMs2Point &a, const PeptideMs2Point &b) {
224  if(a.entityHash == b.entityHash)
225  {
226  return (a.precursorIntensity > b.precursorIntensity);
227  }
228  return (a.entityHash < b.entityHash);
229  });
230 
231  auto itend =
232  std::unique(m_allMs2Points.begin(),
233  m_allMs2Points.end(),
234  [](const PeptideMs2Point &a, const PeptideMs2Point &b) {
235  return (a.entityHash == b.entityHash);
236  });
237 
238  auto it = m_allMs2Points.begin();
239  while(it != itend)
240  {
241  m_seamarks.push_back(
242  {it->entityHash, it->retentionTime, it->precursorIntensity});
243  it++;
244  }
245  }
246  msp_msrunReader = nullptr;
247  m_allMs2Points.clear();
248 
249  std::sort(m_seamarks.begin(),
250  m_seamarks.end(),
253  return (a.entityHash < b.entityHash);
254  });
255  qDebug();
256 }
257 
258 template <class T>
259 void
261  Trace &delta_rt,
262  const std::vector<MsRunRetentionTimeSeamarkPoint<T>> &other_seamarks) const
263 {
264 
265  qDebug();
266  auto it = other_seamarks.begin();
267 
268  for(const MsRunRetentionTimeSeamarkPoint<T> &seamark : m_seamarks)
269  {
270  while((it != other_seamarks.end()) &&
271  (it->entityHash < seamark.entityHash))
272  {
273  it++;
274  }
275  if(it == other_seamarks.end())
276  break;
277  if(it->entityHash == seamark.entityHash)
278  {
279  delta_rt.push_back(DataPoint(
280  seamark.retentionTime, seamark.retentionTime - it->retentionTime));
281  }
282  }
283 
284  qDebug();
285  if((m_ms2MedianFilter.getHalfWindowSize() * 2 + 1) >= delta_rt.size())
286  {
287  throw ExceptionNotPossible(
288  QObject::tr("ERROR : MS2 alignment of MS run '%1' (%2)' not possible : "
289  "\ntoo few MS2 points (%3) in common")
290  .arg(msp_msrunReader.get()->getMsRunId().get()->getXmlId())
291  .arg(msp_msrunReader.get()->getMsRunId().get()->getFileName())
292  .arg(delta_rt.size()));
293  }
294 
295  qDebug();
296  if((m_ms2MeanFilter.getHalfWindowSize() * 2 + 1) >= delta_rt.size())
297  {
298  throw ExceptionNotPossible(
299  QObject::tr("ERROR : MS2 alignment of MS run '%1' (%2)' not possible : "
300  "\ntoo few MS2 points (%3) in common")
301  .arg(msp_msrunReader.get()->getMsRunId().get()->getXmlId())
302  .arg(msp_msrunReader.get()->getMsRunId().get()->getFileName())
303  .arg(delta_rt.size()));
304  }
305  delta_rt.sortX();
306 
307  // there can be multiple entities (peptides) at one retention time
308  // in this case, avoid retention time redundancy by applying unique on trace :
309  delta_rt.unique();
310 
311  qDebug();
312 }
313 
314 
315 template <class T>
316 double
318 {
319  if(isAligned())
320  {
321  return m_alignedRetentionTimeVector.front();
322  }
323  return m_ms1RetentionTimeVector.front().retentionTime;
324 }
325 template <class T>
326 double
328 {
329  if(isAligned())
330  {
331  return m_alignedRetentionTimeVector.back();
332  }
333  return m_ms1RetentionTimeVector.back().retentionTime;
334 }
335 
336 
337 template <class T>
338 double
340  double original_retention_time) const
341 {
342  if(m_alignedRetentionTimeVector.size() < 3)
343  {
344  throw ExceptionNotPossible(
345  QObject::tr("ERROR : too few aligned points to compute aligned "
346  "retention time (%1)")
347  .arg(m_ms1RetentionTimeVector.size()));
348  }
349  if(m_alignedRetentionTimeVector.size() != m_ms1RetentionTimeVector.size())
350  {
351  throw ExceptionNotPossible(
352  QObject::tr("ERROR : m_alignedRetentionTimeVector.size() %1 != %2 "
353  "m_ms1RetentionTimeVector.size()")
354  .arg(m_alignedRetentionTimeVector.size())
355  .arg(m_ms1RetentionTimeVector.size()));
356  }
357  auto it_plus =
358  std::find_if(m_ms1RetentionTimeVector.begin(),
359  m_ms1RetentionTimeVector.end(),
360  [original_retention_time](const RtPoint &rt_point) {
361  return original_retention_time < rt_point.retentionTime;
362  });
363  double rt1_a, rt2_a, rt1_b, rt2_b;
364  if(it_plus == m_ms1RetentionTimeVector.end())
365  {
366  it_plus--;
367  }
368  if(it_plus == m_ms1RetentionTimeVector.begin())
369  {
370  it_plus++;
371  }
372  auto it_minus = it_plus - 1;
373 
374  rt1_a = it_minus->retentionTime;
375  rt2_a = it_plus->retentionTime;
376 
377  double ratio = (original_retention_time - rt1_a) / (rt2_a - rt1_a);
378 
379  auto itref = m_alignedRetentionTimeVector.begin() +
380  std::distance(m_ms1RetentionTimeVector.begin(), it_minus);
381 
382  rt1_b = *itref;
383  itref++;
384  rt2_b = *itref;
385 
386  return (((rt2_b - rt1_b) * ratio) + rt1_b);
387 }
388 
389 template <class T>
390 const std::vector<MsRunRetentionTimeSeamarkPoint<T>>
392 {
393  std::vector<MsRunRetentionTimeSeamarkPoint<T>> other_seamarks = m_seamarks;
394  for(auto &seamark : other_seamarks)
395  {
396  seamark.retentionTime =
397  translateOriginal2AlignedRetentionTime(seamark.retentionTime);
398  }
399  return other_seamarks;
400 }
401 
402 template <class T>
403 bool
405 {
406  return (m_alignedRetentionTimeVector.size() > 0);
407 }
408 
409 template <class T>
410 Trace
412  const MsRunRetentionTime<T> &msrun_retention_time_reference)
413 {
414  std::vector<MsRunRetentionTimeSeamarkPoint<T>> other_seamarks;
415  if(msrun_retention_time_reference.isAligned())
416  {
417  other_seamarks = msrun_retention_time_reference.getSeamarksReferences();
418  }
419  else
420  {
421  other_seamarks = msrun_retention_time_reference.getSeamarks();
422  }
423  qDebug();
424  if((m_ms1MeanFilter.getHalfWindowSize() * 2 + 1) >=
425  m_ms1RetentionTimeVector.size())
426  {
427  throw ExceptionNotPossible(
428  QObject::tr("ERROR : MS1 alignment of MS run '%1' (%2)' not possible : "
429  "\ntoo few MS1 points (%3)")
430  .arg(msp_msrunReader.get()->getMsRunId().get()->getXmlId())
431  .arg(msp_msrunReader.get()->getMsRunId().get()->getFileName())
432  .arg(m_ms1RetentionTimeVector.size()));
433  }
434 
435  qDebug() << m_seamarks[0].entityHash << " " << m_seamarks[0].retentionTime
436  << " " << other_seamarks[0].entityHash
437  << other_seamarks[0].retentionTime << " ";
438  // both seamarks has to be ordered
439  Trace common_points;
440  getCommonDeltaRt(common_points, other_seamarks);
441 
442  // writeTrace("lib_ms2_delta_rt.ods", common_points);
443 
444  qDebug() << common_points.front().x << " " << common_points.front().y;
445  m_ms2MedianFilter.filter(common_points);
446  // writeTrace("lib_ms2_delta_rt_median.ods", common_points);
447  m_ms2MeanFilter.filter(common_points);
448  // writeTrace("lib_ms2_delta_rt_mean.ods", common_points);
449  // convert common delta rt to real retention times (for convenience)
450  qDebug() << common_points.front().x << " " << common_points.front().y;
451 
452 
453  // add a first point to ensure coherence:
454  DataPoint first_point;
455  first_point.x = m_ms1RetentionTimeVector.front().retentionTime - (double)1;
456  if(first_point.x < 0)
457  {
458  first_point.x = 0;
459  }
460  first_point.y =
461  m_ms1RetentionTimeVector.front().retentionTime -
462  msrun_retention_time_reference.getFrontRetentionTimeReference();
463 
464  common_points.push_back(first_point);
465  // add a last point to ensure coherence:
466  DataPoint last_point;
467  last_point.x = m_ms1RetentionTimeVector.back().retentionTime + 1;
468  last_point.y = m_ms1RetentionTimeVector.back().retentionTime -
469  msrun_retention_time_reference.getBackRetentionTimeReference();
470  common_points.push_back(last_point);
471  common_points.sortX();
472 
473  // now, it is possible for each time range to give a new MS1 time using a
474  // linear regression on MS2 corrected times
475  m_alignedRetentionTimeVector.clear();
476 
477  qDebug() << common_points.front().x << " " << common_points.front().y;
478 
479  Trace ms1_aligned_points;
480 
481  linearRegressionMs2toMs1(ms1_aligned_points, common_points);
482 
483  // writeTrace("lib_ms1_map_rt.ods", ms1_aligned_points);
484  qDebug();
485  // smoothing on MS1 points
486  m_ms1MeanFilter.filter(ms1_aligned_points);
487 
488  // writeTrace("lib_ms1_map_rt_mean.ods", ms1_aligned_points);
489  // final aligned retentionTime vector
490 
491  for(DataPoint &data_point : ms1_aligned_points)
492  {
493  data_point.y = (data_point.x - data_point.y);
494  }
495 
496  qDebug();
497  // Here, the correction parameter is the slope of old rt points curve
498  // (divided by 4 to get a finer correction).
499  double correction_parameter =
500  (m_ms1RetentionTimeVector.back().retentionTime -
501  m_ms1RetentionTimeVector.front().retentionTime) /
502  (ms1_aligned_points.size());
503  // set_correction_parameter(correction_parameter / 4);
504  correction_parameter = correction_parameter / (double)4;
505  correctNewTimeValues(ms1_aligned_points, correction_parameter);
506 
507  m_alignedRetentionTimeVector = ms1_aligned_points.yValues();
508 
509  qDebug();
510  return ms1_aligned_points;
511 }
512 
513 
514 template <class T>
515 void
517  const Trace &common_points)
518 {
519 
520  // first slope :
521  std::vector<DataPoint>::const_iterator itms2 = common_points.begin();
522  std::vector<DataPoint>::const_iterator itms2next = itms2 + 1;
523  if(itms2next == common_points.end())
524  {
525  // error
526  throw ExceptionNotPossible(
527  QObject::tr("ERROR : MS1 alignment of MS run '%1' (%2)' not possible : "
528  "\ntoo few common points (%3)")
529  .arg(msp_msrunReader.get()->getMsRunId().get()->getXmlId())
530  .arg(msp_msrunReader.get()->getMsRunId().get()->getFileName())
531  .arg(common_points.size()));
532  }
533  qDebug() << "() itms2->x=" << itms2->x << " itms2->y=" << itms2->y;
534 
535  for(RtPoint &original_rt_point : m_ms1RetentionTimeVector)
536  {
537  DataPoint ms1_point;
538  ms1_point.x = original_rt_point.retentionTime;
539 
540  while(ms1_point.x > itms2next->x)
541  {
542  itms2++;
543  itms2next++;
544  }
545 
546  double ratio = (itms2next->x - itms2->x);
547  if(ratio != 0)
548  {
549  ratio = (ms1_point.x - itms2->x) / ratio;
550  }
551  else
552  {
553  // avoid division by zero
554  ratio = 1;
555  }
556  // qDebug() << __FILE__ << "@" << __LINE__ << __FUNCTION__ << "() " <<
557  // ratio;
558 
559  ms1_point.y = itms2->y + ((itms2next->y - itms2->y) * ratio);
560 
561  // qDebug() << __FILE__ << "@" << __LINE__ << __FUNCTION__ << "() "
562  // << ms1_point.y;
563  ms1_aligned_points.push_back(ms1_point);
564  }
565 }
566 
567 template <class T>
568 void
570  double correction_parameter)
571 {
572 
573  m_valuesCorrected = 0;
574  auto new_it(ms1_aligned_points.begin());
575  auto new_nextit(ms1_aligned_points.begin());
576  new_nextit++;
577  for(; new_nextit != ms1_aligned_points.end(); ++new_nextit, ++new_it)
578  {
579  if(new_nextit->y < new_it->y)
580  {
581  ++m_valuesCorrected;
582  new_nextit->y = new_it->y + correction_parameter;
583  }
584  }
585 }
586 
587 
588 template <typename T>
591 {
592  return msp_msrunReader;
593 }
pappso::MsRunRetentionTime::PeptideMs2Point::precursorIntensity
double precursorIntensity
Definition: msrunretentiontime.h:73
pappso::MsRunRetentionTime::msp_msrunReader
pappso::MsRunReaderSPtr msp_msrunReader
Definition: msrunretentiontime.h:143
pappso::QualifiedMassSpectrum::getMsLevel
uint getMsLevel() const
Get the mass spectrum level.
Definition: qualifiedmassspectrum.cpp:205
pappso::MsRunRetentionTime::getAlignedRetentionTimeVector
const std::vector< double > & getAlignedRetentionTimeVector() const
Definition: msrunretentiontime.cpp:154
RetentionTimeReader::RetentionTimeReader
RetentionTimeReader(std::vector< RtPoint > &rt_points)
Definition: msrunretentiontime.cpp:58
pappso::MsRunRetentionTime::PeptideMs2Point
Definition: msrunretentiontime.h:71
pappso::MsRunRetentionTime::PeptideMs2Point::retentionTime
double retentionTime
Definition: msrunretentiontime.h:72
pappso::MsRunRetentionTime::setMs2MedianFilter
void setMs2MedianFilter(const FilterMorphoMedian &ms2MedianFilter)
Definition: msrunretentiontime.cpp:124
pappso::FilterMorphoMedian
median filter apply median of y values inside the window
Definition: filtermorpho.h:196
pappso::MsRunRetentionTime::m_valuesCorrected
std::size_t m_valuesCorrected
Definition: msrunretentiontime.h:149
RetentionTimeReader::m_rtPoints
std::vector< RtPoint > & m_rtPoints
Definition: msrunretentiontime.cpp:74
pappso::DataPoint::y
pappso_double y
Definition: datapoint.h:23
pappso::MsRunRetentionTime::m_allMs2Points
std::vector< PeptideMs2Point > m_allMs2Points
Definition: msrunretentiontime.h:151
pappso
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition: aa.cpp:39
pappso::MsRunRetentionTime::getMs1RetentionTimeVector
const std::vector< RtPoint > & getMs1RetentionTimeVector() const
Definition: msrunretentiontime.cpp:167
pappso::QualifiedMassSpectrum::getPrecursorIntensity
pappso_double getPrecursorIntensity(bool *ok=nullptr) const
Get the intensity of the precursor ion.
Definition: qualifiedmassspectrum.cpp:399
pappso::MsRunReaderSPtr
std::shared_ptr< MsRunReader > MsRunReaderSPtr
Definition: msrunreader.h:172
pappso::MsRunRetentionTime::getSeamarksReferences
const std::vector< MsRunRetentionTimeSeamarkPoint< T > > getSeamarksReferences() const
Definition: msrunretentiontime.cpp:391
pappso::PeptideIonNter::a
@ a
pappso::MsRunRetentionTime::getCommonDeltaRt
Trace getCommonDeltaRt(const std::vector< MsRunRetentionTimeSeamarkPoint< T >> &other_seamarks) const
Definition: msrunretentiontime.cpp:174
pappso::DataPoint
Definition: datapoint.h:21
pappso::MsRunRetentionTime::computePeptideRetentionTimes
void computePeptideRetentionTimes()
convert Peptide seamarks into PeptideMs2Point this is required before computing alignment
Definition: msrunretentiontime.cpp:206
pappso::MsRunRetentionTime::setMs2MeanFilter
void setMs2MeanFilter(const FilterMorphoMean &ms2MeanFilter)
Definition: msrunretentiontime.cpp:132
pappso::ExceptionNotPossible
Definition: exceptionnotpossible.h:53
pappso::MsRunRetentionTime::m_ms1RetentionTimeVector
std::vector< RtPoint > m_ms1RetentionTimeVector
Definition: msrunretentiontime.h:145
pappso::MsRunRetentionTime::setMs1MeanFilter
void setMs1MeanFilter(const FilterMorphoMean &ms1MeanFilter)
Definition: msrunretentiontime.cpp:139
pappso::Trace::filter
virtual Trace & filter(const FilterInterface &filter) final
apply a filter on this trace
Definition: trace.cpp:835
pappso::MsRunRetentionTime::getNumberOfCorrectedValues
std::size_t getNumberOfCorrectedValues() const
Definition: msrunretentiontime.cpp:161
pappso::MsRunRetentionTime::getBackRetentionTimeReference
double getBackRetentionTimeReference() const
Definition: msrunretentiontime.cpp:327
RetentionTimeReader
Definition: msrunretentiontime.cpp:55
pappso::MsRunRetentionTime::getMsRunReaderSPtr
pappso::MsRunReaderSPtr getMsRunReaderSPtr() const
Definition: msrunretentiontime.cpp:590
pappso::MsRunRetentionTimeSeamarkPoint
Definition: msrunretentiontime.h:59
pappso::Trace
A simple container of DataPoint instances.
Definition: trace.h:132
pappso::QualifiedMassSpectrum
Class representing a fully specified mass spectrum.
Definition: qualifiedmassspectrum.h:103
pappso::Trace::unique
void unique()
Definition: trace.cpp:806
msrunretentiontime.h
pappso::MsRunRetentionTime
Definition: msrunretentiontime.h:68
pappso::DataPoint::x
pappso_double x
Definition: datapoint.h:22
pappso::MassSpectrumId::getSpectrumIndex
std::size_t getSpectrumIndex() const
Definition: massspectrumid.cpp:131
pappso::Trace::sortX
void sortX()
Definition: trace.cpp:790
pappso::MsRunRetentionTime::MsRunRetentionTime
MsRunRetentionTime(MsRunReaderSPtr msrun_reader_sp)
Definition: msrunretentiontime.cpp:82
pappso::RtPoint
Definition: msrunretentiontime.h:51
pappso::FilterMorphoMean
mean filter apply mean of y values inside the window : this results in a kind of smoothing
Definition: filtermorpho.h:215
pappso::MsRunRetentionTime::addPeptideAsSeamark
void addPeptideAsSeamark(const T &peptide_str, std::size_t ms2_spectrum_index)
collects all peptide evidences of a given MSrun seamarks has to be converted to peptide retention tim...
Definition: msrunretentiontime.cpp:184
pappso::QualifiedMassSpectrum::getMassSpectrumId
const MassSpectrumId & getMassSpectrumId() const
Get the MassSpectrumId.
Definition: qualifiedmassspectrum.cpp:175
pappso::MsRunRetentionTime::m_retentionTimeReferenceMethod
ComputeRetentionTimeReference m_retentionTimeReferenceMethod
Definition: msrunretentiontime.h:153
pappso::MsRunRetentionTime::isAligned
bool isAligned() const
Definition: msrunretentiontime.cpp:404
pappso::PeptideIonNter::b
@ b
pappso::MsRunRetentionTime::m_alignedRetentionTimeVector
std::vector< double > m_alignedRetentionTimeVector
Definition: msrunretentiontime.h:146
pappso::MsRunRetentionTime::mcsp_msrunId
pappso::MsRunIdCstSPtr mcsp_msrunId
Definition: msrunretentiontime.h:144
pappso::MsRunRetentionTime::PeptideMs2Point::entityHash
T entityHash
Definition: msrunretentiontime.h:74
RetentionTimeReader::~RetentionTimeReader
virtual ~RetentionTimeReader()
Definition: msrunretentiontime.cpp:60
pappso::MsRunRetentionTime::~MsRunRetentionTime
~MsRunRetentionTime()
Definition: msrunretentiontime.cpp:118
pappso::MsRunRetentionTime::m_seamarks
std::vector< MsRunRetentionTimeSeamarkPoint< T > > m_seamarks
Definition: msrunretentiontime.h:148
pappso::MsRunRetentionTime::getFrontRetentionTimeReference
double getFrontRetentionTimeReference() const
Definition: msrunretentiontime.cpp:317
RetentionTimeReader::setQualifiedMassSpectrum
virtual void setQualifiedMassSpectrum(const QualifiedMassSpectrum &spectrum) override
Definition: msrunretentiontime.cpp:62
pappso::SpectrumCollectionHandlerInterface
interface to collect spectrums from the MsRunReader class
Definition: msrunreader.h:80
RetentionTimeReader::needPeakList
virtual bool needPeakList() const override
tells if we need the peak list (if we want the binary data) for each spectrum
Definition: msrunretentiontime.cpp:71
pappso::MsRunRetentionTime::getSeamarks
const std::vector< MsRunRetentionTimeSeamarkPoint< T > > & getSeamarks() const
Definition: msrunretentiontime.cpp:146
pappso::QualifiedMassSpectrum::getRtInSeconds
pappso_double getRtInSeconds() const
Get the retention time in seconds.
Definition: qualifiedmassspectrum.cpp:221