32 #include "../pappsoexception.h"
41 : msp_peptide(sp_peptide), m_direction(direction), m_size(size)
45 std::vector<Aa>::const_iterator it(
msp_peptide.get()->begin());
46 std::vector<Aa>::const_iterator end(
msp_peptide.get()->end());
59 std::vector<Aa>::const_reverse_iterator it(
msp_peptide.get()->rbegin());
60 std::vector<Aa>::const_reverse_iterator end(
msp_peptide.get()->rend());
76 : msp_peptide(other.msp_peptide),
77 m_direction(other.m_direction),
85 : msp_peptide(std::move(toCopy.msp_peptide)),
86 m_direction(toCopy.m_direction),
87 m_size(toCopy.m_size),
117 QString sequence =
msp_peptide.get()->getSequence();
121 sequence = sequence.mid(0,
m_size);
125 sequence = sequence.mid(diffSize,
m_size);
137 std::vector<Aa>::const_iterator it(
msp_peptide.get()->begin());
138 std::vector<Aa>::const_iterator end(
msp_peptide.get()->end());
142 number += it->getNumberOfAtom(atom);
149 std::vector<Aa>::const_reverse_iterator it(
msp_peptide.get()->rbegin());
150 std::vector<Aa>::const_reverse_iterator end(
msp_peptide.get()->rend());
154 number += it->getNumberOfAtom(atom);
170 std::vector<Aa>::const_iterator it(
msp_peptide.get()->begin());
171 std::vector<Aa>::const_iterator end(
msp_peptide.get()->end());
175 number += it->getNumberOfIsotope(isotope);
182 std::vector<Aa>::const_reverse_iterator it(
msp_peptide.get()->rbegin());
183 std::vector<Aa>::const_reverse_iterator end(
msp_peptide.get()->rend());
187 number += it->getNumberOfIsotope(isotope);
int getNumberOfAtom(AtomIsotopeSurvey atom) const override final
get the number of atom C, O, N, H in the molecule
pappso_double getMass() const
static AaModificationP getInstance(const QString &accession)
const unsigned int m_size
PeptideDirection getPeptideIonDirection() const
virtual pappso_double getMass() const override
virtual const QString getSequence() const override
amino acid sequence without modification
const PeptideSp msp_peptide
virtual int getNumberOfIsotope(Isotope isotope) const override
get the number of isotopes C13, H2, O17, O18, N15, S33, S34, S36 in the molecule
PeptideFragment(const PeptideSp &sp_peptide, PeptideDirection direction, unsigned int size)
AaModificationP m_nterCterCleavage
virtual const PeptideSp & getPeptideSp() const
static const QString getPeptideIonDirectionName(PeptideDirection direction)
virtual bool isPalindrome() const override
tells if the peptide sequence is a palindrome
virtual ~PeptideFragment()
virtual int getNumberOfAtom(AtomIsotopeSurvey atom) const override
get the number of atom C, O, N, H in the molecule
virtual unsigned int size() const override
const PeptideDirection m_direction
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
std::shared_ptr< const Peptide > PeptideSp
double pappso_double
A type definition for doubles.