OpenMS  2.4.0
Public Member Functions | Private Member Functions | Private Attributes | List of all members
MRMFeatureFilter Class Reference

The MRMFeatureFilter either flags components and/or transitions that do not pass the QC criteria or filters out components and/or transitions that do not pass the QC criteria. More...

#include <OpenMS/ANALYSIS/OPENSWATH/MRMFeatureFilter.h>

Inheritance diagram for MRMFeatureFilter:
DefaultParamHandler

Public Member Functions

void updateMembers_ () override
 Synchronize members with param class. More...
 
void FilterFeatureMap (FeatureMap &features, const MRMFeatureQC &filter_criteria, const TargetedExperiment &transitions)
 Flags or filters features and subordinates in a FeatureMap. More...
 
void FeatureMapToAttachment (FeatureMap &features, QcMLFile::Attachment &attachment)
 Converts a FeatureMap to a qcMLFile::Attachment. More...
 
double calculateIonRatio (const Feature &component_1, const Feature &component_2, const String &feature_name)
 Calculates the ion ratio between two transitions. More...
 
double calculateRTDifference (Feature &component_1, Feature &component_2)
 Calculates the retention time difference between two features. More...
 
double calculateResolution (Feature &component_1, Feature &component_2)
 Calculates the resolution between two features. More...
 
bool checkMetaValue (const Feature &component, const String &meta_value_key, const double &meta_value_l, const double &meta_value_u, bool &key_exists) const
 Checks if the metaValue is within the user specified range. More...
 
std::map< String, int > countLabelsAndTransitionTypes (const Feature &component_group, const TargetedExperiment &transitions)
 Count the number of heavy/light labels and quantifying/detecting/identifying transitions. More...
 
String uniqueJoin (std::vector< String > &str_vec, String &delim)
 Sorts, removes duplicates, and concatenates a list of Strings. More...
 
 MRMFeatureFilter ()
 Constructor. More...
 
 ~MRMFeatureFilter () override
 Destructor. More...
 
- Public Member Functions inherited from DefaultParamHandler
 DefaultParamHandler (const String &name)
 Constructor with name that is displayed in error messages. More...
 
 DefaultParamHandler (const DefaultParamHandler &rhs)
 Copy constructor. More...
 
virtual ~DefaultParamHandler ()
 Destructor. More...
 
virtual DefaultParamHandleroperator= (const DefaultParamHandler &rhs)
 Assignment operator. More...
 
virtual bool operator== (const DefaultParamHandler &rhs) const
 Equality operator. More...
 
void setParameters (const Param &param)
 Sets the parameters. More...
 
const ParamgetParameters () const
 Non-mutable access to the parameters. More...
 
const ParamgetDefaults () const
 Non-mutable access to the default parameters. More...
 
const StringgetName () const
 Non-mutable access to the name. More...
 
void setName (const String &name)
 Mutable access to the name. More...
 
const std::vector< String > & getSubsections () const
 Non-mutable access to the registered subsections. More...
 

Private Member Functions

template<typename T >
bool checkRange (const T &value, const T &value_l, const T &value_u) const
 

Private Attributes

String flag_or_filter_
 flag or filter (i.e., remove) features that do not pass the QC More...
 
bool report_xic_
 include the data points for the extracted ion chromatogram (XIC) in the attachment More...
 
bool report_tic_
 include the data points for the total ion chromatogram (TIC) in the attachment More...
 
QcMLFile::Attachment attachment_
 qcMLFile Attachment More...
 
FeatureMap features_
 FeatureMap. More...
 
std::map< String, std::vector< QcMLFile::QualityParameter > > component_group_qc_report_
 component group/peptide/compound QCs More...
 
std::map< String, std::vector< QcMLFile::QualityParameter > > component_qc_report_
 component/transition QCs More...
 
std::map< std::vector< String >, std::vector< QcMLFile::QualityParameter > > multi_component_group_qc_report_
 multi transition QCs More...
 

Additional Inherited Members

- Protected Member Functions inherited from DefaultParamHandler
void defaultsToParam_ ()
 Updates the parameters after the defaults have been set in the constructor. More...
 
- Protected Attributes inherited from DefaultParamHandler
Param param_
 Container for current parameters. More...
 
Param defaults_
 Container for default parameters. This member should be filled in the constructor of derived classes! More...
 
std::vector< Stringsubsections_
 Container for registered subsections. This member should be filled in the constructor of derived classes! More...
 
String error_name_
 Name that is displayed in error messages during the parameter checking. More...
 
