![]() |
OpenMS
|
Scoring of an spectrum given library intensities of a transition group. More...
#include <OpenMS/ANALYSIS/OPENSWATH/DIAPrescoring.h>
Classes | |
| struct | TransitionGroupTheoreticalSpectrumCache |
| Cached transition-group-specific theoretical spectrum used by the DIA prescore. More... | |
Public Member Functions | |
| DiaPrescore () | |
| DiaPrescore (double dia_extract_window, int nr_isotopes=4, int nr_charges=4) | |
| void | defineDefaults () |
| 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 > <, const RangeMobility &im_range, double &dotprod, double &manhattan) const |
| Score one or more observed spectra for a transition group. | |
| void | buildTheoreticalSpectrum (const std::vector< OpenSwath::LightTransition > <, TransitionGroupTheoreticalSpectrumCache &theoretical_spectrum_cache) const |
| Build the theoretical DIA isotope spectrum cache for repeated scoring. | |
| 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. | |
Public Member Functions inherited from DefaultParamHandler | |
| DefaultParamHandler (const std::string &name) | |
| Constructor with name that is displayed in error messages. | |
| DefaultParamHandler (const DefaultParamHandler &rhs) | |
| Copy constructor. | |
| virtual | ~DefaultParamHandler () |
| Destructor. | |
| DefaultParamHandler & | operator= (const DefaultParamHandler &rhs) |
| Assignment operator. | |
| virtual bool | operator== (const DefaultParamHandler &rhs) const |
| Equality operator. | |
| void | setParameters (const Param ¶m) |
| Sets the parameters. | |
| const Param & | getParameters () const |
| Non-mutable access to the parameters. | |
| const Param & | getDefaults () const |
| Non-mutable access to the default parameters. | |
| const std::string & | getName () const |
| Non-mutable access to the name. | |
| void | setName (const std::string &name) |
| Mutable access to the name. | |
| const std::vector< std::string > & | getSubsections () const |
| Non-mutable access to the registered subsections. | |
Static Public Member Functions | |
| 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. | |
Static Public Member Functions inherited from DefaultParamHandler | |
| static void | writeParametersToMetaValues (const Param &write_this, MetaInfoInterface &write_here, const std::string &key_prefix="") |
| Writes all parameters to meta values. | |
Private Attributes | |
| double | dia_extract_window_ |
| int | nr_isotopes_ |
| int | nr_charges_ |
Additional Inherited Members | |
Protected Member Functions inherited from DefaultParamHandler | |
| void | defaultsToParam_ () |
| Updates the parameters after the defaults have been set in the constructor. | |
Protected Attributes inherited from DefaultParamHandler | |
| Param | param_ |
| Container for current parameters. | |
| Param | defaults_ |
| Container for default parameters. This member should be filled in the constructor of derived classes! | |
| std::vector< std::string > | subsections_ |
| Container for registered subsections. This member should be filled in the constructor of derived classes! | |
| std::string | error_name_ |
| Name that is displayed in error messages during the parameter checking. | |
| bool | check_defaults_ |
| If this member is set to false no checking if parameters in done;. | |
| bool | warn_empty_defaults_ |
| If this member is set to false no warning is emitted when defaults are empty;. | |
Scoring of an spectrum given library intensities of a transition group.
In DIA (data independent acquisition) / SWATH analysis, at each chromatographic point a full MS2 spectrum is recorded. This class allows to compute a number of scores based on the full MS2 spectrum available. The scores are the following:
See also class DIAScoring.
Simulate theoretical spectrum from library intensities of transition group and compute manhattan distance and dotprod score between spectrum intensities and simulated spectrum.
| DiaPrescore | ( | ) |
| DiaPrescore | ( | double | dia_extract_window, |
| int | nr_isotopes = 4, |
||
| int | nr_charges = 4 |
||
| ) |
| void buildTheoreticalSpectrum | ( | const std::vector< OpenSwath::LightTransition > & | lt, |
| TransitionGroupTheoreticalSpectrumCache & | theoretical_spectrum_cache | ||
| ) | const |
Build the theoretical DIA isotope spectrum cache for repeated scoring.
The transition-group-specific theoretical spectrum cache depends only on the transition group and DiaPrescore parameters, not on the observed spectrum.
| [in] | lt | Library transitions for the transition group |
| [out] | theoretical_spectrum_cache | Precomputed theoretical spectrum cache |
| void defineDefaults | ( | ) |
| 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.
Scores all transition groups in the LightTargetedExperiment against the spectra provided by swath_ptr and writes the per-spectrum score vectors to ivw.
| 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.
Builds the transition-group-specific theoretical spectrum cache from the library intensities and compares it against the observed spectrum sequence. The input may contain multiple adjacent MS2 spectra / frames around the apex or a single pre-merged spectrum, depending on the upstream merge mode.
|
static |
Score an observed spectrum sequence against a precomputed theoretical DIA spectrum.
The observed input may be a single merged spectrum or multiple spectra / frames around the feature apex, depending on the configured spectrum addition mode.
| [in] | spec | Observed spectrum sequence around the feature apex |
| [in] | theoretical_spectrum_cache | Precomputed theoretical spectrum cache |
| [in] | dia_extract_window | DIA extraction window in Th |
| [in] | im_range | Ion mobility extraction range |
| [out] | dotprod | Dot product score |
| [out] | manhattan | Manhattan distance score |
|
overridevirtual |
This method is used to update extra member variables at the end of the setParameters() method.
Also call it at the end of the derived classes' copy constructor and assignment operator.
The default implementation is empty.
Reimplemented from DefaultParamHandler.
|
private |
|
private |
|
private |