OpenMS
2.8.0
|
#include <OpenMS/QC/FragmentMassError.h>
Classes | |
struct | Statistics |
Structure for storing results: average and variance of all FragmentMassErrors in ppm. More... | |
Public Member Functions | |
FragmentMassError ()=default | |
Default constructor. More... | |
virtual | ~FragmentMassError ()=default |
Destructor. More... | |
void | compute (FeatureMap &fmap, const MSExperiment &exp, const QCBase::SpectraMap &map_to_spectrum, ToleranceUnit tolerance_unit=ToleranceUnit::AUTO, double tolerance=20) |
computes FragmentMassError (FME) in ppm and Dalton (only of the first PeptideHit of each PepID) More... | |
void | compute (std::vector< PeptideIdentification > &pep_ids, const ProteinIdentification::SearchParameters &search_params, const MSExperiment &exp, const QCBase::SpectraMap &map_to_spectrum, ToleranceUnit tolerance_unit=ToleranceUnit::AUTO, double tolerance=20) |
computes FragmentMassError (FME) in ppm and Dalton (only of the first PeptideHit of each PepID) More... | |
const String & | getName () const override |
returns the name of the metric More... | |
const std::vector< Statistics > & | getResults () const |
returns results More... | |
QCBase::Status | requires () const override |
Returns the input data requirements of the compute(...) function. More... | |
Public Member Functions inherited from QCBase | |
bool | isRunnable (const Status &s) const |
Static Private Member Functions | |
static void | calculateFME_ (PeptideIdentification &pep_id, const MSExperiment &exp, const QCBase::SpectraMap &map_to_spectrum, bool &print_warning, double tolerance, FragmentMassError::ToleranceUnit tolerance_unit, double &accumulator_ppm, UInt32 &counter_ppm, WindowMower &window_mower_filter) |
static void | calculateVariance_ (FragmentMassError::Statistics &result, const PeptideIdentification &pep_id, const UInt num_ppm) |
Private Attributes | |
std::vector< Statistics > | results_ |
container that stores results More... | |
Additional Inherited Members | |
Public Types inherited from QCBase | |
enum class | Requires : UInt64 { NOTHING , RAWMZML , POSTFDRFEAT , PREFDRFEAT , CONTAMINANTS , TRAFOALIGN , ID , SIZE_OF_REQUIRES } |
Enum to encode a file type as a bit. More... | |
enum class | ToleranceUnit { AUTO , PPM , DA , SIZE_OF_TOLERANCEUNIT } |
using | Status = FlagSet< Requires > |
Static Public Member Functions inherited from QCBase | |
static bool | isLabeledExperiment (const ConsensusMap &cm) |
check if the IsobaricAnalyzer TOPP tool was used to create this ConsensusMap More... | |
template<typename MAP > | |
static bool | hasPepID (const MAP &fmap) |
does the container have a PeptideIdentification in its members or as unassignedPepID ? More... | |
Static Public Attributes inherited from QCBase | |
static const std::string | names_of_requires [] |
strings corresponding to enum Requires More... | |
static const std::string | names_of_toleranceUnit [] |
strings corresponding to enum ToleranceUnit More... | |
struct OpenMS::FragmentMassError::Statistics |
Structure for storing results: average and variance of all FragmentMassErrors in ppm.
Class Members | ||
---|---|---|
double | average_ppm | |
double | variance_ppm |
|
default |
Default constructor.
|
virtualdefault |
Destructor.
|
staticprivate |
|
staticprivate |
void compute | ( | FeatureMap & | fmap, |
const MSExperiment & | exp, | ||
const QCBase::SpectraMap & | map_to_spectrum, | ||
ToleranceUnit | tolerance_unit = ToleranceUnit::AUTO , |
||
double | tolerance = 20 |
||
) |
computes FragmentMassError (FME) in ppm and Dalton (only of the first PeptideHit of each PepID)
Stores average FME over all spectra (one for each PeptideIdentification) and its variance in ppm as a struct in a vector. Each FME (in ppm) is stored at the first PeptideHit of the corresponding PeptideIdentification as metavalue Constants::UserParam::FRAGMENT_ERROR_PPM_METAVALUE_USERPARAM and contains the FME for each peak in the corresponding spectrum. Same is done for the FME in Da - as metavalue Constants::UserParam::FRAGMENT_ERROR_DA_METAVALUE_USERPARAM. For both tolerance units the variance of FMEs over the spectrum is also stored as a metavalue with the extension "_variance" to the metavalue name. Note: Variance will not be written if 1 or less FMEs were calculated. Note: If the metavalues already exist, they will be overwritten.
fmap | Input FeatureMap for annotation and data for theoretical spectra |
exp | Input MSExperiment for MS2 spectra; spectra should be sorted (ascending RT) |
map_to_spectrum | Map to find index of spectrum given by meta value at PepID |
tolerance_unit | Tolerance in ppm or Dalton (if auto was chosen, the unit and value will taken from FeatureMap metadata) |
tolerance | Search window for matching peaks; distance has to be lower than tolerance value (Will be overwritten if tolerance_unit AUTO is chosen) |
Exceptions::MissingInformation | If fragment mass tolerance is missing in metadata of FeatureMap |
Exception::InvalidParameter | PeptideID is missing meta value 'spectrum_reference' |
Exception::IllegalArgument | Spectrum for a PepID has ms-level of 1 |
Exception::MissingInformation | If no fragmentation method given in a MS2 precursor |
Exception::InvalidParameter | If the fragmentation method is not ECD, ETD, CID or HCD |
void compute | ( | std::vector< PeptideIdentification > & | pep_ids, |
const ProteinIdentification::SearchParameters & | search_params, | ||
const MSExperiment & | exp, | ||
const QCBase::SpectraMap & | map_to_spectrum, | ||
ToleranceUnit | tolerance_unit = ToleranceUnit::AUTO , |
||
double | tolerance = 20 |
||
) |
computes FragmentMassError (FME) in ppm and Dalton (only of the first PeptideHit of each PepID)
Stores average FME over all spectra and its variance in ppm as a struct in a vector. Each FME (in ppm) is stored at the first PeptideHit of the corresponding PeptideIdentification as metavalue Constants::UserParam::FRAGMENT_ERROR_PPM_METAVALUE_USERPARAM and contains the FME for each peak in the corresponding spectrum. Same is done for the FME in Da - as metavalue Constants::UserParam::FRAGMENT_ERROR_DA_METAVALUE_USERPARAM. For both tolerance units the variance of FMEs over the spectrum is also stored as a metavalue with the extension "_variance" to the metavalue name. Note: Variance will not be written if 1 or less FMEs were calculated. Note: If the metavalues already exist, they will be overwritten.
pep_ids | Input vector of peptide identifications for annotation and data for theoretical spectra |
search_params | Input search parameters (corresponding to ID search that generated |
pep_ids) | for finding fragment mass tolerance and unit automatically |
exp | Input MSExperiment for MS2 spectra; spectra should be sorted (ascending RT) |
map_to_spectrum | Map to find index of spectrum given by meta value at PepID |
tolerance_unit | Tolerance in ppm or Dalton (if auto was chosen, the unit and value will taken from FeatureMap metadata) |
tolerance | Search window for matching peaks; distance has to be lower than tolerance value (Will be overwritten if tolerance_unit AUTO is chosen) |
Exceptions::MissingInformation | If fragment mass tolerance is missing in @search_params |
Exception::InvalidParameter | PeptideID is missing meta value 'spectrum_reference' |
Exception::IllegalArgument | Spectrum for a PepID has ms-level of 1 |
Exception::MissingInformation | If no fragmentation method given in a MS2 precursor |
Exception::InvalidParameter | If the fragmentation method is not ECD, ETD, CID or HCD |
const std::vector<Statistics>& getResults | ( | ) | const |
returns results
|
overridevirtual |
Returns the input data requirements of the compute(...) function.
Implements QCBase.
|
private |
container that stores results