bool check_defaults_
 If this member is set to false no checking if parameters in done;. More...
 
bool warn_empty_defaults_
 If this member is set to false no warning is emitted when defaults are empty;. More...
 

Detailed Description

The MRMFeatureFilter either flags components and/or transitions that do not pass the QC criteria or filters out components and/or transitions that do not pass the QC criteria.

Constructor & Destructor Documentation

◆ MRMFeatureFilter()

Constructor.

◆ ~MRMFeatureFilter()

~MRMFeatureFilter ( )
override

Destructor.

Member Function Documentation

◆ calculateIonRatio()

double calculateIonRatio ( const Feature component_1,
const Feature component_2,
const String feature_name 
)

Calculates the ion ratio between two transitions.

Parameters
component_1component of the numerator
component_2component of the denominator
feature_namename of the feature to calculate the ratio on e.g., peak_apex, peak_area
Returns
The ratio.

◆ calculateResolution()

double calculateResolution ( Feature component_1,
Feature component_2 
)

Calculates the resolution between two features.

Parameters
component_1component 1
component_2component 2
Returns
The difference.

◆ calculateRTDifference()

double calculateRTDifference ( Feature component_1,
Feature component_2 
)

Calculates the retention time difference between two features.

Parameters
component_1First eluting component
component_2Second eluting component
Returns
The difference.

◆ checkMetaValue()

bool checkMetaValue ( const Feature component,
const String meta_value_key,
const double meta_value_l,
const double meta_value_u,
bool &  key_exists 
) const

Checks if the metaValue is within the user specified range.

Parameters
[in]componentcomponent of the numerator
[in]meta_value_keyName of the metaValue
[in]meta_value_lLower bound (inclusive) for the metaValue range
[in]meta_value_uUpper bound (inclusive) for the metaValue range
[out]key_existstrue if the given key is found, false otherwise
Returns
True if the metaValue is within the bounds, and False otherwise.

◆ checkRange()

bool checkRange ( const T &  value,
const T &  value_l,
const T &  value_u 
) const
private

◆ countLabelsAndTransitionTypes()

std::map<String,int> countLabelsAndTransitionTypes ( const Feature component_group,
const TargetedExperiment transitions 
)

Count the number of heavy/light labels and quantifying/detecting/identifying transitions.

Parameters
componentcomponent_group with subordinates
transitionstransitions from a TargetedExperiment
Returns
Map of labels/transition types and their corresponding number.

◆ FeatureMapToAttachment()

void FeatureMapToAttachment ( FeatureMap features,
QcMLFile::Attachment attachment 
)

Converts a FeatureMap to a qcMLFile::Attachment.

Parameters
featuresFeatureMap to flag or filter
attachmentqcML Attachment

◆ FilterFeatureMap()

void FilterFeatureMap ( FeatureMap features,
const MRMFeatureQC filter_criteria,
const TargetedExperiment transitions 
)

Flags or filters features and subordinates in a FeatureMap.

Parameters
featuresFeatureMap to flag or filter
filter_criteriaMRMFeatureQC class defining QC parameters
transitionstransitions from a TargetedExperiment

◆ uniqueJoin()

String uniqueJoin ( std::vector< String > &  str_vec,
String delim 
)

Sorts, removes duplicates, and concatenates a list of Strings.

Parameters
str_vecvector of Strings
delimtoken to separate Strings in the list
Returns
A concatenated string.

◆ updateMembers_()

void updateMembers_ ( )
overridevirtual

Synchronize members with param class.

Reimplemented from DefaultParamHandler.

Member Data Documentation

◆ attachment_

QcMLFile::Attachment attachment_
private

qcMLFile Attachment

◆ component_group_qc_report_

std::map<String,std::vector<QcMLFile::QualityParameter> > component_group_qc_report_
private

component group/peptide/compound QCs

◆ component_qc_report_

std::map<String,std::vector<QcMLFile::QualityParameter> > component_qc_report_
private

component/transition QCs

◆ features_

FeatureMap features_
private

◆ flag_or_filter_

String flag_or_filter_
private

flag or filter (i.e., remove) features that do not pass the QC

◆ multi_component_group_qc_report_

std::map<std::vector<String>,std::vector<QcMLFile::QualityParameter> > multi_component_group_qc_report_
private

multi transition QCs

◆ report_tic_

bool report_tic_
private

include the data points for the total ion chromatogram (TIC) in the attachment

◆ report_xic_

bool report_xic_
private

include the data points for the extracted ion chromatogram (XIC) in the attachment