ProteoWizard
Classes | Namespaces | Macros | Variables
Peptide.hpp File Reference
#include "pwiz/utility/misc/Export.hpp"
#include "pwiz/utility/chemistry/Chemistry.hpp"
#include <boost/shared_ptr.hpp>
#include "Modification.hpp"

Go to the source code of this file.

Classes

class  pwiz::proteome::Peptide
 represents a peptide or polypeptide (a sequence of amino acids) More...
 
class  pwiz::proteome::Fragmentation
 provides fragment ion masses for a peptide More...
 

Namespaces

namespace  pwiz
 
namespace  pwiz::proteome
 

Macros

#define MODIFICATION_PARSING_ARGUMENTS
 

Variables

 ModificationParsing_Off
 
 ModificationParsing_ByFormula
 any non-AA characters will cause an exception
 
 ModificationParsing_ByMass
 oxidized P in peptide: PEP(O)TIDE
 
 ModificationDelimiter_Parentheses
 
 ModificationDelimiter_Brackets
 '(' and ')'
 

Macro Definition Documentation

◆ MODIFICATION_PARSING_ARGUMENTS

#define MODIFICATION_PARSING_ARGUMENTS
Value:
ModificationParsing mp = ModificationParsing_Off, \
ModificationDelimiter md = ModificationDelimiter_Parentheses
ModificationDelimiter_Parentheses
Definition Peptide.hpp:51
ModificationParsing_Off
Definition Peptide.hpp:42

Definition at line 56 of file Peptide.hpp.

