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 | |
void | addAaModificationOnAllAminoAcid (AaModificationP aaModification, AminoAcidChar amino_acid) |
adds a modification to all amino acid of the sequence | |
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 | |
virtual int | getNumberOfIsotope (Isotope isotope) const override |
get the number of isotopes C13, H2, O17, O18, N15, S33, S34, S36 in the molecule | |
const QString | getSequence () const override |
print amino acid sequence without modifications | |
unsigned int | size () const override |
unsigned int | getNumberOfModification (AaModificationP mod) const |
count modification occurence | |
unsigned int | countModificationOnAa (AaModificationP mod, const std::vector< char > &aa_list) const |
count modification occurence | |
void | replaceAaModification (AaModificationP oldmod, AaModificationP newmod) |
replaces all occurences of a modification by a new one | |
void | removeAaModification (AaModificationP mod) |
removes all occurences of a modification | |
std::vector< unsigned int > | getModificationPositionList (AaModificationP mod) const |
get modification positions | |
std::vector< unsigned int > | getModificationPositionList (AaModificationP mod, const std::vector< char > &aa_list) const |
get modification positions | |
std::vector< unsigned int > | getAaPositionList (char aa) const |
get positions of one amino acid in peptide | |
std::vector< unsigned int > | getAaPositionList (std::list< char > list_aa) const |
const QString | toString () const |
print modification except internal modifications | |
const QString | toAbsoluteString () const |
print all modifications | |
const QString | getLiAbsoluteString () const |
get all sequence string with modifications and converting Leucine to Isoleucine | |
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 | |
void | replaceLeucineIsoleucine () |
void | removeNterAminoAcid () |
void | removeCterAminoAcid () |
QString | toProForma () const |
get the peptide model in ProForma notation https://github.com/HUPO-PSI/ProForma/blob/master/README.md | |
![]() | |
virtual const QString | getSequenceLi () const |
amino acid sequence without modification where L are replaced by I | |
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 | getMz (unsigned int charge) const final |
![]() |
Protected Attributes | |
std::vector< Aa > | m_aaVec |
pappso_double | m_proxyMass = -1 |
Friends | |
class | PeptideProFormaParser |
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 109 of file peptide.cpp.
pappso::Peptide::Peptide | ( | const Peptide & | peptide | ) |
Definition at line 113 of file peptide.cpp.
pappso::Peptide::Peptide | ( | Peptide && | toCopy | ) |
Definition at line 119 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 188 of file peptide.cpp.
References getMass(), m_aaVec, m_proxyMass, and size().
Referenced by pappso::PeptideStrParser::parseStringToPeptide(), 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 205 of file peptide.cpp.
References getMass(), and m_proxyMass.
std::vector< Aa >::iterator pappso::Peptide::begin | ( | ) |
Definition at line 139 of file peptide.cpp.
References m_aaVec.
Referenced by pappso::PeptideRawFragmentMasses::PeptideRawFragmentMasses().
std::vector< Aa >::const_iterator pappso::Peptide::begin | ( | ) | const |
Definition at line 151 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 334 of file peptide.cpp.
References m_aaVec.
std::vector< Aa >::iterator pappso::Peptide::end | ( | ) |
Definition at line 145 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 603 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 428 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 445 of file peptide.cpp.
References m_aaVec.
const Aa & pappso::Peptide::getConstAa | ( | unsigned int | position | ) | const |
Definition at line 613 of file peptide.cpp.
References m_aaVec.
Referenced by pappso::PeptideModificatorBase::getModificationPositionList().
AaModificationP pappso::Peptide::getInternalCterModification | ( | ) | const |
Definition at line 479 of file peptide.cpp.
References m_aaVec.
Referenced by pappso::specglob::PeptideModel::PeptideModel(), pappso::PeptideRawFragmentMasses::PeptideRawFragmentMasses(), removeCterAminoAcid(), reverse(), and rotate().
AaModificationP pappso::Peptide::getInternalNterModification | ( | ) | const |
Definition at line 468 of file peptide.cpp.
References m_aaVec.
Referenced by pappso::specglob::PeptideModel::PeptideModel(), 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 248 of file peptide.cpp.
References m_aaVec.
pappso_double pappso::Peptide::getMass | ( | ) |
Definition at line 275 of file peptide.cpp.
References m_aaVec, and m_proxyMass.
Referenced by Peptide(), addAaModification(), addAaModificationOnAllAminoAcid(), pappso::Protein::getMass(), pappso::PeptideProFormaParser::parseStringToPeptide(), removeAaModification(), removeCterAminoAcid(), removeNterAminoAcid(), replaceAaModification(), and pappso::PsmFeatures::setPeptideSpectrumCharge().
|
overridevirtual |
std::vector< unsigned int > pappso::Peptide::getModificationPositionList | ( | AaModificationP | mod | ) | const |
get modification positions
mod | modification to look for |
Definition at line 381 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 402 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 291 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 305 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 320 of file peptide.cpp.
References m_aaVec.
|
overridevirtual |
print amino acid sequence without modifications
Implements pappso::PeptideInterface.
Definition at line 223 of file peptide.cpp.
References m_aaVec.
Referenced by pappso::XtandemHyperscoreBis::computeXtandemHyperscore(), pappso::PeptideModificatorBase::getModificationPositionList(), and pappso::PeptideFixedModificationBuilder::setPeptideSp().
|
overridevirtual |
tells if the peptide sequence is a palindrome
Implements pappso::PeptideInterface.
Definition at line 588 of file peptide.cpp.
NoConstPeptideSp pappso::Peptide::makeNoConstPeptideSp | ( | ) | const |
Definition at line 132 of file peptide.cpp.
Referenced by pappso::PeptideProFormaParser::parseNoConstString(), and pappso::PeptideStrParser::parseNoConstString().
PeptideSp pappso::Peptide::makePeptideSp | ( | ) | const |
Definition at line 126 of file peptide.cpp.
Referenced by pappso::PeptideProFormaParser::parseString(), 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 163 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 367 of file peptide.cpp.
References getMass(), m_aaVec, m_proxyMass, and toAbsoluteString().
void pappso::Peptide::removeCterAminoAcid | ( | ) |
Definition at line 661 of file peptide.cpp.
References getInternalCterModification(), getMass(), m_aaVec, and m_proxyMass.
void pappso::Peptide::removeInternalCterModification | ( | ) |
Definition at line 501 of file peptide.cpp.
References m_aaVec, and m_proxyMass.
Referenced by setInternalCterModification().
void pappso::Peptide::removeInternalNterModification | ( | ) |
Definition at line 490 of file peptide.cpp.
References m_aaVec, and m_proxyMass.
Referenced by setInternalNterModification().
void pappso::Peptide::removeNterAminoAcid | ( | ) |
Definition at line 638 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 169 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 353 of file peptide.cpp.
References getMass(), m_aaVec, and m_proxyMass.
void pappso::Peptide::replaceLeucineIsoleucine | ( | ) |
Definition at line 625 of file peptide.cpp.
References m_aaVec.
void pappso::Peptide::reverse | ( | ) |
Definition at line 575 of file peptide.cpp.
References getInternalCterModification(), getInternalNterModification(), and m_aaVec.
void pappso::Peptide::rotate | ( | ) |
Definition at line 563 of file peptide.cpp.
References getInternalCterModification(), getInternalNterModification(), and m_aaVec.
void pappso::Peptide::setInternalCterModification | ( | AaModificationP | mod | ) |
Definition at line 538 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 515 of file peptide.cpp.
References pappso::AaModification::getAccession(), m_aaVec, and removeInternalNterModification().
Referenced by pappso::PeptideStrParser::parseStringToPeptide().
|
overridevirtual |
Implements pappso::PeptideInterface.
Definition at line 183 of file peptide.cpp.
References m_aaVec.
Referenced by pappso::IonIsotopeRatioScore::IonIsotopeRatioScore(), addAaModification(), pappso::PsmFeatures::findComplementIonPairs(), isPalindrome(), pappso::PeptideProFormaParser::parseStringToPeptide(), and pappso::PeptideFixedModificationBuilder::setPeptideSp().
const QString pappso::Peptide::toAbsoluteString | ( | ) | const |
print all modifications
Definition at line 235 of file peptide.cpp.
References m_aaVec.
Referenced by removeAaModification().
QString pappso::Peptide::toProForma | ( | ) | const |
get the peptide model in ProForma notation https://github.com/HUPO-PSI/ProForma/blob/master/README.md
Definition at line 685 of file peptide.cpp.
References m_aaVec.
const QString pappso::Peptide::toString | ( | ) | const |
print modification except internal modifications
Definition at line 262 of file peptide.cpp.
References m_aaVec.
|
friend |
|
protected |
Definition at line 244 of file peptide.h.
Referenced by Peptide(), addAaModification(), begin(), begin(), countModificationOnAa(), end(), end(), getAa(), getAaPositionList(), getAaPositionList(), getConstAa(), getInternalCterModification(), getInternalNterModification(), getLiAbsoluteString(), getMass(), getModificationPositionList(), getModificationPositionList(), getNumberOfAtom(), getNumberOfIsotope(), getNumberOfModification(), getSequence(), isPalindrome(), pappso::PeptideProFormaParser::parseStringToPeptide(), rbegin(), removeAaModification(), removeCterAminoAcid(), removeInternalCterModification(), removeInternalNterModification(), removeNterAminoAcid(), rend(), replaceAaModification(), replaceLeucineIsoleucine(), reverse(), rotate(), setInternalCterModification(), setInternalNterModification(), size(), toAbsoluteString(), toProForma(), and toString().
|
protected |
Definition at line 245 of file peptide.h.
Referenced by addAaModification(), addAaModificationOnAllAminoAcid(), getMass(), getMass(), pappso::PeptideProFormaParser::parseStringToPeptide(), removeAaModification(), removeCterAminoAcid(), removeInternalCterModification(), removeInternalNterModification(), removeNterAminoAcid(), and replaceAaModification().