OpenMS
Loading...
Searching...
No Matches
DIAPrescoring.h
Go to the documentation of this file.
1// Copyright (c) 2002-present, OpenMS Inc. -- EKU Tuebingen, ETH Zurich, and FU Berlin
2// SPDX-License-Identifier: BSD-3-Clause
3//
4// --------------------------------------------------------------------------
5// $Maintainer: Timo Sachsenberg $
6// $Authors: Witold Wolski $
7// --------------------------------------------------------------------------
8
9#pragma once
10
14
17
18namespace OpenMS
19{
34 class OPENMS_DLLAPI DiaPrescore :
36 {
37 double dia_extract_window_; //done
40public:
48 {
50 std::vector<double> mz_theor;
52 std::vector<double> int_theor;
54 std::vector<double> int_theor_neg;
56 double neg_val = 0.0;
58 double pos_val = 0.0;
59
65 void clear();
66 };
67
69
70 DiaPrescore(double dia_extract_window, int nr_isotopes = 4, int nr_charges = 4);
71
73
74 void updateMembers_() override;
75
85 void score(const SpectrumSequence& spec,
86 const std::vector<OpenSwath::LightTransition>& lt,
87 const RangeMobility& im_range,
88 double& dotprod,
89 double& manhattan) const;
90
101 void buildTheoreticalSpectrum(const std::vector<OpenSwath::LightTransition>& lt,
102 TransitionGroupTheoreticalSpectrumCache& theoretical_spectrum_cache) const;
103
118 static void scorePrepared(const SpectrumSequence& spec,
119 const TransitionGroupTheoreticalSpectrumCache& theoretical_spectrum_cache,
120 double dia_extract_window,
121 const RangeMobility& im_range,
122 double& dotprod,
123 double& manhattan);
124
133 OpenSwath::LightTargetedExperiment& transition_exp_used, const RangeMobility& range_im,
134 OpenSwath::IDataFrameWriter* ivw) const;
135 };
136
137
138}
A base class for all classes handling default parameters.
Definition DefaultParamHandler.h:66
Scoring of an spectrum given library intensities of a transition group.
Definition DIAPrescoring.h:36
int nr_charges_
Definition DIAPrescoring.h:39
void operator()(const OpenSwath::SpectrumAccessPtr &swath_ptr, OpenSwath::LightTargetedExperiment &transition_exp_used, const RangeMobility &range_im, OpenSwath::IDataFrameWriter *ivw) const
Compute Manhattan and dot-product scores for all spectra accessible through the SpectrumAccessPtr.
void buildTheoreticalSpectrum(const std::vector< OpenSwath::LightTransition > &lt, TransitionGroupTheoreticalSpectrumCache &theoretical_spectrum_cache) const
Build the theoretical DIA isotope spectrum cache for repeated scoring.
int nr_isotopes_
Definition DIAPrescoring.h:38
static void scorePrepared(const SpectrumSequence &spec, const TransitionGroupTheoreticalSpectrumCache &theoretical_spectrum_cache, double dia_extract_window, const RangeMobility &im_range, double &dotprod, double &manhattan)
Score an observed spectrum sequence against a precomputed theoretical DIA spectrum.
double dia_extract_window_
Definition DIAPrescoring.h:37
void updateMembers_() override
This method is used to update extra member variables at the end of the setParameters() method.
void score(const SpectrumSequence &spec, const std::vector< OpenSwath::LightTransition > &lt, const RangeMobility &im_range, double &dotprod, double &manhattan) const
Score one or more observed spectra for a transition group.
DiaPrescore(double dia_extract_window, int nr_isotopes=4, int nr_charges=4)
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
std::vector< OpenSwath::SpectrumPtr > SpectrumSequence
a vector of spectrum pointers that DIA scores can operate on, allows for clever integration of only t...
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:20
std::shared_ptr< ISpectrumAccess > SpectrumAccessPtr
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:131
Cached transition-group-specific theoretical spectrum used by the DIA prescore.
Definition DIAPrescoring.h:48
std::vector< double > mz_theor
Theoretical fragment/isotope m/z positions used for window integration.
Definition DIAPrescoring.h:50
std::vector< double > int_theor
Non-negative normalized theoretical intensities used for Manhattan-style comparison.
Definition DIAPrescoring.h:52
std::vector< double > int_theor_neg
Signed normalized theoretical intensities including negatively weighted pre-isotope peaks.
Definition DIAPrescoring.h:54
Definition RangeManager.h:482
Definition DataFrameWriter.h:20
Definition TransitionExperiment.h:369