OpenMS
|
#include <OpenMS/ANALYSIS/ID/IDScoreSwitcherAlgorithm.h>
Public Types | |
enum class | ScoreType { RAW , RAW_EVAL , PP , PEP , FDR , QVAL } |
Public Member Functions | |
IDScoreSwitcherAlgorithm () | |
bool | isScoreType (const String &score_name, const ScoreType &type) |
Checks if the given score_name is of ScoreType type . More... | |
template<typename IDType > | |
void | switchScores (IDType &id, Size &counter) |
void | switchToGeneralScoreType (std::vector< PeptideIdentification > &id, ScoreType type, Size &counter) |
void | switchToGeneralScoreType (ConsensusMap &cmap, ScoreType type, Size &counter, bool unassigned_peptides_too=true) |
template<typename IDType > | |
String | findScoreType (IDType &id, IDScoreSwitcherAlgorithm::ScoreType type) |
finds a certain score type in an ID and its metavalues if present, otherwise returns empty string 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... | |
DefaultParamHandler & | operator= (const DefaultParamHandler &rhs) |
Assignment operator. More... | |
virtual bool | operator== (const DefaultParamHandler &rhs) const |
Equality operator. More... | |
void | setParameters (const Param ¶m) |
Sets the parameters. More... | |
const Param & | getParameters () const |
Non-mutable access to the parameters. More... | |
const Param & | getDefaults () const |
Non-mutable access to the default parameters. More... | |
const String & | getName () 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 | |
void | updateMembers_ () override |
This method is used to update extra member variables at the end of the setParameters() method. More... | |
Private Attributes | |
const double | tolerance_ = 1e-6 |
relative tolerance for score comparisons: More... | |
String | new_score_ |
will be set according to the algorithm parameters More... | |
String | new_score_type_ |
String | old_score_ |
bool | higher_better_ |
will be set according to the algorithm parameters More... | |
std::map< ScoreType, std::set< String > > | type_to_str_ |
a map from ScoreType to their names as used around OpenMS More... | |
std::map< ScoreType, bool > | type_to_better_ |
a map from ScoreType to their ordering More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from DefaultParamHandler | |
static void | writeParametersToMetaValues (const Param &write_this, MetaInfoInterface &write_here, const String &key_prefix="") |
Writes all parameters to meta values. More... | |
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< String > | subsections_ |
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... | |
|
strong |
|
inline |
finds a certain score type in an ID and its metavalues if present, otherwise returns empty string
References OPENMS_LOG_INFO, and OPENMS_LOG_WARN.
Checks if the given score_name
is of ScoreType type
.
|
inline |
Switches all main scores in all hits in id
according to the settings in the param object of the switcher class if the old score type and new score type have the same name (e.g., "q-value") we greate a meta value entry with appended "~" to the old score type (to not overwrite the meta value of the new one).
References DataValue::isEmpty().
|
inline |
Looks at the first Hit of the given id
and according to the given type
, deduces a fitting score and score direction to be switched to. Then tries to switch all hits.
References MapUtilities< MapType >::applyFunctionOnPeptideIDs(), String::chop(), String::hasSuffix(), and OPENMS_LOG_WARN.
|
inline |
Looks at the first Hit of the given id
and according to the given type
, deduces a fitting score and score direction to be switched to. Then tries to switch all hits.
References String::chop(), String::hasSuffix(), and OPENMS_LOG_WARN.
|
overrideprivatevirtual |
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 |
will be set according to the algorithm parameters
|
private |
will be set according to the algorithm parameters
|
private |
|
private |
|
private |
relative tolerance for score comparisons:
|
private |
a map from ScoreType to their ordering
a map from ScoreType to their names as used around OpenMS