62{
63 public:
64
65 Peptide(const std::string& sequence = "", MODIFICATION_PARSING_ARGUMENTS);
66 Peptide(const char* sequence, MODIFICATION_PARSING_ARGUMENTS);
67 Peptide(std::string::const_iterator begin, std::string::const_iterator end, MODIFICATION_PARSING_ARGUMENTS);
68 Peptide(const char* begin, const char* end, MODIFICATION_PARSING_ARGUMENTS);
69 Peptide(const Peptide&);
70 Peptide& operator=(const Peptide&);
71 virtual ~Peptide();
72
73 /// returns the sequence of amino acids making up the peptide
74 const std::string& sequence() const;
75
76 /// if modified = false: returns the composition formula of sequence()+water
77 /// if modified = true: returns the composition formula of sequence()+modifications()+water
78 /// throws an exception if modified = true and any modification has only mass information
79 chemistry::Formula formula(bool modified = false) const;
80
81 /// if charge = 0: returns neutral mass
82 /// if charge > 0: returns charged m/z
83 /// if modified = false: returns the monoisotopic mass of sequence()+water
84 /// if modified = true: returns the monoisotopic mass of sequence()+modifications()+water
85 double monoisotopicMass(int charge = 0, bool modified = true) const;
86
87 /// if charge = 0: returns neutral mass
88 /// if charge > 0: returns charged m/z
89 /// if modified = false: returns the molecular weight of sequence()+water
90 /// if modified = true: returns the molecular weight of sequence()+modifications()+water
91 double molecularWeight(int charge = 0, bool modified = true) const;
92
93 /// the map of sequence offsets (0-based) to modifications;
94 /// modifications can be added or removed from the peptide with this map
95 ModificationMap& modifications();
96
97 /// the map of sequence offsets (0-based) to modifications
98 const ModificationMap& modifications() const;
99
100 /// returns a fragmentation model for the peptide;
101 /// fragment masses can calculated as mono/avg and as modified/unmodified
102 Fragmentation fragmentation(bool monoisotopic = true, bool modified = true) const;
103
104 /// returns true iff peptide sequences and modifications are equal
105 bool operator==(const Peptide& rhs) const;
106
107 /// returns true iff this peptide has a lesser sequence length, sequence,
108 /// modifications length, or modifications
109 bool operator<(const Peptide& rhs) const;
110
111 private:
112 friend class ModificationMap; // allow ModificationMap to befriend Peptide::Impl
113 friend class Fragmentation;
114 class Impl;
115 boost::shared_ptr<Impl> impl_;
116};
117
118
119/// provides fragment ion masses for a peptide
120class PWIZ_API_DECL Fragmentation
121{
122 public:
123
124 Fragmentation(const Peptide& peptide,
125 bool monoisotopic,
126 bool modified);
127 Fragmentation(const Fragmentation&);
128 ~Fragmentation();
129
130 /// returns the a ion of length <length>;
131 /// example: a(1) returns the a1 ion
132 /// if <charge> = 0: returns neutral mass
133 /// if <charge> > 0: returns charged m/z
134 double a(size_t length, size_t charge = 0) const;
135
136 /// returns the b ion of length <length>
137 /// example: b(1) returns the b1 ion
138 /// if <charge> = 0: returns neutral mass
139 /// if <charge> > 0: returns charged m/z
140 double b(size_t length, size_t charge = 0) const;
141
142 /// returns the c ion of length <length>
143 /// example: c(1) returns the c1 ion
144 /// if <charge> = 0: returns neutral mass
145 /// if <charge> > 0: returns charged m/z
146 double c(size_t length, size_t charge = 0) const;
147
148 /// returns the x ion of length <length>
149 /// example: x(1) returns the x1 ion
150 /// if <charge> = 0: returns neutral mass
151 /// if <charge> > 0: returns charged m/z
152 double x(size_t length, size_t charge = 0) const;
153
154 /// returns the y ion of length <length>
155 /// example: y(1) returns the y1 ion
156 /// if <charge> = 0: returns neutral mass
157 /// if <charge> > 0: returns charged m/z
158 double y(size_t length, size_t charge = 0) const;
159
160 /// returns the z ion of length <length>
161 /// example: z(1) returns the z1 ion
162 /// if <charge> = 0: returns neutral mass
163 /// if <charge> > 0: returns charged m/z
164 double z(size_t length, size_t charge = 0) const;
165
166 /// returns the z radical ion of length <length>
167 /// example: zRadical(1) returns the z1* ion
168 /// if <charge> = 0: returns neutral mass
169 /// if <charge> > 0: returns charged m/z
170 double zRadical(size_t length, size_t charge = 0) const;
171
172 private:
173 class Impl;
174 boost::shared_ptr<Impl> impl_;
175};
176
177
178} // namespace proteome
179} // namespace pwiz
180
181
182// include here for user convenience
183#include "Modification.hpp"
184
185
186#endif // _PEPTIDE_HPP_
187
#define PWIZ_API_DECL
Definition Export.hpp:32
KernelTraitsBase< Kernel >::space_type::abscissa_type x
KernelTraitsBase< Kernel >::space_type::ordinate_type y
#define MODIFICATION_PARSING_ARGUMENTS
Definition Peptide.hpp:56
PWIZ_API_DECL const std::vector< Modification > & modifications()
the entire list of Unimod modifications
PWIZ_API_DECL bool operator==(const TruncatedLorentzianParameters &t, const TruncatedLorentzianParameters &u)

Variable Documentation

◆ ModificationParsing_Off

ModificationParsing_Off

Definition at line 42 of file Peptide.hpp.

Referenced by modificationTest().

◆ ModificationParsing_ByFormula

ModificationParsing_ByFormula

any non-AA characters will cause an exception

Definition at line 43 of file Peptide.hpp.

◆ ModificationParsing_ByMass

ModificationParsing_ByMass

oxidized P in peptide: PEP(O)TIDE

Definition at line 44 of file Peptide.hpp.

◆ ModificationDelimiter_Parentheses

ModificationDelimiter_Parentheses

Definition at line 51 of file Peptide.hpp.

◆ ModificationDelimiter_Brackets

ModificationDelimiter_Brackets

'(' and ')'

Definition at line 52 of file Peptide.hpp.