libpappsomspp
Library for mass spectrometry
|
#include <peptide.h>
Public Member Functions | |
Peptide (const QString &pepstr) | |
virtual | ~Peptide () |
Peptide (const Peptide &peptide) | |
Peptide (Peptide &&toCopy) | |
PeptideSp | makePeptideSp () const |
NoConstPeptideSp | makeNoConstPeptideSp () const |
void | addAaModification (AaModificationP aaModification, unsigned int position) |
adds a modification to amino acid sequence More... | |
void | addAaModificationOnAllAminoAcid (AaModificationP aaModification, AminoAcidChar amino_acid) |
adds a modification to all amino acid of the sequence More... | |
std::vector< Aa >::iterator | begin () |
std::vector< Aa >::iterator | end () |
std::vector< Aa >::const_iterator | begin () const |
std::vector< Aa >::const_iterator | end () const |
std::vector< Aa >::const_reverse_iterator | rbegin () const |
std::vector< Aa >::const_reverse_iterator | rend () const |
Aa & | getAa (unsigned int position) |
const Aa & | getConstAa (unsigned int position) const |
pappso_double | getMass () |
pappso_double | getMass () const override |
virtual int | getNumberOfAtom (AtomIsotopeSurvey atom) const override |
get the number of atom C, O, N, H in the molecule More... | |
virtual int | getNumberOfIsotope (Isotope isotope) const override |
get the number of isotopes C13, H2, O17, O18, N15, S33, S34, S36 in the molecule More... | |
const QString | getSequence () const override |
print amino acid sequence without modifications More... | |
unsigned int | size () const override |
unsigned int | getNumberOfModification (AaModificationP mod) const |
count modification occurence More... | |
unsigned int | countModificationOnAa (AaModificationP mod, const std::vector< char > &aa_list) const |
count modification occurence More... | |
void | replaceAaModification (AaModificationP oldmod, AaModificationP newmod) |
replaces all occurences of a modification by a new one More... | |
void | removeAaModification (AaModificationP mod) |
removes all occurences of a modification More... | |
std::vector< unsigned int > | getModificationPositionList (AaModificationP mod) const |
get modification positions More... | |
std::vector< unsigned int > | getModificationPositionList (AaModificationP mod, const std::vector< char > &aa_list) const |
get modification positions More... | |
std::vector< unsigned int > | getAaPositionList (char aa) const |
get positions of one amino acid in peptide More... | |
std::vector< unsigned int > | getAaPositionList (std::list< char > list_aa) const |
const QString | toString () const |
print modification except internal modifications More... | |
const QString | toAbsoluteString () const |
print all modifications More... | |
const QString | getLiAbsoluteString () const |
get all sequence string with modifications and converting Leucine to Isoleucine More... | |
AaModificationP | getInternalNterModification () const |
AaModificationP | getInternalCterModification () const |
void | removeInternalNterModification () |
void | removeInternalCterModification () |
void | setInternalNterModification (AaModificationP mod) |
void | setInternalCterModification (AaModificationP mod) |
void | rotate () |
void | reverse () |
virtual bool | isPalindrome () const override |
tells if the peptide sequence is a palindrome More... | |
void | replaceLeucineIsoleucine () |
void | removeNterAminoAcid () |
void | removeCterAminoAcid () |
![]() | |
virtual const QString | getSequence () const =0 |
amino acid sequence without modification More... | |
virtual bool | isPalindrome () const =0 |
tells if the peptide sequence is a palindrome More... | |
virtual const QString | getSequenceLi () const |
amino acid sequence without modification where L are replaced by I More... | |
virtual unsigned int | size () const =0 |
virtual const QString | getName () const |
virtual const QString | getFormula (unsigned int charge) const final |
virtual bool | matchPeak (PrecisionPtr precision, pappso_double peak_mz, unsigned int charge) const final |
![]() | |
Ion () | |
~Ion () | |
virtual pappso_double | getMass () const =0 |
virtual pappso_double | getMz (unsigned int charge) const final |
virtual int | getNumberOfAtom (AtomIsotopeSurvey atom) const =0 |
get the number of atom C, O, N, H in the molecule More... | |
virtual int | getNumberOfIsotope (Isotope isotope) const =0 |
get the number of isotopes C13, H2, O17, O18, N15, S33, S34, S36 in the molecule More... | |
Protected Attributes | |
std::vector< Aa > | m_aaVec |
pappso_double | m_proxyMass = -1 |
Friends | |
bool | operator< (const Peptide &l, const Peptide &r) |
bool | operator== (const Peptide &l, const Peptide &r) |
pappso::Peptide::Peptide | ( | const QString & | pepstr | ) |
Definition at line 79 of file peptide.cpp.
References pappso::Aa::addAaModification(), pappso::AaModification::getInstance(), getMass(), and m_aaVec.
|
virtual |
Definition at line 108 of file peptide.cpp.
pappso::Peptide::Peptide | ( | const Peptide & | peptide | ) |
Definition at line 112 of file peptide.cpp.
pappso::Peptide::Peptide | ( | Peptide && | toCopy | ) |
Definition at line 118 of file peptide.cpp.
void pappso::Peptide::addAaModification | ( | AaModificationP | aaModification, |
unsigned int | position | ||
) |
adds a modification to amino acid sequence
aaModification | pointer on modification to add |
position | position in the amino acid sequence (starts at 0) |
Definition at line 187 of file peptide.cpp.
References getMass(), m_aaVec, m_proxyMass, and size().
Referenced by pappso::PeptideStrParser::parseStringToPeptide(), reverse(), rotate(), pappso::PeptideBuilder::setPeptide(), pappso::PeptideFixedModificationBuilder::setPeptideSp(), and pappso::PeptideVariableModificationBuilder::setPeptideSp().
void pappso::Peptide::addAaModificationOnAllAminoAcid | ( | AaModificationP | aaModification, |
AminoAcidChar | amino_acid | ||
) |
adds a modification to all amino acid of the sequence
aaModification | pointer on modification to add |
AminoAcidChar | amino_acid to apply the modification |
Definition at line 204 of file peptide.cpp.
References getMass(), and m_proxyMass.
std::vector< Aa >::iterator pappso::Peptide::begin | ( | ) |
Definition at line 138 of file peptide.cpp.
References m_aaVec.
Referenced by pappso::PeptideRawFragmentMasses::PeptideRawFragmentMasses().
std::vector< Aa >::const_iterator pappso::Peptide::begin | ( | ) | const |
Definition at line 150 of file peptide.cpp.
References m_aaVec.
unsigned int pappso::Peptide::countModificationOnAa | ( | AaModificationP | mod, |
const std::vector< char > & | aa_list | ||
) | const |
count modification occurence
mod | modification to look for |
aa_list | amino acid list targets (one letter code) |
Definition at line 333 of file peptide.cpp.
References m_aaVec.
std::vector< Aa >::iterator pappso::Peptide::end | ( | ) |
Definition at line 144 of file peptide.cpp.
References m_aaVec.
Referenced by pappso::PeptideRawFragmentMasses::PeptideRawFragmentMasses().
std::vector< Aa >::const_iterator pappso::Peptide::end | ( | ) | const |
Aa & pappso::Peptide::getAa | ( | unsigned int | position | ) |
Definition at line 602 of file peptide.cpp.
References m_aaVec.
Referenced by pappso::PeptideVariableModificationReplacement::replaceModificationsAtPosition().
std::vector< unsigned int > pappso::Peptide::getAaPositionList | ( | char | aa | ) | const |
get positions of one amino acid in peptide
aa | the one letter code of the amino acid |
Definition at line 427 of file peptide.cpp.
References m_aaVec.
Referenced by pappso::PeptideBuilder::setPeptide().
std::vector< unsigned int > pappso::Peptide::getAaPositionList | ( | std::list< char > | list_aa | ) | const |
Definition at line 444 of file peptide.cpp.
References m_aaVec.
const Aa & pappso::Peptide::getConstAa | ( | unsigned int | position | ) | const |
Definition at line 612 of file peptide.cpp.
References m_aaVec.
Referenced by pappso::PeptideModificatorBase::getModificationPositionList().
AaModificationP pappso::Peptide::getInternalCterModification | ( | ) | const |
Definition at line 478 of file peptide.cpp.
References m_aaVec.
Referenced by pappso::PeptideRawFragmentMasses::PeptideRawFragmentMasses(), removeCterAminoAcid(), reverse(), and rotate().
AaModificationP pappso::Peptide::getInternalNterModification | ( | ) | const |
Definition at line 467 of file peptide.cpp.
References m_aaVec.
Referenced by pappso::PeptideRawFragmentMasses::PeptideRawFragmentMasses(), removeNterAminoAcid(), reverse(), and rotate().
const QString pappso::Peptide::getLiAbsoluteString | ( | ) | const |
get all sequence string with modifications and converting Leucine to Isoleucine
Definition at line 247 of file peptide.cpp.
References m_aaVec.
pappso_double pappso::Peptide::getMass | ( | ) |
Definition at line 274 of file peptide.cpp.
References m_aaVec, and m_proxyMass.
Referenced by Peptide(), addAaModification(), addAaModificationOnAllAminoAcid(), pappso::Protein::getMass(), removeAaModification(), removeCterAminoAcid(), removeNterAminoAcid(), and replaceAaModification().
|
overridevirtual |
std::vector< unsigned int > pappso::Peptide::getModificationPositionList | ( | AaModificationP | mod | ) | const |
get modification positions
mod | modification to look for |
Definition at line 380 of file peptide.cpp.
References m_aaVec.
std::vector< unsigned int > pappso::Peptide::getModificationPositionList | ( | AaModificationP | mod, |
const std::vector< char > & | aa_list | ||
) | const |
get modification positions
mod | modification to look for |
aa_list | amino acid list targets (one letter code) |
Definition at line 401 of file peptide.cpp.
References m_aaVec.
|
overridevirtual |
get the number of atom C, O, N, H in the molecule
Implements pappso::AtomNumberInterface.
Definition at line 290 of file peptide.cpp.
References m_aaVec.
|
overridevirtual |
get the number of isotopes C13, H2, O17, O18, N15, S33, S34, S36 in the molecule
Implements pappso::AtomNumberInterface.
Definition at line 304 of file peptide.cpp.
References m_aaVec.
unsigned int pappso::Peptide::getNumberOfModification | ( | AaModificationP | mod | ) | const |
count modification occurence
mod | modification to look for |
Definition at line 319 of file peptide.cpp.
References m_aaVec.
|
overridevirtual |
print amino acid sequence without modifications
Implements pappso::PeptideInterface.
Definition at line 222 of file peptide.cpp.
References m_aaVec.
Referenced by pappso::XtandemHyperscoreBis::computeXtandemHyperscore(), and pappso::PeptideModificatorBase::getModificationPositionList().
|
overridevirtual |
tells if the peptide sequence is a palindrome
Implements pappso::PeptideInterface.
Definition at line 587 of file peptide.cpp.
NoConstPeptideSp pappso::Peptide::makeNoConstPeptideSp | ( | ) | const |
Definition at line 131 of file peptide.cpp.
Referenced by pappso::PeptideStrParser::parseNoConstString().
PeptideSp pappso::Peptide::makePeptideSp | ( | ) | const |
Definition at line 125 of file peptide.cpp.
Referenced by pappso::PeptideStrParser::parseString(), pappso::PeptideBuilder::setPeptide(), pappso::PeptideModificatorPipeline::setPeptide(), pappso::PeptideFixedModificationBuilder::setPeptideSp(), pappso::PeptideVariableModificationBuilder::setPeptideSp(), and pappso::PeptideVariableModificationReplacement::setPeptideSp().
std::vector< Aa >::const_reverse_iterator pappso::Peptide::rbegin | ( | ) | const |
Definition at line 162 of file peptide.cpp.
References m_aaVec.
Referenced by pappso::PeptideRawFragmentMasses::PeptideRawFragmentMasses().
void pappso::Peptide::removeAaModification | ( | AaModificationP | mod | ) |
removes all occurences of a modification
mod | modification to remove |
Definition at line 366 of file peptide.cpp.
References getMass(), m_aaVec, m_proxyMass, and toAbsoluteString().
void pappso::Peptide::removeCterAminoAcid | ( | ) |
Definition at line 660 of file peptide.cpp.
References getInternalCterModification(), getMass(), m_aaVec, and m_proxyMass.
void pappso::Peptide::removeInternalCterModification | ( | ) |
Definition at line 500 of file peptide.cpp.
References m_aaVec, and m_proxyMass.
Referenced by reverse(), rotate(), and setInternalCterModification().
void pappso::Peptide::removeInternalNterModification | ( | ) |
Definition at line 489 of file peptide.cpp.
References m_aaVec, and m_proxyMass.
Referenced by setInternalNterModification().
void pappso::Peptide::removeNterAminoAcid | ( | ) |
Definition at line 637 of file peptide.cpp.
References getInternalNterModification(), getMass(), m_aaVec, and m_proxyMass.
std::vector< Aa >::const_reverse_iterator pappso::Peptide::rend | ( | ) | const |
Definition at line 168 of file peptide.cpp.
References m_aaVec.
Referenced by pappso::PeptideRawFragmentMasses::PeptideRawFragmentMasses().
void pappso::Peptide::replaceAaModification | ( | AaModificationP | oldmod, |
AaModificationP | newmod | ||
) |
replaces all occurences of a modification by a new one
oldmod | modification to change |
newmod | new modification |
Definition at line 352 of file peptide.cpp.
References getMass(), m_aaVec, and m_proxyMass.
void pappso::Peptide::replaceLeucineIsoleucine | ( | ) |
Definition at line 624 of file peptide.cpp.
References m_aaVec.
void pappso::Peptide::reverse | ( | ) |
Definition at line 574 of file peptide.cpp.
References addAaModification(), getInternalCterModification(), getInternalNterModification(), m_aaVec, and removeInternalCterModification().
void pappso::Peptide::rotate | ( | ) |
Definition at line 562 of file peptide.cpp.
References addAaModification(), getInternalCterModification(), getInternalNterModification(), m_aaVec, and removeInternalCterModification().
void pappso::Peptide::setInternalCterModification | ( | AaModificationP | mod | ) |
Definition at line 537 of file peptide.cpp.
References pappso::AaModification::getAccession(), m_aaVec, and removeInternalCterModification().
Referenced by pappso::PeptideStrParser::parseStringToPeptide().
void pappso::Peptide::setInternalNterModification | ( | AaModificationP | mod | ) |
Definition at line 514 of file peptide.cpp.
References pappso::AaModification::getAccession(), m_aaVec, and removeInternalNterModification().
Referenced by pappso::PeptideStrParser::parseStringToPeptide().
|
overridevirtual |
Implements pappso::PeptideInterface.
Definition at line 182 of file peptide.cpp.
References m_aaVec.
Referenced by addAaModification(), isPalindrome(), and pappso::PeptideFixedModificationBuilder::setPeptideSp().
const QString pappso::Peptide::toAbsoluteString | ( | ) | const |
print all modifications
Definition at line 234 of file peptide.cpp.
References m_aaVec.
Referenced by removeAaModification().
const QString pappso::Peptide::toString | ( | ) | const |
print modification except internal modifications
Definition at line 261 of file peptide.cpp.
References m_aaVec.
|
protected |
Definition at line 102 of file peptide.h.
Referenced by Peptide(), addAaModification(), begin(), countModificationOnAa(), end(), getAa(), getAaPositionList(), getConstAa(), getInternalCterModification(), getInternalNterModification(), getLiAbsoluteString(), getMass(), getModificationPositionList(), getNumberOfAtom(), getNumberOfIsotope(), getNumberOfModification(), getSequence(), isPalindrome(), rbegin(), removeAaModification(), removeCterAminoAcid(), removeInternalCterModification(), removeInternalNterModification(), removeNterAminoAcid(), rend(), replaceAaModification(), replaceLeucineIsoleucine(), reverse(), rotate(), setInternalCterModification(), setInternalNterModification(), size(), toAbsoluteString(), and toString().
|
protected |
Definition at line 103 of file peptide.h.
Referenced by addAaModification(), addAaModificationOnAllAminoAcid(), getMass(), removeAaModification(), removeCterAminoAcid(), removeInternalCterModification(), removeInternalNterModification(), removeNterAminoAcid(), and replaceAaModification().