18#ifndef MS_CUSTOMQUANTITATION_HPP
19#define MS_CUSTOMQUANTITATION_HPP
27namespace msparser_internal {
28 struct peptide_ratio_data_t;
31namespace matrix_science {
32 class ms_peptide_quant_ratio;
33 class ms_quantitation;
34 class ms_peptidesummary;
35 class ms_ms2quantitation;
37 class ms_peptide_quant_key;
38 class ms_peptide_quant_key_vector;
39 class ms_quant_average;
136 virtual bool hasPeptideRatio(
const ms_peptide_quant_key &key,
const std::string &ratioName)
const;
139 virtual bool isPeptideRatioExcluded(
const ms_peptide_quant_key &key,
const std::string &ratioName)
const;
140 virtual void setPeptideRatioIncluded(
const ms_peptide_quant_key &key,
const std::string &ratioName);
141 virtual void setPeptideRatioExcluded(
const ms_peptide_quant_key &key,
const std::string &ratioName);
143 virtual void setProteinRatioType(
const char *value);
147 virtual ms_protein_quant_ratio getProteinRatio(
const std::string &accession,
int dbIdx,
const std::string &ratioName)
const;
158 void clearPeptideRatios();
161 void addPeptideQuantKey(
const std::string &accession,
int dbIdx,
const ms_peptide_quant_key &key);
164 void addPeptideQuantKeys(
const std::string &accession,
int dbIdx,
const std::vector<ms_peptide_quant_key> &keys);
170 void removePeptideQuantKey(
const std::string &accession,
int dbIdx,
const ms_peptide_quant_key &key);
173 void clearPeptideQuantKeys(
const std::string &accession,
int dbIdx);
176 double getUnnormalisedAveragePeptideRatio(
const std::string &ratioName,
const std::string &averageType)
const;
179 double getUnnormalisedAveragePeptideRatio(
const std::string &ratioName,
const std::string &averageType,
const ms_peptide_quant_key_vector &keys)
const;
182 double getUnnormalisedAveragePeptideRatio(
const std::string &ratioName,
const std::string &averageType,
const std::string &accession,
int dbIdx)
const;
185 virtual void getSortedFinitePeptideRatioValues(
const std::string &ratioName,
const std::set<ms_peptide_quant_key> &keys,
const std::set<ms_peptide_quant_key> &includeKeys,
const std::set<ms_peptide_quant_key> &excludeKEys, std::vector<double> &values, std::vector<double> &weights, std::vector<ms_peptide_quant_key> &activeKeys, std::map<ms_peptide_quant_key, int> &inactiveKeys)
const;
194 typedef std::string ratio_name_t;
196 typedef std::map< ms_peptide_quant_key, msparser_internal::peptide_ratio_data_t* > peptide_quant_key_to_ratio_pointer_t;
197 typedef std::multimap< msparser_internal::peptide_ratio_data_t*, ms_peptide_quant_key > ratio_pointer_to_peptide_quant_key_t;
199 typedef std::map< ratio_name_t, peptide_quant_key_to_ratio_pointer_t > ratio_name_to_peptide_quant_key_map_t;
200 typedef std::map< ratio_name_t, ratio_pointer_to_peptide_quant_key_t > ratio_name_to_pointer_map_t;
202 bool lookupPeptideRatioNondestructive(
const ms_peptide_quant_key &key,
const std::string &ratioName, peptide_quant_key_to_ratio_pointer_t **qpmap, msparser_internal::peptide_ratio_data_t **rp);
203 bool lookupPeptideRatioNondestructive(
const ms_peptide_quant_key &key,
const std::string &ratioName,
const peptide_quant_key_to_ratio_pointer_t **qpmap = NULL,
const msparser_internal::peptide_ratio_data_t **rp = NULL)
const;
206 msparser_internal::peptide_ratio_data_t* insertPeptideRatio(
const std::string &ratioName,
bool isMissing,
const ms_peptide_quant_key &key,
bool isInfinite,
bool isExcluded,
double value,
double weight);
209 void deallocatePeptideRatios();
211 double calculateAverageRatio(
const std::vector<double> &values,
const std::string &kind)
const;
213 std::set< msparser_internal::peptide_ratio_data_t* > peptideRatioPool_;
214 ratio_name_to_peptide_quant_key_map_t ratioNameToPeptideQuantKeyMap_;
215 ratio_name_to_pointer_map_t ratioNameToPointerMap_;
217 enum SUPPORTED_PROTEIN_RATIO_TYPE {
218 PROTEIN_RATIO_TYPE_MEDIAN = 0,
219 PROTEIN_RATIO_TYPE_AVERAGE,
220 PROTEIN_RATIO_TYPE_WEIGHTED
223 int proteinRatioType_;
Peptide and protein quantitation using custom peptide ratios and protein-peptide mappings.
Definition: ms_customquantitation.hpp:119
Peptide and protein quantitation in a Reporter or Multiplex Mascot results file.
Definition: ms_ms2quantitation.hpp:127
A vector of peptide quant keys.
Definition: ms_peptide_quant_key_vector.hpp:47
Feature key identifying a peptide ratio.
Definition: ms_peptide_quant_key.hpp:69
Peptide abundance in one component relative to another in a quantitation experiment.
Definition: ms_peptide_quant_ratio.hpp:61
Use this class to get peptide summary results.
Definition: ms_peptidesummary.hpp:51
Protein abundance in one component relative to another in a quantitation experiment,...
Definition: ms_protein_quant_ratio.hpp:72
This class encapsulates a protein in the mascot results file.
Definition: ms_protein.hpp:57
An object of this class represent a single quantitation method from quantitation.xml.
Definition: ms_quant_method.hpp:51
An object of this class represent a single OUTLIERS element in quantitation.xml.
Definition: ms_quant_outliers.hpp:44
Base class for peptide and protein quantitation.
Definition: ms_quantitation.hpp:138