OpenMS
2.8.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... | |
Public Member Functions inherited from QCBase | |
bool | isRunnable (const Status &s) const |
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 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... | |
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 contaminants |
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