Matrix Science Mascot Parser toolkit
 
Loading...
Searching...
No Matches
ms_proteinsummary.hpp
1/*
2##############################################################################
3# file: ms_mascotresproteinsum.cpp #
4# 'msparser' toolkit #
5# Encapsulates the protein summary report from the mascot results file #
6##############################################################################
7# COPYRIGHT NOTICE #
8# Copyright 1998-2002 Matrix Science Limited All Rights Reserved. #
9# #
10##############################################################################
11# $Archive:: /MowseBranches/ms_mascotresfile_1.2/include/ms_mascotrespr $ #
12# $Author: robertog@matrixscience.com $ #
13# $Date: 2024-08-29 17:08:49 +0100 $ #
14# $Revision: 5342f33ad8c8306230f6edda6c723ef3d3ff158b | MSPARSER_REL_3_0_0-2024-09-24-0-g93ebaeb4f4 $ #
15# $NoKeywords:: $ #
16##############################################################################
17*/
18
19#ifndef MS_MASCOTRESPROTEINSUM_HPP
20#define MS_MASCOTRESPROTEINSUM_HPP
21
22
23// Includes from the standard template library
24#include <string>
25
26namespace msparser_internal {
27 class ms_proteinsummarybase;
28}
29
30namespace matrix_science {
31 class ms_mascotresults_parameters;
32
44 class MS_MASCOTRESFILE_API ms_proteinsummary : public ms_mascotresults
45 {
46 public:
49 const unsigned int flags = ms_mascotresults::MSRES_GROUP_PROTEINS
50 | ms_mascotresults::MSRES_SHOW_SUBSETS,
51 double minProbability = 0.0,
52 int maxHitsToReport = 50,
53 const char * unigeneIndexFile = 0,
54 const char * singleHit = 0);
55
58 const ms_mascotresults_params & parameters);
59
60 virtual ~ms_proteinsummary() = default;
61
63 virtual ms_peptide getPeptide(const int q, const int p) const;
64
66 virtual double getIonsScore(const int q, const int p, const bool decoy) const;
67
69 virtual bool isPeptideUnique(const int q, const int p, const ms_mascotresults::UNIQUE_PEP_RULES rules = ms_mascotresults::UPR_DEFAULT) const;
70
72 virtual bool getPeptide(const int q, const int p, ms_peptide * & pep) const;
73
75 virtual std::string getProteinsWithThisPepMatch(const int q, const int p, const bool quotes=false);
76
78 virtual std::vector<std::string> getAllProteinsWithThisPepMatch(const int q, const int p,
79 std::vector<int> & start,
80 std::vector<int> & end,
81 std::vector<std::string> &pre,
82 std::vector<std::string> &post,
83 std::vector<int> & frame,
84 std::vector<int> & multiplicity,
85 std::vector<int> & db) const;
86
88 virtual std::vector<std::string> getAllProteinsWithThisPepMatch(const int q, const int p,
89 std::vector<int> & start,
90 std::vector<int> & end,
91 std::vector<std::string> &pre,
92 std::vector<std::string> &post,
93 std::vector<int> & frame,
94 std::vector<int> & multiplicity,
95 std::vector<int> & db,
96 std::vector<int> & psmComponent) const;
97
99 virtual int getAllFamilyMembersWithThisPepMatch(const int hit,
100 const int q,
101 const int p,
102 std::vector< int >& db,
103 std::vector< std::string >& acc,
104 std::vector< int >& dupe_status) const;
105
106
108 virtual std::string getErrTolModString(const int q, const int p) const;
109
111 virtual std::string getLibraryModString(const int q, const int p) const;
112
114 virtual std::string getErrTolModMasterString(const int q, const int p) const;
115
117 virtual std::string getErrTolModSlaveString(const int q, const int p) const;
118
120 virtual std::string getErrTolModPepString(const int q, const int p) const;
121
123 virtual std::string getErrTolModReqPepString(const int q, const int p) const;
124
126 virtual std::string getTagString(const int q, const int p) const;
127
129 virtual int getTagDeltaRangeStart(const int q, const int p) const;
130
132 virtual int getTagDeltaRangeEnd(const int q, const int p) const;
133
135 virtual std::string getTerminalResiduesString(const int q, const int p, const ms_peptide::PSM psmComponent = ms_peptide::PSM_COMPLETE) const;
136
138 virtual std::string getComponentString(const int q, const int p, const ms_peptide::PSM psmComponent = ms_peptide::PSM_COMPLETE) const;
139
141 virtual int getProteinScoreCutoff(double OneInXprobRnd) const;
142
144 int getNumPmfQueriesUsed() const;
145
147 bool isPmfQueryUsed(const int queryIdx) const;
148
150 virtual std::vector<int> getPepsWithSameScore(const int q, const int p) const;
151#ifndef SWIG
153 virtual bool getComponentIntensity(const int q, const int p, const std::string & componentName, double & value, double & rawValue) const;
154#else // SWIG Multiple return values
155 virtual bool getComponentIntensity(const int q, const int p, const std::string & componentName, double & OUTPUT, double & OUTPUT) const;
156#endif
158 virtual bool isValidQandP(const int q, const int h) const;
159
161 virtual ms_mascotresults::QUANT_COMPONENT_STATUS getQuantitationComponentForPeptide(
162 const matrix_science::ms_peptide & peptide,
164 const matrix_science::ms_quant_method * method = NULL) const;
165
166 protected:
167 // Not safe to copy or assign this object.
169#ifndef SWIG
170 ms_proteinsummary & operator=(const ms_proteinsummary & rhs);
171#endif
172
174 virtual int findProteins(const int startHit,
175 const std::string & str,
176 const int dbIdx,
179 std::vector<std::string> & accessions,
180 std::vector<int> & dbIndexes) const;
181
183 virtual int findProteinsByAccession(const int startHit,
184 const std::string & str,
185 const int dbIdx,
187 std::vector<std::string> & accessions,
188 std::vector<int> & dbIndexes) const;
189
191 virtual int findProteinsByDescription(const int startHit,
192 const std::string & str,
194 std::vector<std::string> & accessions,
195 std::vector<int> & dbIndexes) const;
196
198 virtual int findPeptides(const int startHit,
199 const std::string & str,
202 std::vector<int> & q,
203 std::vector<int> & p) const;
204
205 private:
206 std::shared_ptr<msparser_internal::ms_proteinsummarybase> iProtSum_;
207 }; // end of resfile_group
209} // matrix_science namespace
210
211#endif // MS_MASCOTRESPROTEINSUM_HPP
212
213/*------------------------------- End of File -------------------------------*/
Abstract base class of ms_mascotresfile_dat and ms_mascotresfile_msr.
Definition: ms_mascotresfilebase.hpp:72
Class which provides constructor parameters for either ms_peptidesummary or ms_proteinsummary.
Definition: ms_mascotresults_params.hpp:32
Abstract class for either ms_peptidesummary or ms_proteinsummary.
Definition: ms_mascotresults.hpp:83
FIND_COMPARE_FLAGS
Flags to specify how comparisons are performed in the find functions.
Definition: ms_mascotresults.hpp:189
UNIQUE_PEP_RULES
Flags for isPeptideUnique().
Definition: ms_mascotresults.hpp:360
FIND_FLAGS
Flags for findPeptides() and findProteins().
Definition: ms_mascotresults.hpp:146
QUANT_COMPONENT_STATUS
Return codes for getQuantitationComponentForPeptide().
Definition: ms_mascotresults.hpp:279
This class encapsulates a peptide from the mascot results file.
Definition: ms_peptide.hpp:57
PSM
Type of data to return from accessor methods.
Definition: ms_peptide.hpp:98
Definition: ms_proteinsummary.hpp:45
An object of this class represent a single component element in quantitation.xml.
Definition: ms_quant_component.hpp:48
An object of this class represent a single quantitation method from quantitation.xml.
Definition: ms_quant_method.hpp:51