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 #pragma once
36 
38 
42 
44 
45 namespace OpenMS
46 {
47 
66  class OPENMS_DLLAPI ChromatogramExtractor :
67  public ProgressLogger
68  {
69 
70 public:
71 
73 
93  template <typename ExperimentT>
94  void extractChromatograms(const ExperimentT& input, ExperimentT& output,
95  OpenMS::TargetedExperiment& transition_exp, double mz_extraction_window, bool ppm,
96  TransformationDescription trafo, double rt_extraction_window, const String& filter)
97  {
98  // invert the trafo because we want to transform nRT values to "real" RT values
99  trafo.invert();
100 
101  Size input_size = input.size();
102  if (input_size < 1)
103  {
104  return;
105  }
106 
107  int used_filter = getFilterNr_(filter);
108  populatePeptideRTMap_(transition_exp, rt_extraction_window);
109 
110  // sort the transition experiment by product mass
111  // this is essential because the algorithm assumes sorted transitions!
112  transition_exp.sortTransitionsByProductMZ();
113 
114  // prepare all the spectra (but leave them empty)
115  SpectrumSettings settings = input[0];
116  std::vector<typename ExperimentT::ChromatogramType> chromatograms;
117  prepareSpectra_(settings, chromatograms, transition_exp);
118 
119  //go through all spectra
120  startProgress(0, input_size, "Extracting chromatograms");
121  for (Size scan_idx = 0; scan_idx < input_size; ++scan_idx)
122  {
123  setProgress(scan_idx);
124 
125  if (input[scan_idx].size() == 0)
126  continue;
127 
128  Size peak_idx = 0;
129 
130  double mz;
131  double integrated_intensity = 0;
132 
133  // go through all transitions / chromatograms which are sorted by
134  // ProductMZ. We can use this to step through the spectrum and at the
135  // same time step through the transitions. We increase the peak counter
136  // until we hit the next transition and then extract the signal.
137  for (Size k = 0; k < chromatograms.size(); ++k)
138  {
139 
140  double current_rt = input[scan_idx].getRT();
141  if (outsideExtractionWindow_(transition_exp.getTransitions()[k], current_rt, trafo, rt_extraction_window))
142  {
143  continue;
144  }
145 
147  mz = transition_exp.getTransitions()[k].getProductMZ();
148 
149  if (used_filter == 1)
150  {
151  extract_value_tophat(input[scan_idx], mz, peak_idx, integrated_intensity, mz_extraction_window, ppm);
152  }
153  else if (used_filter == 2)
154  {
155  extract_value_bartlett(input[scan_idx], mz, peak_idx, integrated_intensity, mz_extraction_window, ppm);
156  }
157 
158 
159  p.setRT(current_rt);
160  p.setIntensity(integrated_intensity);
161  chromatograms[k].push_back(p);
162  }
163  }
164  endProgress();
165 
166  // add all the chromatograms to the output
167  output.setChromatograms(chromatograms);
168  }
169 
188  std::vector< OpenSwath::ChromatogramPtr >& output,
189  const std::vector<ExtractionCoordinates>& extraction_coordinates,
190  double mz_extraction_window, bool ppm, const String& filter)
191  {
193  extraction_coordinates, mz_extraction_window, ppm, -1, filter);
194  }
195 
215  std::vector< OpenSwath::ChromatogramPtr >& output,
216  const std::vector<ExtractionCoordinates>& extraction_coordinates,
217  double mz_extraction_window, bool ppm, double im_extraction_window, const String& filter)
218  {
220  extraction_coordinates, mz_extraction_window, ppm, im_extraction_window, filter);
221  }
222 
223 public:
224 
246  void prepare_coordinates(std::vector< OpenSwath::ChromatogramPtr > & output_chromatograms,
247  std::vector< ExtractionCoordinates > & coordinates,
248  const OpenMS::TargetedExperiment & transition_exp,
249  const double rt_extraction_window,
250  const bool ms1) const;
251 
265  template <typename TransitionExpT>
266  static void return_chromatogram(std::vector< OpenSwath::ChromatogramPtr > & chromatograms,
267  std::vector< ChromatogramExtractor::ExtractionCoordinates > & coordinates,
268  TransitionExpT& transition_exp_used,
269  SpectrumSettings settings,
270  std::vector<OpenMS::MSChromatogram > & output_chromatograms,
271  bool ms1)
272  {
273  typedef std::map<String, const typename TransitionExpT::Transition* > TransitionMapType;
274  TransitionMapType trans_map;
275  for (Size i = 0; i < transition_exp_used.getTransitions().size(); i++)
276  {
277  trans_map[transition_exp_used.getTransitions()[i].getNativeID()] = &transition_exp_used.getTransitions()[i];
278  }
279 
280  for (Size i = 0; i < chromatograms.size(); i++)
281  {
282  const OpenSwath::ChromatogramPtr & chromptr = chromatograms[i];
283  const ChromatogramExtractor::ExtractionCoordinates & coord = coordinates[i];
284 
285  // copy data
288  chrom.setNativeID(coord.id);
289 
290  // Create precursor and set
291  // 1) the target m/z
292  // 2) the isolation window (upper/lower)
293  // 3) the peptide sequence
294  Precursor prec;
295  if (ms1)
296  {
297  prec.setMZ(coord.mz);
299 
300  // extract compound / peptide id from transition and store in
301  // more-or-less default field
302  String r = extract_id_(transition_exp_used, coord.id);
303  prec.setMetaValue("peptide_sequence", r);
304  }
305  else
306  {
307  typename TransitionExpT::Transition transition = (*trans_map[coord.id]);
308 
309  prec.setMZ(transition.getPrecursorMZ());
310  if (settings.getPrecursors().size() > 0)
311  {
312  prec.setIsolationWindowLowerOffset(settings.getPrecursors()[0].getIsolationWindowLowerOffset());
313  prec.setIsolationWindowUpperOffset(settings.getPrecursors()[0].getIsolationWindowUpperOffset());
314  }
315 
316  // Create product and set its m/z
317  Product prod;
318  prod.setMZ(transition.getProductMZ());
319  chrom.setProduct(prod);
321 
322  // extract compound / peptide id from transition and store in
323  // more-or-less default field
324  if (!transition.getPeptideRef().empty())
325  {
326  String r = extract_id_(transition_exp_used, transition.getPeptideRef());
327  prec.setMetaValue("peptide_sequence", r);
328  }
329  else
330  {
331  String r = extract_id_(transition_exp_used, transition.getCompoundRef());
332  prec.setMetaValue("peptide_sequence", r);
333  }
334  }
335  chrom.setPrecursor(prec);
336 
337  // Set the rest of the meta-data
339  chrom.setAcquisitionInfo(settings.getAcquisitionInfo());
340  chrom.setSourceFile(settings.getSourceFile());
341 
342  for (Size j = 0; j < settings.getDataProcessing().size(); ++j)
343  {
344  settings.getDataProcessing()[j]->setMetaValue("performed_on_spectra", "true");
345  chrom.getDataProcessing().push_back(settings.getDataProcessing()[j]);
346  }
347  output_chromatograms.push_back(chrom);
348  }
349  }
350 
352  template <typename SpectrumT>
353  void extract_value_tophat(const SpectrumT& input, const double& mz, Size& peak_idx,
354  double& integrated_intensity, const double& extract_window, const bool ppm)
355  {
356  integrated_intensity = 0;
357  if (input.size() == 0)
358  {
359  return;
360  }
361 
362  // calculate extraction window
363  double left, right;
364  if (ppm)
365  {
366  left = mz - mz * extract_window / 2.0 * 1.0e-6;
367  right = mz + mz * extract_window / 2.0 * 1.0e-6;
368  }
369  else
370  {
371  left = mz - extract_window / 2.0;
372  right = mz + extract_window / 2.0;
373  }
374 
375  Size walker;
376 
377  // advance the peak_idx until we hit the m/z value of the next transition
378  while (peak_idx < input.size() && input[peak_idx].getMZ() < mz)
379  {
380  peak_idx++;
381  }
382 
383  // walk right and left and add to our intensity
384  walker = peak_idx;
385  // if we moved past the end of the spectrum, we need to try the last peak
386  // of the spectrum (it could still be within the window)
387  if (peak_idx >= input.size())
388  {
389  walker = input.size() - 1;
390  }
391 
392  // add the current peak if it is between right and left
393  if (input[walker].getMZ() > left && input[walker].getMZ() < right)
394  {
395  integrated_intensity += input[walker].getIntensity();
396  }
397 
398  // (i) Walk to the left one step and then keep walking left until we go
399  // outside the window. Note for the first step to the left we have to
400  // check for the walker becoming zero.
401  walker = peak_idx;
402  if (walker > 0)
403  {
404  walker--;
405  // special case: walker is now zero
406  if (walker == 0 && input[walker].getMZ() > left && input[walker].getMZ() < right)
407  {
408  integrated_intensity += input[walker].getIntensity();
409  }
410  }
411  while (walker > 0 && input[walker].getMZ() > left && input[walker].getMZ() < right)
412  {
413  integrated_intensity += input[walker].getIntensity(); walker--;
414  }
415 
416  // (ii) Walk to the right one step and then keep walking right until we
417  // are outside the window
418  walker = peak_idx;
419  if (walker < input.size() )
420  {
421  walker++;
422  }
423  while (walker < input.size() && input[walker].getMZ() > left && input[walker].getMZ() < right)
424  {
425  integrated_intensity += input[walker].getIntensity(); walker++;
426  }
427  }
428 
430  template <typename SpectrumT>
431  void extract_value_bartlett(const SpectrumT& input, const double& mz, Size& peak_idx,
432  double& integrated_intensity, const double& extract_window, const bool ppm)
433  {
434  integrated_intensity = 0;
435  if (input.size() == 0)
436  {
437  return;
438  }
439 
440  // calculate extraction window
441  double left, right, half_window_size, weight;
442  if (ppm)
443  {
444  half_window_size = mz * extract_window / 2.0 * 1.0e-6;
445  left = mz - mz * extract_window / 2.0 * 1.0e-6;
446  right = mz + mz * extract_window / 2.0 * 1.0e-6;
447  }
448  else
449  {
450  half_window_size = extract_window / 2.0;
451  left = mz - extract_window / 2.0;
452  right = mz + extract_window / 2.0;
453  }
454 
455  Size walker;
456 
457  // advance the peak_idx until we hit the m/z value of the next transition
458  while (peak_idx < input.size() && input[peak_idx].getMZ() < mz)
459  {
460  peak_idx++;
461  }
462 
463  // walk right and left and add to our intensity
464  walker = peak_idx;
465  // if we moved past the end of the spectrum, we need to try the last peak
466  // of the spectrum (it could still be within the window)
467  if (peak_idx >= input.size())
468  {
469  walker = input.size() - 1;
470  }
471 
472  // add the current peak if it is between right and left
473  if (input[walker].getMZ() > left && input[walker].getMZ() < right)
474  {
475  weight = 1 - fabs(input[walker].getMZ() - mz) / half_window_size;
476  integrated_intensity += input[walker].getIntensity() * weight;
477  }
478 
479  // (i) Walk to the left one step and then keep walking left until we go
480  // outside the window. Note for the first step to the left we have to
481  // check for the walker becoming zero.
482  walker = peak_idx;
483  if (walker > 0)
484  {
485  walker--;
486  // special case: walker is now zero
487  if (walker == 0 && input[walker].getMZ() > left && input[walker].getMZ() < right)
488  {
489  integrated_intensity += input[walker].getIntensity();
490  }
491  }
492  while (walker > 0 && input[walker].getMZ() > left && input[walker].getMZ() < right)
493  {
494  weight = 1 - fabs(input[walker].getMZ() - mz) / half_window_size;
495  integrated_intensity += input[walker].getIntensity() * weight; walker--;
496  }
497 
498  // (ii) Walk to the right one step and then keep walking right until we
499  // are outside the window
500  walker = peak_idx;
501  if (walker < input.size() )
502  {
503  walker++;
504  }
505  while (walker<input.size() && input[walker].getMZ()> left && input[walker].getMZ() < right)
506  {
507  weight = 1 - fabs(input[walker].getMZ() - mz) / half_window_size;
508  integrated_intensity += input[walker].getIntensity() * weight; walker++;
509  }
510  }
511 
512 private:
513 
521  template <typename TransitionExpT>
522  static String extract_id_(TransitionExpT& transition_exp_used, String id);
523 
538  template <class SpectrumSettingsT, class ChromatogramT>
539  void prepareSpectra_(SpectrumSettingsT& settings, std::vector<ChromatogramT>& chromatograms, OpenMS::TargetedExperiment& transition_exp)
540  {
541  // first prepare all the spectra (but leave them empty)
542  for (Size i = 0; i < transition_exp.getTransitions().size(); i++)
543  {
544  const ReactionMonitoringTransition* transition = &transition_exp.getTransitions()[i];
545 
546  // 1) and 2) Extract precursor m/z and isolation window
547  ChromatogramT chrom;
548  Precursor prec;
549  prec.setMZ(transition->getPrecursorMZ());
550  if (settings.getPrecursors().size() > 0)
551  {
552  prec.setIsolationWindowLowerOffset(settings.getPrecursors()[0].getIsolationWindowLowerOffset());
553  prec.setIsolationWindowUpperOffset(settings.getPrecursors()[0].getIsolationWindowUpperOffset());
554  }
555 
556  // 3) set precursor peptide sequence / compound id in more-or-less default field
557  String pepref = transition->getPeptideRef();
558  for (Size pep_idx = 0; pep_idx < transition_exp.getPeptides().size(); pep_idx++)
559  {
560  const OpenMS::TargetedExperiment::Peptide* pep = &transition_exp.getPeptides()[pep_idx];
561  if (pep->id == pepref)
562  {
563  prec.setMetaValue("peptide_sequence", pep->sequence);
564  break;
565  }
566  }
567  String compref = transition->getCompoundRef();
568  for (Size comp_idx = 0; comp_idx < transition_exp.getCompounds().size(); comp_idx++)
569  {
570  const OpenMS::TargetedExperiment::Compound* comp = &transition_exp.getCompounds()[comp_idx];
571  if (comp->id == compref)
572  {
573  prec.setMetaValue("peptide_sequence", String(comp->id) );
574  break;
575  }
576  }
577 
578  // add precursor to spectrum
579  chrom.setPrecursor(prec);
580 
581  // 4) Create product and set its m/z
582  Product prod;
583  prod.setMZ(transition->getProductMZ());
584  chrom.setProduct(prod);
585 
586  // 5) Set the rest of the meta-data
587  chrom.setInstrumentSettings(settings.getInstrumentSettings());
588  chrom.setAcquisitionInfo(settings.getAcquisitionInfo());
589  chrom.setSourceFile(settings.getSourceFile());
590 
591  for (Size j = 0; j < settings.getDataProcessing().size(); ++j)
592  {
593  settings.getDataProcessing()[j]->setMetaValue("performed_on_spectra", "true");
594  chrom.getDataProcessing().push_back(settings.getDataProcessing()[j]);
595  }
596 
597  // Set the id of the chromatogram, using the id of the transition (this gives directly the mapping of the two)
598  chrom.setNativeID(transition->getNativeID());
600  chromatograms.push_back(chrom);
601  }
602 
603  }
604 
606  bool outsideExtractionWindow_(const ReactionMonitoringTransition& transition, double current_rt,
607  const TransformationDescription& trafo, double rt_extraction_window);
608 
610  int getFilterNr_(const String& filter);
611 
613  void populatePeptideRTMap_(OpenMS::TargetedExperiment& transition_exp, double rt_extraction_window);
614 
615  std::map<OpenMS::String, double> PeptideRTMap_;
616 
617  };
618 
619  // Specialization for template (LightTargetedExperiment)
620  template<>
621  inline String ChromatogramExtractor::extract_id_<OpenSwath::LightTargetedExperiment>(OpenSwath::LightTargetedExperiment& transition_exp_used, String id)
622  {
623  OpenSwath::LightCompound comp = transition_exp_used.getCompoundByRef(id);
624  if (!comp.sequence.empty())
625  {
626  return comp.sequence;
627  }
628  else
629  {
630  return comp.compound_name;
631  }
632  }
633 
634 
635  // Specialization for template (TargetedExperiment)
636  template<>
637  inline String ChromatogramExtractor::extract_id_<OpenMS::TargetedExperiment>(OpenMS::TargetedExperiment& transition_exp_used, String id)
638  {
639  if (transition_exp_used.hasPeptide(id))
640  {
641  TargetedExperiment::Peptide p = transition_exp_used.getPeptideByRef(id);
642  return p.sequence;
643  }
644  else if (transition_exp_used.hasCompound(id))
645  {
646  TargetedExperiment::Compound c = transition_exp_used.getCompoundByRef(id);
647  return c.id;
648  }
649  else
650  {
651  return "";
652  }
653  }
654 }
655 
const double k
std::map< OpenMS::String, double > PeptideRTMap_
Definition: ChromatogramExtractor.h:615
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:353
A more convenient string class.
Definition: String.h:57
Precursor meta information.
Definition: Precursor.h:57
The ChromatogramExtractorAlgorithm extracts chromatograms from a MS data.
Definition: ChromatogramExtractorAlgorithm.h:58
Product meta information.
Definition: Product.h:48
boost::shared_ptr< ISpectrumAccess > SpectrumAccessPtr
Definition: openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:89
The representation of a chromatogram.
Definition: MSChromatogram.h:54
void setChromatogramType(ChromatogramType type)
sets the chromatogram type
void setProduct(const Product &product)
sets the products
Peak2D PeakType
Definition: MassTrace.h:47
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:63
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:46
Definition: ChromatogramExtractorAlgorithm.h:64
void setMZ(CoordinateType mz)
Mutable access to m/z.
Definition: Peak1D.h:119
void extractChromatograms(const OpenSwath::SpectrumAccessPtr input, std::vector< OpenSwath::ChromatogramPtr > &output, const std::vector< ExtractionCoordinates > &extraction_coordinates, double mz_extraction_window, bool ppm, const String &filter)
Extract chromatograms at the m/z and RT defined by the ExtractionCoordinates.
Definition: ChromatogramExtractor.h:187
void extractChromatograms(const OpenSwath::SpectrumAccessPtr input, std::vector< OpenSwath::ChromatogramPtr > &output, const std::vector< ExtractionCoordinates > &extraction_coordinates, double mz_extraction_window, bool ppm, double im_extraction_window, const String &filter)
Extract chromatograms at the m/z and RT defined by the ExtractionCoordinates.
Definition: ChromatogramExtractor.h:214
Definition: ChromatogramSettings.h:71
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:72
void setIsolationWindowLowerOffset(double bound)
sets the lower offset from the target m/z
const AcquisitionInfo & getAcquisitionInfo() const
returns a const reference to the acquisition info
std::vector< DataProcessingPtr > & getDataProcessing()
returns a mutable reference to the description of the applied processing
const std::vector< ReactionMonitoringTransition > & getTransitions() const
returns the transition list
double mz
m/z value around which should be extracted
Definition: ChromatogramExtractorAlgorithm.h:66
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/OPENSWATHALGO/DATAACCESS/DataStructures.h:170
void extractChromatograms(const ExperimentT &input, ExperimentT &output, OpenMS::TargetedExperiment &transition_exp, double mz_extraction_window, bool ppm, TransformationDescription trafo, double rt_extraction_window, const String &filter)
Extract chromatograms defined by the TargetedExperiment from the input map and write them to the outp...
Definition: ChromatogramExtractor.h:94
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:149
std::string sequence
Definition: TransitionExperiment.h:161
Definition: TargetedExperimentHelper.h:383
std::vector< DataProcessingPtr > & getDataProcessing()
returns a mutable reference to the description of the applied processing
String id
Definition: TargetedExperimentHelper.h:373
The ChromatogramExtractor extracts chromatograms from a spectra file.
Definition: ChromatogramExtractor.h:66
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:515
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:539
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition: Types.h:127
const std::vector< Compound > & getCompounds() const
Base class for all classes that want to report their progress.
Definition: ProgressLogger.h:54
A description of a targeted experiment containing precursor and production ions.
Definition: TargetedExperiment.h:61
void extractChromatograms(const OpenSwath::SpectrumAccessPtr input, std::vector< OpenSwath::ChromatogramPtr > &output, const std::vector< ExtractionCoordinates > &extraction_coordinates, double mz_extraction_window, bool ppm, double im_extraction_window, String filter)
Extract chromatograms at the m/z and RT defined by the ExtractionCoordinates.
Generic description of a coordinate transformation.
Definition: TransformationDescription.h:60
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:431
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:169
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:266
const String & getNativeID() const
void setPrecursor(const Precursor &precursor)
sets the precursors
Definition: TransitionExperiment.h:206
std::string id
identifier
Definition: ChromatogramExtractorAlgorithm.h:71
void invert()
Computes an (approximate) inverse of the transformation.
Definition: TargetedExperimentHelper.h:429
This class stores a SRM/MRM transition.
Definition: ReactionMonitoringTransition.h:55

OpenMS / TOPP release 2.3.0 Documentation generated on Wed Apr 18 2018 19:29:04 using doxygen 1.8.14