25#ifndef _DIGESTION_HPP_
26#define _DIGESTION_HPP_
33#include "boost/shared_ptr.hpp"
55 std::string::const_iterator end,
57 size_t missedCleavages,
58 bool NTerminusIsSpecific,
59 bool CTerminusIsSpecific,
60 std::string NTerminusPrefix =
"",
61 std::string CTerminusSuffix =
"");
65 size_t missedCleavages,
66 bool NTerminusIsSpecific,
67 bool CTerminusIsSpecific,
68 std::string NTerminusPrefix =
"",
69 std::string CTerminusSuffix =
"");
139 Config(
int maximumMissedCleavages = 100000,
142 int minimumLength = 0,
143 int maximumLength = 100000,
144 Specificity minimumSpecificity = FullySpecific,
145 bool clipNTerminalMethionine =
true);
177 const std::vector<CVID>& cleavageAgents,
186 const std::string& cleavageAgentRegex,
195 const std::vector<std::string>& cleavageAgentRegexes,
242 friend class Digestion::Impl;
255 friend class const_iterator::Impl;
SemiSpecific
neither termini must match digestion motif(s)
peptide subclass that contains extra metadata provided by digestion
virtual ~DigestedPeptide()
DigestedPeptide(const std::string &sequence)
DigestedPeptide & operator=(const DigestedPeptide &)
bool operator==(const DigestedPeptide &rhs) const
returns true iff peptide sequences, masses, and all digestion metadata are equal
bool CTerminusIsSpecific() const
returns true iff the C terminus matched the digestion rules
std::string NTerminusPrefix_
bool CTerminusIsSpecific_
bool NTerminusIsSpecific_
std::string CTerminusSuffix_
size_t offset() const
returns the zero-based offset of the N terminus of the peptide in the polypeptide from which it was d...
bool NTerminusIsSpecific() const
returns true iff the N terminus matched the digestion rules
DigestedPeptide(const char *sequence)
std::string CTerminusSuffix() const
returns residue following digestion site
DigestedPeptide(const Peptide &peptide, size_t offset, size_t missedCleavages, bool NTerminusIsSpecific, bool CTerminusIsSpecific, std::string NTerminusPrefix="", std::string CTerminusSuffix="")
size_t missedCleavages() const
returns the number of missed cleavage sites in the peptide
DigestedPeptide(std::string::const_iterator begin, std::string::const_iterator end, size_t offset, size_t missedCleavages, bool NTerminusIsSpecific, bool CTerminusIsSpecific, std::string NTerminusPrefix="", std::string CTerminusSuffix="")
DigestedPeptide(const DigestedPeptide &)
std::string NTerminusPrefix() const
returns residue preceding digestion site
size_t specificTermini() const
returns the number of termini that matched to the digestion rules
provides forward-only, read-only iteration to enumerate peptides
const_iterator operator++(int)
DigestedPeptide value_type
const_iterator(const const_iterator &rhs)
bool operator!=(const const_iterator &that) const
const DigestedPeptide & operator*() const
boost::shared_ptr< Impl > impl_
const_iterator & operator++()
const DigestedPeptide * operator->() const
const_iterator(const Digestion &digestion)
std::forward_iterator_tag iterator_category
bool operator==(const const_iterator &that) const
enumerates the peptides from proteolytic digestion of a polypeptide or protein;
static CVID getCleavageAgentByRegex(const std::string &agentRegex)
returns the cvid of the specified cleavage agent looking it up by the Perl regular expression,...
Digestion(const Peptide &polypeptide, CVID cleavageAgent, const Config &config=Config())
specifies digestion occurs by a commonly used cleavage agent
static CVID getCleavageAgentByName(const std::string &agentName)
returns the cvid of the specified cleavage agent using a case-insensitive search, or CVID_Unknown if ...
Digestion(const Peptide &polypeptide, const std::vector< std::string > &cleavageAgentRegexes, const Config &config=Config())
specifies digestion occurs by a combination of user-specified, zero-width Perl regular expressions ex...
std::vector< DigestedPeptide > find_all(const Peptide &peptide) const
returns all instances of the given peptide in the polypeptide under digestion; note: the filters set ...
boost::shared_ptr< Impl > impl_
const_iterator begin() const
DigestedPeptide find_first(const Peptide &peptide, size_t offsetHint=0) const
returns the first instance of the given peptide in the polypeptide under digestion; if offsetHint is ...
static const std::set< CVID > & getCleavageAgents()
returns the set of predefined cleavage agents defined in the PSI-MS CV
static const std::vector< std::string > & getCleavageAgentNames()
returns the names of the set of predefined cleavage agents defined in the PSI-MS CV
Digestion(const Peptide &polypeptide, const std::vector< CVID > &cleavageAgents, const Config &config=Config())
specifies digestion occurs by a combination of commonly used cleavage agents
const_iterator end() const
static std::string disambiguateCleavageAgentRegex(const std::string &cleavageAgentRegex)
returns a modified version of a cleavage agent regex where any ambiguous AA symbols (BJXZ) are augmen...
Digestion(const Peptide &polypeptide, const std::string &cleavageAgentRegex, const Config &config=Config())
specifies digestion occurs by a user-specified, zero-width Perl regular expression example: "(?...
static const std::string & getCleavageAgentRegex(CVID agentCvid)
returns the official PSI Perl regular expression defining the places in a polypeptide or protein that...
represents a peptide or polypeptide (a sequence of amino acids)
sets constraints for valid peptides produced by iterating the digestion
Config(int maximumMissedCleavages=100000, int minimumLength=0, int maximumLength=100000, Specificity minimumSpecificity=FullySpecific, bool clipNTerminalMethionine=true)
int maximumMissedCleavages
Specificity minimumSpecificity
bool clipNTerminalMethionine