Home  · Classes  · Annotated Classes  · Modules  · Members  · Namespaces  · Related Pages
ChromatogramExtractor.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: Hannes Roest $
32 // $Authors: Hannes Roest $
33 // --------------------------------------------------------------------------
34 
35 #ifndef OPENMS_ANALYSIS_OPENSWATH_CHROMATOGRAMEXTRACTOR_H
36 #define OPENMS_ANALYSIS_OPENSWATH_CHROMATOGRAMEXTRACTOR_H
37 
39 
43 
45 
46 namespace OpenMS
47 {
48 
67  class OPENMS_DLLAPI ChromatogramExtractor :
68  public ProgressLogger
69  {
70 
71 public:
72 
74 
88  template <typename ExperimentT>
89  void extractChromatograms(const ExperimentT& input, ExperimentT& output,
90  OpenMS::TargetedExperiment& transition_exp, double mz_extraction_window, bool ppm,
91  TransformationDescription trafo, double rt_extraction_window, String filter)
92  {
93  // invert the trafo because we want to transform nRT values to "real" RT values
94  trafo.invert();
95 
96  Size input_size = input.size();
97  if (input_size < 1)
98  {
99  return;
100  }
101 
102  int used_filter = getFilterNr_(filter);
103  populatePeptideRTMap_(transition_exp, rt_extraction_window);
104 
105  // sort the transition experiment by product mass
106  // this is essential because the algorithm assumes sorted transitions!
107  transition_exp.sortTransitionsByProductMZ();
108 
109  // prepare all the spectra (but leave them empty)
110  SpectrumSettings settings = input[0];
111  std::vector<typename ExperimentT::ChromatogramType> chromatograms;
112  prepareSpectra_(settings, chromatograms, transition_exp);
113 
114  //go through all spectra
115  startProgress(0, input_size, "Extracting chromatograms");
116  for (Size scan_idx = 0; scan_idx < input_size; ++scan_idx)
117  {
118  setProgress(scan_idx);
119 
120  if (input[scan_idx].size() == 0)
121  continue;
122 
123  Size peak_idx = 0;
124 
125  double mz;
126  double integrated_intensity = 0;
127 
128  // go through all transitions / chromatograms which are sorted by
129  // ProductMZ. We can use this to step through the spectrum and at the
130  // same time step through the transitions. We increase the peak counter
131  // until we hit the next transition and then extract the signal.
132  for (Size k = 0; k < chromatograms.size(); ++k)
133  {
134 
135  double current_rt = input[scan_idx].getRT();
136  if (outsideExtractionWindow_(transition_exp.getTransitions()[k], current_rt, trafo, rt_extraction_window))
137  {
138  continue;
139  }
140 
142  mz = transition_exp.getTransitions()[k].getProductMZ();
143 
144  if (used_filter == 1)
145  {
146  extract_value_tophat(input[scan_idx], mz, peak_idx, integrated_intensity, mz_extraction_window, ppm);
147  }
148  else if (used_filter == 2)
149  {
150  extract_value_bartlett(input[scan_idx], mz, peak_idx, integrated_intensity, mz_extraction_window, ppm);
151  }
152 
153 
154  p.setRT(current_rt);
155  p.setIntensity(integrated_intensity);
156  chromatograms[k].push_back(p);
157  }
158  }
159  endProgress();
160 
161  // add all the chromatograms to the output
162  output.setChromatograms(chromatograms);
163  }
164 
172  std::vector< OpenSwath::ChromatogramPtr >& output,
173  std::vector<ExtractionCoordinates> extraction_coordinates,
174  double mz_extraction_window, bool ppm, String filter)
175  {
177  extraction_coordinates, mz_extraction_window, ppm, filter);
178  }
179 
180 public:
181 
203  void prepare_coordinates(std::vector< OpenSwath::ChromatogramPtr > & output_chromatograms,
204  std::vector< ExtractionCoordinates > & coordinates,
205  const OpenMS::TargetedExperiment & transition_exp,
206  const double rt_extraction_window,
207  const bool ms1) const;
208 
222  template <typename TransitionExpT>
223  static void return_chromatogram(std::vector< OpenSwath::ChromatogramPtr > & chromatograms,
224  std::vector< ChromatogramExtractor::ExtractionCoordinates > & coordinates,
225  TransitionExpT& transition_exp_used,
226  SpectrumSettings settings,
227  std::vector<OpenMS::MSChromatogram > & output_chromatograms,
228  bool ms1)
229  {
230  typedef std::map<String, const typename TransitionExpT::Transition* > TransitionMapType;
231  TransitionMapType trans_map;
232  for (Size i = 0; i < transition_exp_used.getTransitions().size(); i++)
233  {
234  trans_map[transition_exp_used.getTransitions()[i].getNativeID()] = &transition_exp_used.getTransitions()[i];
235  }
236 
237  for (Size i = 0; i < chromatograms.size(); i++)
238  {
239  const OpenSwath::ChromatogramPtr & chromptr = chromatograms[i];
240  const ChromatogramExtractor::ExtractionCoordinates & coord = coordinates[i];
241 
242  // copy data
245  chrom.setNativeID(coord.id);
246 
247  // Create precursor and set
248  // 1) the target m/z
249  // 2) the isolation window (upper/lower)
250  // 3) the peptide sequence
251  Precursor prec;
252  if (ms1)
253  {
254  prec.setMZ(coord.mz);
256 
257  // extract compound / peptide id from transition and store in
258  // more-or-less default field
259  String r = extract_id_(transition_exp_used, coord.id);
260  prec.setMetaValue("peptide_sequence", r);
261  }
262  else
263  {
264  typename TransitionExpT::Transition transition = (*trans_map[coord.id]);
265 
266  prec.setMZ(transition.getPrecursorMZ());
267  if (settings.getPrecursors().size() > 0)
268  {
269  prec.setIsolationWindowLowerOffset(settings.getPrecursors()[0].getIsolationWindowLowerOffset());
270  prec.setIsolationWindowUpperOffset(settings.getPrecursors()[0].getIsolationWindowUpperOffset());
271  }
272 
273  // Create product and set its m/z
274  Product prod;
275  prod.setMZ(transition.getProductMZ());
276  chrom.setProduct(prod);
278 
279  // extract compound / peptide id from transition and store in
280  // more-or-less default field
281  if (!transition.getPeptideRef().empty())
282  {
283  String r = extract_id_(transition_exp_used, transition.getPeptideRef());
284  prec.setMetaValue("peptide_sequence", r);
285  }
286  else
287  {
288  String r = extract_id_(transition_exp_used, transition.getCompoundRef());
289  prec.setMetaValue("peptide_sequence", r);
290  }
291  }
292  chrom.setPrecursor(prec);
293 
294  // Set the rest of the meta-data
296  chrom.setAcquisitionInfo(settings.getAcquisitionInfo());
297  chrom.setSourceFile(settings.getSourceFile());
298 
299  for (Size j = 0; j < settings.getDataProcessing().size(); ++j)
300  {
301  settings.getDataProcessing()[j]->setMetaValue("performed_on_spectra", "true");
302  chrom.getDataProcessing().push_back(settings.getDataProcessing()[j]);
303  }
304  output_chromatograms.push_back(chrom);
305  }
306  }
307 
309  template <typename SpectrumT>
310  void extract_value_tophat(const SpectrumT& input, const double& mz, Size& peak_idx,
311  double& integrated_intensity, const double& extract_window, const bool ppm)
312  {
313  integrated_intensity = 0;
314  if (input.size() == 0)
315  {
316  return;
317  }
318 
319  // calculate extraction window
320  double left, right;
321  if (ppm)
322  {
323  left = mz - mz * extract_window / 2.0 * 1.0e-6;
324  right = mz + mz * extract_window / 2.0 * 1.0e-6;
325  }
326  else
327  {
328  left = mz - extract_window / 2.0;
329  right = mz + extract_window / 2.0;
330  }
331 
332  Size walker;
333 
334  // advance the peak_idx until we hit the m/z value of the next transition
335  while (peak_idx < input.size() && input[peak_idx].getMZ() < mz)
336  {
337  peak_idx++;
338  }
339 
340  // walk right and left and add to our intensity
341  walker = peak_idx;
342  // if we moved past the end of the spectrum, we need to try the last peak
343  // of the spectrum (it could still be within the window)
344  if (peak_idx >= input.size())
345  {
346  walker = input.size() - 1;
347  }
348 
349  // add the current peak if it is between right and left
350  if (input[walker].getMZ() > left && input[walker].getMZ() < right)
351  {
352  integrated_intensity += input[walker].getIntensity();
353  }
354 
355  // (i) Walk to the left one step and then keep walking left until we go
356  // outside the window. Note for the first step to the left we have to
357  // check for the walker becoming zero.
358  walker = peak_idx;
359  if (walker > 0)
360  {
361  walker--;
362  // special case: walker is now zero
363  if (walker == 0 && input[walker].getMZ() > left && input[walker].getMZ() < right)
364  {
365  integrated_intensity += input[walker].getIntensity();
366  }
367  }
368  while (walker > 0 && input[walker].getMZ() > left && input[walker].getMZ() < right)
369  {
370  integrated_intensity += input[walker].getIntensity(); walker--;
371  }
372 
373  // (ii) Walk to the right one step and then keep walking right until we
374  // are outside the window
375  walker = peak_idx;
376  if (walker < input.size() )
377  {
378  walker++;
379  }
380  while (walker < input.size() && input[walker].getMZ() > left && input[walker].getMZ() < right)
381  {
382  integrated_intensity += input[walker].getIntensity(); walker++;
383  }
384  }
385 
387  template <typename SpectrumT>
388  void extract_value_bartlett(const SpectrumT& input, const double& mz, Size& peak_idx,
389  double& integrated_intensity, const double& extract_window, const bool ppm)
390  {
391  integrated_intensity = 0;
392  if (input.size() == 0)
393  {
394  return;
395  }
396 
397  // calculate extraction window
398  double left, right, half_window_size, weight;
399  if (ppm)
400  {
401  half_window_size = mz * extract_window / 2.0 * 1.0e-6;
402  left = mz - mz * extract_window / 2.0 * 1.0e-6;
403  right = mz + mz * extract_window / 2.0 * 1.0e-6;
404  }
405  else
406  {
407  half_window_size = extract_window / 2.0;
408  left = mz - extract_window / 2.0;
409  right = mz + extract_window / 2.0;
410  }
411 
412  Size walker;
413 
414  // advance the peak_idx until we hit the m/z value of the next transition
415  while (peak_idx < input.size() && input[peak_idx].getMZ() < mz)
416  {
417  peak_idx++;
418  }
419 
420  // walk right and left and add to our intensity
421  walker = peak_idx;
422  // if we moved past the end of the spectrum, we need to try the last peak
423  // of the spectrum (it could still be within the window)
424  if (peak_idx >= input.size())
425  {
426  walker = input.size() - 1;
427  }
428 
429  // add the current peak if it is between right and left
430  if (input[walker].getMZ() > left && input[walker].getMZ() < right)
431  {
432  weight = 1 - fabs(input[walker].getMZ() - mz) / half_window_size;
433  integrated_intensity += input[walker].getIntensity() * weight;
434  }
435 
436  // (i) Walk to the left one step and then keep walking left until we go
437  // outside the window. Note for the first step to the left we have to
438  // check for the walker becoming zero.
439  walker = peak_idx;
440  if (walker > 0)
441  {
442  walker--;
443  // special case: walker is now zero
444  if (walker == 0 && input[walker].getMZ() > left && input[walker].getMZ() < right)
445  {
446  integrated_intensity += input[walker].getIntensity();
447  }
448  }
449  while (walker > 0 && input[walker].getMZ() > left && input[walker].getMZ() < right)
450  {
451  weight = 1 - fabs(input[walker].getMZ() - mz) / half_window_size;
452  integrated_intensity += input[walker].getIntensity() * weight; walker--;
453  }
454 
455  // (ii) Walk to the right one step and then keep walking right until we
456  // are outside the window
457  walker = peak_idx;
458  if (walker < input.size() )
459  {
460  walker++;
461  }
462  while (walker<input.size() && input[walker].getMZ()> left && input[walker].getMZ() < right)
463  {
464  weight = 1 - fabs(input[walker].getMZ() - mz) / half_window_size;
465  integrated_intensity += input[walker].getIntensity() * weight; walker++;
466  }
467  }
468 
469 private:
470 
478  template <typename TransitionExpT>
479  static String extract_id_(TransitionExpT& transition_exp_used, String id);
480 
495  template <class SpectrumSettingsT, class ChromatogramT>
496  void prepareSpectra_(SpectrumSettingsT& settings, std::vector<ChromatogramT>& chromatograms, OpenMS::TargetedExperiment& transition_exp)
497  {
498  // first prepare all the spectra (but leave them empty)
499  for (Size i = 0; i < transition_exp.getTransitions().size(); i++)
500  {
501  const ReactionMonitoringTransition* transition = &transition_exp.getTransitions()[i];
502 
503  // 1) and 2) Extract precursor m/z and isolation window
504  ChromatogramT chrom;
505  Precursor prec;
506  prec.setMZ(transition->getPrecursorMZ());
507  if (settings.getPrecursors().size() > 0)
508  {
509  prec.setIsolationWindowLowerOffset(settings.getPrecursors()[0].getIsolationWindowLowerOffset());
510  prec.setIsolationWindowUpperOffset(settings.getPrecursors()[0].getIsolationWindowUpperOffset());
511  }
512 
513  // 3) set precursor peptide sequence / compound id in more-or-less default field
514  String pepref = transition->getPeptideRef();
515  for (Size pep_idx = 0; pep_idx < transition_exp.getPeptides().size(); pep_idx++)
516  {
517  const OpenMS::TargetedExperiment::Peptide* pep = &transition_exp.getPeptides()[pep_idx];
518  if (pep->id == pepref)
519  {
520  prec.setMetaValue("peptide_sequence", pep->sequence);
521  break;
522  }
523  }
524  String compref = transition->getCompoundRef();
525  for (Size comp_idx = 0; comp_idx < transition_exp.getCompounds().size(); comp_idx++)
526  {
527  const OpenMS::TargetedExperiment::Compound* comp = &transition_exp.getCompounds()[comp_idx];
528  if (comp->id == compref)
529  {
530  prec.setMetaValue("peptide_sequence", String(comp->id) );
531  break;
532  }
533  }
534 
535  // add precursor to spectrum
536  chrom.setPrecursor(prec);
537 
538  // 4) Create product and set its m/z
539  Product prod;
540  prod.setMZ(transition->getProductMZ());
541  chrom.setProduct(prod);
542 
543  // 5) Set the rest of the meta-data
544  chrom.setInstrumentSettings(settings.getInstrumentSettings());
545  chrom.setAcquisitionInfo(settings.getAcquisitionInfo());
546  chrom.setSourceFile(settings.getSourceFile());
547 
548  for (Size j = 0; j < settings.getDataProcessing().size(); ++j)
549  {
550  settings.getDataProcessing()[j]->setMetaValue("performed_on_spectra", "true");
551  chrom.getDataProcessing().push_back(settings.getDataProcessing()[j]);
552  }
553 
554  // Set the id of the chromatogram, using the id of the transition (this gives directly the mapping of the two)
555  chrom.setNativeID(transition->getNativeID());
557  chromatograms.push_back(chrom);
558  }
559 
560  }
561 
563  bool outsideExtractionWindow_(const ReactionMonitoringTransition& transition, double current_rt,
564  const TransformationDescription& trafo, double rt_extraction_window);
565 
567  int getFilterNr_(String filter);
568 
570  void populatePeptideRTMap_(OpenMS::TargetedExperiment& transition_exp, double rt_extraction_window);
571 
572  std::map<OpenMS::String, double> PeptideRTMap_;
573 
574  };
575 
576  // Specialization for template (LightTargetedExperiment)
577  template<>
578  inline String ChromatogramExtractor::extract_id_<OpenSwath::LightTargetedExperiment>(OpenSwath::LightTargetedExperiment& transition_exp_used, String id)
579  {
580  OpenSwath::LightCompound comp = transition_exp_used.getCompoundByRef(id);
581  if (!comp.sequence.empty())
582  {
583  return comp.sequence;
584  }
585  else
586  {
587  return comp.compound_name;
588  }
589  }
590 
591 
592  // Specialization for template (TargetedExperiment)
593  template<>
594  inline String ChromatogramExtractor::extract_id_<OpenMS::TargetedExperiment>(OpenMS::TargetedExperiment& transition_exp_used, String id)
595  {
596  if (transition_exp_used.hasPeptide(id))
597  {
598  TargetedExperiment::Peptide p = transition_exp_used.getPeptideByRef(id);
599  return p.sequence;
600  }
601  else if (transition_exp_used.hasCompound(id))
602  {
603  TargetedExperiment::Compound c = transition_exp_used.getCompoundByRef(id);
604  return c.id;
605  }
606  else
607  {
608  return "";
609  }
610  }
611 }
612 
613 #endif // OPENMS_ANALYSIS_OPENSWATH_CHROMATOGRAMEXTRACTOR_H
const double k
std::map< OpenMS::String, double > PeptideRTMap_
Definition: ChromatogramExtractor.h:572
void setMetaValue(const String &name, const DataValue &value)
Sets the DataValue corresponding to a name.
void extract_value_tophat(const SpectrumT &input, const double &mz, Size &peak_idx, double &integrated_intensity, const double &extract_window, const bool ppm)
Definition: ChromatogramExtractor.h:310
A more convenient string class.
Definition: String.h:57
Precursor meta information.
Definition: Precursor.h:58
The ChromatogramExtractorAlgorithm extracts chromatograms from a MS data.
Definition: ChromatogramExtractorAlgorithm.h:59
Product meta information.
Definition: Product.h:49
boost::shared_ptr< ISpectrumAccess > SpectrumAccessPtr
Definition: openswathalgo/include/OpenMS/ANALYSIS/OPENSWATH/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:90
The representation of a chromatogram.
Definition: MSChromatogram.h:55
void setChromatogramType(ChromatogramType type)
sets the chromatogram type
void setProduct(const Product &product)
sets the products
void extractChromatograms(const ExperimentT &input, ExperimentT &output, OpenMS::TargetedExperiment &transition_exp, double mz_extraction_window, bool ppm, TransformationDescription trafo, double rt_extraction_window, String filter)
Extract chromatograms defined by the TargetedExperiment from the input map and write them to the outp...
Definition: ChromatogramExtractor.h:89
Peak2D PeakType
Definition: MassTrace.h:48
const InstrumentSettings & getInstrumentSettings() const
returns a const reference to the instrument settings of the current spectrum
const String & getCompoundRef() const
Representation of 1D spectrum settings.
Definition: SpectrumSettings.h:64
void setMZ(double mz)
sets the target m/z
void setSourceFile(const SourceFile &source_file)
sets the source file
const double c
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:47
Definition: ChromatogramExtractorAlgorithm.h:65
void setMZ(CoordinateType mz)
Mutable access to m/z.
Definition: Peak1D.h:120
Definition: ChromatogramSettings.h:72
const SourceFile & getSourceFile() const
returns a const reference to the source file
void sortTransitionsByProductMZ()
Lexicographically sorts the transitions by their product m/z.
void setInstrumentSettings(const InstrumentSettings &instrument_settings)
sets the instrument settings of the current spectrum
ChromatogramExtractorAlgorithm::ExtractionCoordinates ExtractionCoordinates
Definition: ChromatogramExtractor.h:73
void setIsolationWindowLowerOffset(double bound)
sets the lower offset from the target m/z
void extractChromatograms(const OpenSwath::SpectrumAccessPtr input, std::vector< OpenSwath::ChromatogramPtr > &output, std::vector< ExtractionCoordinates > extraction_coordinates, double mz_extraction_window, bool ppm, String filter)
Extract chromatograms at the m/z and RT defined by the ExtractionCoordinates.
const AcquisitionInfo & getAcquisitionInfo() const
returns a const reference to the acquisition info
String id
Definition: TargetedExperimentHelper.h:397
std::vector< DataProcessingPtr > & getDataProcessing()
returns a mutable reference to the description of the applied processing
void extractChromatograms(const OpenSwath::SpectrumAccessPtr input, std::vector< OpenSwath::ChromatogramPtr > &output, std::vector< ExtractionCoordinates > extraction_coordinates, double mz_extraction_window, bool ppm, String filter)
Extract chromatograms at the m/z and RT defined by the ExtractionCoordinates.
Definition: ChromatogramExtractor.h:171
const std::vector< ReactionMonitoringTransition > & getTransitions() const
returns the transition list
double mz
m/z value around which should be extracted
Definition: ChromatogramExtractorAlgorithm.h:67
void setNativeID(const String &native_id)
sets the native identifier for the spectrum, used by the acquisition software.
boost::shared_ptr< Chromatogram > ChromatogramPtr
Definition: openswathalgo/include/OpenMS/ANALYSIS/OPENSWATH/OPENSWATHALGO/DATAACCESS/DataStructures.h:156
void setIsolationWindowUpperOffset(double bound)
sets the upper offset from the target m/z
void setAcquisitionInfo(const AcquisitionInfo &acquisition_info)
sets the acquisition info
Definition: TransitionExperiment.h:150
std::string sequence
Definition: TransitionExperiment.h:160
Definition: TargetedExperimentHelper.h:181
std::vector< DataProcessingPtr > & getDataProcessing()
returns a mutable reference to the description of the applied processing
The ChromatogramExtractor extracts chromatograms from a spectra file.
Definition: ChromatogramExtractor.h:67
double getPrecursorMZ() const
get the precursor mz (Q1 value)
const std::vector< Precursor > & getPrecursors() const
returns a const reference to the precursors
const String & getPeptideRef() const
String sequence
Definition: TargetedExperimentHelper.h:400
void prepareSpectra_(SpectrumSettingsT &settings, std::vector< ChromatogramT > &chromatograms, OpenMS::TargetedExperiment &transition_exp)
This populates the chromatograms vector with empty chromatograms (but sets their meta-information) ...
Definition: ChromatogramExtractor.h:496
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:128
const std::vector< Compound > & getCompounds() const
Base class for all classes that want to report their progress.
Definition: ProgressLogger.h:55
A description of a targeted experiment containing precursor and production ions.
Definition: TargetedExperiment.h:62
String id
Definition: TargetedExperimentHelper.h:254
Generic description of a coordinate transformation.
Definition: TransformationDescription.h:61
void extract_value_bartlett(const SpectrumT &input, const double &mz, Size &peak_idx, double &integrated_intensity, const double &extract_window, const bool ppm)
Definition: ChromatogramExtractor.h:388
const std::vector< Peptide > & getPeptides() const
static void convertToOpenMSChromatogram(const OpenSwath::ChromatogramPtr cptr, OpenMS::MSChromatogram &chromatogram)
Convert a ChromatogramPtr to an OpenMS Chromatogram.
std::string compound_name
Definition: TransitionExperiment.h:168
static void return_chromatogram(std::vector< OpenSwath::ChromatogramPtr > &chromatograms, std::vector< ChromatogramExtractor::ExtractionCoordinates > &coordinates, TransitionExpT &transition_exp_used, SpectrumSettings settings, std::vector< OpenMS::MSChromatogram > &output_chromatograms, bool ms1)
This converts the ChromatogramPtr to MSChromatogram and adds meta-information.
Definition: ChromatogramExtractor.h:223
const String & getNativeID() const
void setPrecursor(const Precursor &precursor)
sets the precursors
Definition: TransitionExperiment.h:195
std::string id
identifier
Definition: ChromatogramExtractorAlgorithm.h:71
void invert()
Computes an (approximate) inverse of the transformation.
Definition: TargetedExperimentHelper.h:266
This class stores a SRM/MRM transition.
Definition: ReactionMonitoringTransition.h:56

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