ProteoWizard
Unimod.hpp
Go to the documentation of this file.
1//
2// $Id$
3//
4//
5// Original author: Matt Chambers <matt.chambers .@. vanderbilt.edu>
6//
7// Copyright 2011 Vanderbilt University - Nashville, TN 37232
8//
9// Licensed under the Apache License, Version 2.0 (the "License");
10// you may not use this file except in compliance with the License.
11// You may obtain a copy of the License at
12//
13// http://www.apache.org/licenses/LICENSE-2.0
14//
15// Unless required by applicable law or agreed to in writing, software
16// distributed under the License is distributed on an "AS IS" BASIS,
17// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18// See the License for the specific language governing permissions and
19// limitations under the License.
20//
21
22
23#ifndef _UNIMOD_HPP_
24#define _UNIMOD_HPP_
25
26
30#include "cv.hpp"
31#include <boost/enum.hpp>
32#include <boost/logic/tribool.hpp>
33
34
35namespace pwiz {
36namespace data {
37namespace unimod {
38
39using namespace cv;
40using namespace chemistry;
41using namespace boost::logic;
42
44 (Any)(1<<0)
45 (NTerminus)(1<<1)
46 (CTerminus)(1<<2)
47 (Alanine)(1<<3)
48 (Cysteine)(1<<4)
49 (AsparticAcid)(1<<5)
50 (GlutamicAcid)(1<<6)
51 (Phenylalanine)(1<<7)
52 (Glycine)(1<<8)
53 (Histidine)(1<<9)
54 (Isoleucine)(1<<10)
55 (Lysine)(1<<11)
56 (Leucine)(1<<12)
57 (Methionine)(1<<13)
58 (Asparagine)(1<<14)
59 (Proline)(1<<15)
60 (Glutamine)(1<<16)
61 (Arginine)(1<<17)
62 (Serine)(1<<18)
63 (Threonine)(1<<19)
64 (Selenocysteine)(1<<20)
65 (Valine)(1<<21)
66 (Tryptophan)(1<<22)
67 (Tyrosine)(1<<23)
68)
69BOOST_BITFIELD_DOMAIN_OPERATORS(Site)
70
71BOOST_ENUM_EX(Position, PWIZ_API_DECL,
72 (Anywhere)
73 (AnyNTerminus)
74 (AnyCTerminus)
76 (ProteinCTerminus)
77)
78BOOST_ENUM_DOMAIN_OPERATORS(Position)
79
81 (Any)(1<<0)
82 (Artifact)(1<<1)
83 (ChemicalDerivative)(1<<2)
84 (CoTranslational)(1<<3)
85 (IsotopicLabel)(1<<4)
86 (Multiple)(1<<5)
87 (NLinkedGlycosylation)(1<<6)
88 (NonStandardResidue)(1<<7)
89 (OLinkedGlycosylation)(1<<8)
90 (OtherGlycosylation)(1<<9)
91 (Other)(1<<10)
92 (PostTranslational)(1<<11)
93 (PreTranslational)(1<<12)
94 (Substitution)(1<<13)
95 (SynthPepProtectGP)(1<<14)
96)
97BOOST_BITFIELD_DOMAIN_OPERATORS(Classification)
98
99
100/// a modification from Unimod
102{
103 struct PWIZ_API_DECL Specificity
104 {
105 Site site;
106 Position position;
107 bool hidden;
108 Classification classification;
109 };
110
111 CVID cvid;
112 std::string name;
113 Formula deltaComposition;
114 double deltaMonoisotopicMass() const;
115 double deltaAverageMass() const;
116 bool approved;
117 std::vector<Specificity> specificities;
118};
119
120
121/// returns the Site given a one-letter residue code, or:
122/// 'x' for Site::Any, 'n' for Site::NTerminus, 'c' for Site::CTerminus
123PWIZ_API_DECL Site site(char symbol);
124
125
126/// returns a Position corresponding to one of the following CVIDs:
127/// CVID_Unknown: Position::Anywhere
128/// MS_modification_specificity_peptide_N_term: Position::AnyNTerminus
129/// MS_modification_specificity_peptide_C_term: Position::AnyCTerminus
130/// Else: invalid_argument exception
131PWIZ_API_DECL Position position(CVID cvid = CVID_Unknown);
132
133
134/// the entire list of Unimod modifications
135PWIZ_API_DECL const std::vector<Modification>& modifications();
136
137/// get a list of modifications by mass and tolerance;
138/// - mass is treated as monoisotopic if monoisotopic=true; if indeterminate, both average and monoisotopic lookups are done
139/// - if approved is not indeterminate, only approved/unapproved modifications are considered
140/// - the site, position, and classification parameters filter the resulting modifications such that
141/// every modification must have at least one specificity matching all three criteria;
142/// - if hidden is not indeterminate, matching site/position/classification specificities must be hidden (or not)
143PWIZ_API_DECL std::vector<Modification> modifications(double mass,
144 double tolerance,
145 tribool monoisotopic = true,
146 tribool approved = true,
147 Site site = Site::Any,
148 Position position = Position::Anywhere,
149 Classification classification = Classification::Any,
150 tribool hidden = indeterminate);
151
152/// find a modification by CVID
154
155/// find a modification by title, e.g. "Phospho" not "Phosphorylation"
156PWIZ_API_DECL const Modification& modification(const std::string& title);
157
158
159} // namespace unimod
160} // namespace data
161} // namespace pwiz
162
163
164#endif // _UNIMOD_HPP_
GlutamicAcid
Definition AminoAcid.hpp:48
Arginine
Definition AminoAcid.hpp:59
Selenocysteine
Definition AminoAcid.hpp:65
Alanine
Definition AminoAcid.hpp:45
Cysteine
Definition AminoAcid.hpp:46
Methionine
Definition AminoAcid.hpp:55
Lysine
Definition AminoAcid.hpp:53
Tryptophan
Definition AminoAcid.hpp:63
Glycine
Definition AminoAcid.hpp:50
Asparagine
Definition AminoAcid.hpp:56
Phenylalanine
Definition AminoAcid.hpp:49
Leucine
Definition AminoAcid.hpp:54
Glutamine
Definition AminoAcid.hpp:58
AsparticAcid
Definition AminoAcid.hpp:47
Histidine
Definition AminoAcid.hpp:51
Valine
Definition AminoAcid.hpp:62
Threonine
Definition AminoAcid.hpp:61
Tyrosine
Definition AminoAcid.hpp:64
Serine
Definition AminoAcid.hpp:60
Isoleucine
Definition AminoAcid.hpp:52
Proline
Definition AminoAcid.hpp:57
class to represent a chemical formula
represents a post-translational modification (PTM) modification formula or masses must be provided at...
CVID_Unknown
Definition cv.hpp:114
PWIZ_API_DECL const CV & cv(const std::string &prefix)
returns a CV object for the specified namespace (prefix); currently supported namespaces are: MS UO
PWIZ_API_DECL Site site(char symbol)
returns the Site given a one-letter residue code, or: 'x' for Site::Any, 'n' for Site::NTerminus,...
() Anywhere() AnyNTerminus() AnyCTerminus() ProteinNTerminus(ProteinCTerminus)) BOOST_BITFIELD_EX(Classification
PWIZ_API_DECL const std::vector< Modification > & modifications()
the entire list of Unimod modifications
() Anywhere() AnyNTerminus() AnyCTerminus()() Any(1<< 0)(Artifact)(1<< 1)(ChemicalDerivative)(1<< 2)(CoTranslational)(1<< 3)(IsotopicLabel)(1<< 4)(Multiple)(1<< 5)(NLinkedGlycosylation)(1<< 6)(NonStandardResidue)(1<< 7)(OLinkedGlycosylation)(1<< 8)(OtherGlycosylation)(1<< 9)(Other)(1<< 10)(PostTranslational)(1<< 11)(PreTranslational)(1<< 12)(Substitution)(1<< 13)(SynthPepProtectGP)(1<< 14)) struct PWIZ_API_DECL Modification
a modification from Unimod
Definition Unimod.hpp:81
BOOST_BITFIELD_EX(Site, PWIZ_API_DECL,(Any)(1<< 0)(NTerminus)(1<< 1)(CTerminus)(1<< 2)(Alanine)(1<< 3)(Cysteine)(1<< 4)(AsparticAcid)(1<< 5)(GlutamicAcid)(1<< 6)(Phenylalanine)(1<< 7)(Glycine)(1<< 8)(Histidine)(1<< 9)(Isoleucine)(1<< 10)(Lysine)(1<< 11)(Leucine)(1<< 12)(Methionine)(1<< 13)(Asparagine)(1<< 14)(Proline)(1<< 15)(Glutamine)(1<< 16)(Arginine)(1<< 17)(Serine)(1<< 18)(Threonine)(1<< 19)(Selenocysteine)(1<< 20)(Valine)(1<< 21)(Tryptophan)(1<< 22)(Tyrosine)(1<< 23)) BOOST_ENUM_EX(Position
PWIZ_API_DECL Position position(CVID cvid=CVID_Unknown)
returns a Position corresponding to one of the following CVIDs: CVID_Unknown: Position::Anywhere MS_m...
PWIZ_API_DECL const Modification & modification(CVID cvid)
find a modification by CVID