OpenMS
|
#include <OpenMS/QC/PSMExplainedIonCurrent.h>
Classes | |
struct | Statistics |
Structure for storing results: average and variance over all PSMs. More... | |
Public Member Functions | |
PSMExplainedIonCurrent ()=default | |
Default constructor. More... | |
virtual | ~PSMExplainedIonCurrent ()=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 PSMExplainedIonCurrent (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 PSMExplainedIonCurrent (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 | requirements () 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 double | annotatePSMExplainedIonCurrent_ (PeptideIdentification &pep_id, const MSExperiment &exp, const QCBase::SpectraMap &map_to_spectrum, WindowMower &filter, PSMExplainedIonCurrent::ToleranceUnit tolerance_unit, double tolerance) |
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::PSMExplainedIonCurrent::Statistics |
Structure for storing results: average and variance over all PSMs.
Class Members | ||
---|---|---|
double | average_correctness | |
double | variance_correctness |
|
default |
Default constructor.
|
virtualdefault |
Destructor.
|
staticprivate |
void compute | ( | FeatureMap & | fmap, |
const MSExperiment & | exp, | ||
const QCBase::SpectraMap & | map_to_spectrum, | ||
ToleranceUnit | tolerance_unit = ToleranceUnit::AUTO , |
||
double | tolerance = 20 |
||
) |
computes PSMExplainedIonCurrent (only of the first PeptideHit of each PepID)
To calculate PSMExplainedIonCurrent the theoretical spectrum is generated and matched with the original one. After that: PSMExplainedIonCurrent = sum of matched peaks intensity / total intensity
Stores average and variance of PSMExplainedIonCurrent as a struct and stores it in the results vector (can be accessed by getResults()). Each PSMExplainedIonCurrent is also stored in the first PeptideHit of the corresponding PeptideIdentification as metavalue "PSM_correctness".
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 | Search window for matching peaks; distance has to be lower than tolerance value |
tolerance_unit | Tolerance in ppm or Dalton (if auto was chosen, the unit and value will taken from FeatureMap metadata) |
Exceptions::MissingInformation | If fragment mass tolerance is missing in metadata of FeatureMap (& no ToleranceUnit is given) |
Exception::InvalidParameter | PeptideID is missing meta value 'spectrum_reference' |
Exception::IllegalArgument | Spectrum for a PepID has ms-level of 1 |
Exception::MissingInformation | If PSMExplainedIonCurrent couldn't be calculated for any spectrum. (i.e. all spectra are: empty, contain only peaks with intensity 0 or the matching pep_id has no hits) |
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 PSMExplainedIonCurrent (only of the first PeptideHit of each PepID)
Same as above, but with PeptideIdentification + SearchParameter input instead of FeatureMap
pep_ids | Input peptide identifications for annotation and data for theoretical spectra |
search_params | Input search parameters from ID-search that generated the peptide identifications from @pep_ids |
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 | Search window for matching peaks; distance has to be lower than tolerance value |
tolerance_unit | Tolerance in ppm or Dalton (if auto was chosen, the unit and value will taken from FeatureMap metadata) |
Exceptions::MissingInformation | If fragment mass tolerance is missing in metadata of FeatureMap (& no ToleranceUnit is given) |
Exception::InvalidParameter | PeptideID is missing meta value 'spectrum_reference' |
Exception::IllegalArgument | Spectrum for a PepID has ms-level of 1 |
Exception::MissingInformation | If PSMExplainedIonCurrent couldn't be calculated for any spectrum. (i.e. all spectra are: empty, contain only peaks with intensity 0 or the matching pep_id has no hits) |
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