35 #include "../pappsoexception.h"
72 const std::list<PeptideIon> &
80 : msp_peptide(peptide), m_ionList(ions)
85 <<
"PeptideFragmentIonListBase::PeptideFragmentIonListBase begin "
87 std::list<PeptideFragmentSp> fragment_list =
94 for(
auto &&fragment_sp : fragment_list)
98 if(fragment_sp.get()->getPeptideIonDirection() ==
112 std::make_shared<PeptideFragmentIon>(fragment_sp,
117 if(phosphorylation_mod ==
nullptr)
119 phosphorylation_mod =
122 peptide.get()->getNumberOfModification(
123 phosphorylation_mod);
128 std::make_shared<PeptideFragmentIon>(
129 fragment_sp, ion_type, i + 1));
145 std::make_shared<PeptideFragmentIon>(fragment_sp,
150 if(phosphorylation_mod ==
nullptr)
152 phosphorylation_mod =
155 peptide.get()->getNumberOfModification(
156 phosphorylation_mod);
161 std::make_shared<PeptideFragmentIon>(
162 fragment_sp, ion_type, i + 1));
168 qDebug() <<
"PeptideFragmentIonListBase::PeptideFragmentIonListBase end "
175 "ERROR building PeptideFragmentIonListBase, PAPPSO exception:\n%1")
176 .arg(exception_pappso.
qwhat());
177 qDebug() <<
"PeptideFragmentIonListBase::PeptideFragmentIonListBase "
178 "PappsoException :\n"
182 catch(std::exception &exception_std)
186 "ERROR building PeptideFragmentIonListBase, std exception:\n%1")
187 .arg(exception_std.what());
188 qDebug() <<
"PeptideFragmentIonListBase::PeptideFragmentIonListBase "
197 : msp_peptide(other.msp_peptide),
198 msp_peptide_fragment_ion_list(other.msp_peptide_fragment_ion_list),
199 m_ionList(other.m_ionList),
200 m_phosphorylationNumber(other.m_phosphorylationNumber)
208 return std::make_shared<const PeptideFragmentIonListBase>(*
this);
216 const std::list<PeptideFragmentSp>
219 std::list<PeptideFragmentSp> peptide_fragment_list;
221 unsigned int max = peptide.get()->size() - 1;
222 for(
unsigned int i = 0; i <
max; i++)
225 peptide_fragment_list.push_back(std::make_shared<PeptideFragment>(
227 peptide_fragment_list.push_back(std::make_shared<PeptideFragment>(
230 return peptide_fragment_list;
233 const std::list<PeptideFragmentIonSp>
236 std::list<PeptideFragmentIonSp> ion_list;
239 if(peptide_fragment_ion_sp.get()->getPeptideIonType() == ion_type)
241 ion_list.push_back(peptide_fragment_ion_sp);
249 unsigned int size)
const
259 unsigned int number_of_neutral_phospho_loss)
const
263 if(peptide_fragment_ion_sp.get()->getPeptideIonType() == ion_type)
265 if(peptide_fragment_ion_sp.get()->size() ==
size)
267 if(peptide_fragment_ion_sp.get()
268 ->getNumberOfNeutralPhosphoLoss() ==
269 number_of_neutral_phospho_loss)
271 return (peptide_fragment_ion_sp);
277 throw PappsoException(QString(
"PeptideFragmentIon %1 of size %2 not found")
static AaModificationP getInstance(const QString &accession)
virtual const QString & qwhat() const
std::list< PeptideFragmentIonSp > msp_peptide_fragment_ion_list
const std::list< PeptideFragmentIonSp > getPeptideFragmentIonSp(PeptideIon ion_type) const
static std::list< PeptideIon > getETDionList()
PeptideFragmentIonListBaseSp makePeptideFragmentIonListBaseSp() const
virtual ~PeptideFragmentIonListBase()
PeptideFragmentIonListBase(const PeptideSp &peptide, const IonList &ions)
const std::list< PeptideIon > & getIonList() const
std::list< PeptideIon > IonList
unsigned int size() const
static const std::list< PeptideFragmentSp > getPeptideFragmentList(const PeptideSp &peptide)
unsigned int m_phosphorylationNumber
const PeptideSp msp_peptide
static std::list< PeptideIon > getCIDionList()
const QString getPeptideIonName() const
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
PeptideIon
PeptideIon enum defines all types of ions (Nter or Cter)
@ ystar
Cter amino ions + NH3 loss.
@ yo
Cter amino ions + H2O loss.
@ bstar
Nter acylium ions + NH3 loss.
@ bo
Nter acylium ions + H2O loss.
std::shared_ptr< const PeptideFragmentIon > PeptideFragmentIonSp
std::shared_ptr< const Peptide > PeptideSp
std::shared_ptr< const PeptideFragmentIonListBase > PeptideFragmentIonListBaseSp
@ max
maximum of intensities
fragmentation base object