18#ifndef MS_QUANT_HELPER_HPP
19#define MS_QUANT_HELPER_HPP
26namespace msparser_internal {
27 typedef std::pair<char, int> modification_site_t;
28 typedef std::vector<modification_site_t> modification_sites_t;
29 typedef std::map<std::string, char> varmod_title_map_t;
32namespace matrix_science {
33 class ms_quant_method;
34 class ms_quant_localdef;
35 class ms_quant_unmodified;
37 class ms_peptidesummary;
39 class ms_ms1quant_match;
54 PEPTIDE_IS_QUANTIFIABLE = 0x0000,
55 PEPTIDE_HAS_NO_REQUIRED_FIXEDMOD = 0x0001,
56 PEPTIDE_HAS_NO_REQUIRED_VARMOD = 0x0002,
57 PEPTIDE_HAS_EXCLUDED_FIXEDMOD = 0x0010,
58 PEPTIDE_HAS_EXCLUDED_LOCAL_FIXEDMOD = 0x0011,
59 PEPTIDE_HAS_EXCLUDED_VARMOD = 0x0012,
60 PEPTIDE_HAS_UNMODIFIED_SITE = 0x0013,
61 PEPTIDE_HAS_EXCLUDED_LOCAL_VARMOD = 0x0014,
62 PEPTIDE_HAS_NO_EXCLUSIVE_MODS = 0x0015,
64 PEPTIDE_QUANTIFIABILITY_UNAVAILABLE = 0xf000
69 PEPTIDE_QUALITY_IS_OK = 0x0000,
70 PEPTIDE_CHARGE_BELOW_PRECURSOR_MIN = 0x0001,
71 PEPTIDE_SCORE_BELOW_SCORE_THR = 0x0002,
72 PEPTIDE_EXPECT_ABOVE_THRESHOLD = 0x0003,
73 PEPTIDE_SCORE_BELOW_IDENTITY_THR = 0x0004,
74 PEPTIDE_SCORE_BELOW_IDENTITY_THR_NOHOM = 0x0005,
75 PEPTIDE_SCORE_BELOW_HOMOLOGY_THR = 0x0006,
76 PEPTIDE_NOT_UNIQUE = 0x0007,
78 PEPTIDE_QUALITY_UNAVAILABLE = 0xf000
91 int isPeptideQuantifiable(
int q,
int p,
const ms_protein *protein,
int peptideIndex, std::string & reasonStrRef)
const;
94 int isPeptideQualityOK(
int q,
int p, std::string & reasonStrRef)
const;
96 int isPeptideQuantifiable(
int q,
int p,
const ms_protein *protein,
int peptideIndex, std::string & OUTPUT)
const;
97 int isPeptideQualityOK(
int q,
int p, std::string & OUTPUT)
const;
100 int testProteinTerminusExclusion(
int q,
int p,
const ms_protein *,
int peptideIndex, std::string & reason)
const;
106 int getFraction(
const int file_index)
const;
116 std::string * reason = 0 )
const;
124 std::string * reason = 0,
134 void applyComponentMods(
135 std::string * newVarMods,
136 std::string * newSummedMods,
138 const std::string & pepStr,
139 const std::string & labelFreeVarMods,
144 void applyComponentMods(
145 std::string * newVarMods,
146 std::string * newSummedMods,
149 const std::string & pepStr,
150 const std::string & labelFreeVarMods,
151 const std::string & sourceVarMods,
152 const std::string & sourceSummedMods,
157 char ModLetter(
const std::string & modName)
const;
162 const int this_file_index_;
163 std::map<int, int> indexToFraction_;
165 std::map<char, std::string> varModTitles_;
166 std::map<char, std::string> fixedModTitles_;
168 bool haveRequiredMods_;
169 std::string sortedRequiredFixedMods_;
170 std::string sortedRequiredVarMods_;
172 bool haveExclusions_;
173 bool haveProteinTerminusTest_;
175 bool initRequiredMods(
const ms_quant_modgroup *modgroup,
const ms_umod_configfile &umodfile,
const msparser_internal::varmod_title_map_t &varmod_title_map, std::set<char> &requiredFixedMods, std::set<char> &requiredVarMods);
178 int testRequiredMods(
const std::string &peptide_str,
const std::string &varmods_str, std::string & reason)
const;
180 int testFixedExclusions(
const std::string &peptide_str,
const std::string &varmods_str,
const ms_protein *protein,
int peptideIndex, std::string & reason)
const;
181 int testVariableExclusions(
const std::string &peptide_str,
const std::string &varmods_str,
const ms_protein *protein,
int peptideIndex, std::string & reason)
const;
183 bool requireUniquePeptide_;
184 int minPrecursorCharge_;
185 double ionsScoreThreshold_;
186 double expectationValueThreshold_;
187 bool mustPassIdentityThreshold_;
188 bool mustPassHomologyThreshold_;
189 bool isAverageProtocol_;
196 msparser_internal::modification_sites_t modsites;
203 msparser_internal::modification_sites_t modsites;
204 } variable_exclusion_t;
206 std::list<fixed_exclusion_t> fixedExclusions_;
207 std::list<variable_exclusion_t> variableExclusions_;
209 std::list< std::list<variable_exclusion_t> > qualityExclusions_;
211 bool initVariableExclusion(
const ms_quant_modgroup *modgroup,
const ms_umod_configfile &umodfile,
const msparser_internal::varmod_title_map_t &varmod_title_map, std::list<variable_exclusion_t> &variableExclusions);
214 bool peptideFitsExclusiveGroup(
const std::string &peptide_str,
const std::string &varmods_str)
const;
215 bool peptideFitsExclusiveGroupMods(
const std::string &peptide_str,
const std::string &varmods_str,
const std::list<variable_exclusion_t> &qualityExclusions)
const;
217 static bool mod_can_be_fixed(
char site,
int position);
218 static bool excluded_due_to_fixed_mod(
const std::string &peptide_str,
char site,
int position);
219 static bool excluded_due_to_variable_mod(
const std::string &peptide_str,
const std::string &varmods_str,
char site,
int position,
char varmod_id,
const ms_protein *protein,
int peptideIndex);
This class is used as a base class for several Mascot Parser classes.
Definition: ms_errors.hpp:696
QUANT_COMPONENT_STATUS
Return codes for getQuantitationComponentForPeptide().
Definition: ms_mascotresults.hpp:279
A peptide that has been matched, in quantitation, to a protein hit.
Definition: ms_ms1quant_match.hpp:47
peptideStatus
Status codes from fitting peptides.
Definition: ms_ms1quant_peptide_status.hpp:48
This class encapsulates a peptide from the mascot results file.
Definition: ms_peptide.hpp:57
Use this class to get peptide summary results.
Definition: ms_peptidesummary.hpp:51
This class encapsulates a protein in the mascot results file.
Definition: ms_protein.hpp:57
An object of this class represent a single component element in quantitation.xml.
Definition: ms_quant_component.hpp:48
Helper routines for peptide quantitation.
Definition: ms_quant_helper.hpp:50
PEPTIDE_QUANTIFIABILITY
Possible reasons a peptide is not quantifiable using a given quantitation method.
Definition: ms_quant_helper.hpp:53
PEPTIDE_QUALITY
Possible reasons why a peptide does not pass quality tests using a given quantitation method.
Definition: ms_quant_helper.hpp:68
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 modification group element in quantitation....
Definition: ms_quant_modgroup.hpp:46
This class represents the file unimod.xml.
Definition: ms_umod_configfile.hpp:54