| OpenMS 2.5.0

Classes | Static Public Member Functions | Private Types | List of all members
DecoyHelper Class Reference

Helper class for calculcations on decoy proteins. More...

`#include <OpenMS/DATASTRUCTURES/FASTAContainer.h>`

## Classes

struct | Result

## Static Public Member Functions

template<typename T >
static Result | findDecoyString (FASTAContainer< T > &proteins)
| Heuristic to determine the decoy string given a set of protein names. More...

## Private Types

using | DecoyStringToAffixCount = std::map< std::string, std::pair< int, int > >
using | CaseInsensitiveToCaseSensitiveDecoy = std::map< std::string, std::string >

## Detailed Description

Helper class for calculcations on decoy proteins.

## Class Documentation

## ◆ OpenMS::DecoyHelper::Result

struct OpenMS::DecoyHelper::Result

Class Members
bool | is_prefix |
String | name |
bool | success |

## Member Typedef Documentation

## ◆ CaseInsensitiveToCaseSensitiveDecoy

using CaseInsensitiveToCaseSensitiveDecoy = std::map<std::string, std::string>

private

## ◆ DecoyStringToAffixCount

using DecoyStringToAffixCount = std::map<std::string, std::pair<int, int> >

private

## Member Function Documentation

## ◆ findDecoyString()

static Result findDecoyString | ( | FASTAContainer< T > & | proteins | ) |

inline static

Heuristic to determine the decoy string given a set of protein names.

Tested decoy strings are "decoy", "dec", "reverse", "rev", "__id_decoy", "xxx", "shuffled", "shuffle", "pseudo" and "random". Both prefix and suffix is tested and if one of the candidates above is found in at least 40% of all proteins, it is returned as the winner (see DecoyHelper::Result).

References OPENMS_LOG_DEBUG, OPENMS_LOG_ERROR, OPENMS_LOG_WARN, StringUtils::prefix(), StringUtils::suffix(), and String::toLower().

Referenced by PeptideIndexing::run().