OpenMS
2.5.0
|
This class is a metric for the QualityControl TOPP tool. More...
#include <OpenMS/QC/Contaminants.h>
Classes | |
struct | ContaminantsSummary |
structure for storing results More... | |
Public Member Functions | |
Contaminants ()=default | |
Constructor. More... | |
virtual | ~Contaminants ()=default |
Destructor. More... | |
void | compute (FeatureMap &features, const std::vector< FASTAFile::FASTAEntry > &contaminants) |
Checks if the peptides are in the contaminant database. More... | |
const String & | getName () const override |
returns the name of the metric More... | |
const std::vector< Contaminants::ContaminantsSummary > & | getResults () |
returns results More... | |
Status | requires () const override |
Returns the input data requirements of the compute(...) function. More... | |
Private Member Functions | |
void | compare_ (const String &key, PeptideHit &pep_hit, Int64 &total, Int64 &cont, double &sum_total, double &sum_cont, double intensity) |
checks if the peptide is in the contaminant database More... | |
Private Attributes | |
const String | name_ = "Contaminants" |
name of the metric More... | |
std::vector< Contaminants::ContaminantsSummary > | results_ |
container that stores results More... | |
std::unordered_set< String > | digested_db_ |
unordered set that contains the contaminant sequences More... | |
Additional Inherited Members | |
Public Types inherited from QCBase | |
enum | Requires : UInt64 { FAIL, RAWMZML, POSTFDRFEAT, PREFDRFEAT, CONTAMINANTS, TRAFOALIGN, SIZE_OF_REQUIRES } |
Enum to encode a file type as a bit. More... | |
Static Public Member Functions inherited from QCBase | |
template<typename MAP , typename T > | |
static void | iterateFeatureMap (MAP &fmap, T lambda) |
function, which iterates through all PeptideIdentifications of a given FeatureMap and applies a given lambda function More... | |
Static Public Attributes inherited from QCBase | |
static const std::string | names_of_requires [] |
strings corresponding to enum Requires More... | |
This class is a metric for the QualityControl TOPP tool.
This class checks whether a peptide is a contaminant (given a protein DB) and adds that result as metavalue "is_contaminant" to the first hit of each PeptideIdentification.
struct OpenMS::Contaminants::ContaminantsSummary |
structure for storing results
Class Members | ||
---|---|---|
double | all_contaminants_ratio | (# all contaminants/ #peptides in all) |
double | assigned_contaminants_intensity_ratio | (intensity of contaminants in assigned/ intensity of peptides in assigned) |
double | assigned_contaminants_ratio | (# contaminants in assigned/ #peptides in assigned) |
pair< Int64, Int64 > | empty_features | (features without peptideidentification or with peptideidentifications but without hits; all features) |
double | unassigned_contaminants_ratio | (# contaminants in unassigned/ #peptides in unassigned) |
|
default |
Constructor.
|
virtualdefault |
Destructor.
|
private |
checks if the peptide is in the contaminant database
key | String that will be the key for searching in the unordered set |
pep_hit | PeptideHit to store the result "is_contaminant = 0/1" |
total | counter of all checked peptides |
cont | counter of all checked peptides that are contamiants |
sum_total | intensity of all checked peptides |
sum_cont | intensity of all checked peptides that are contaminants |
intensity | intensity of current peptide |
void compute | ( | FeatureMap & | features, |
const std::vector< FASTAFile::FASTAEntry > & | contaminants | ||
) |
Checks if the peptides are in the contaminant database.
"is_contaminant" metavalue is added to the first hit of each PeptideIdentification of each feature and to the first hit of all unsigned PeptideIdentifications. The enzyme and number of missed cleavages used to digest the given protein DB is taken from the ProteinIdentification[0].getSearchParameters() within the given FeatureMap.
features | Input FeatureMap with peptideidentifications of features |
contaminants | Vector of FASTAEntries that need to be digested to check whether a peptide is a contaminant or not |
Exception::MissingInformation | if the contaminants database is empty |
Exception::MissingInformation | if no enzyme is given |
Exception::MissingInformation | if proteinidentification of FeatureMap is empty |
const std::vector<Contaminants::ContaminantsSummary>& getResults | ( | ) |
returns results
|
overridevirtual |
Returns the input data requirements of the compute(...) function.
Implements QCBase.
|
private |
unordered set that contains the contaminant sequences
|
private |
name of the metric
|
private |
container that stores results