28#include "../pappsoexception.h"
33PeptideModificatorPipeline::PeptideModificatorPipeline()
41 QObject::tr(
"unable to copy PeptideModificatorPipeline object"));
84 "Please use setSink before addLabeledModificationString function"));
101 const QString &mod_str)
107 const QString &mod_str)
114 const QString &mod_str,
bool Nter,
bool Cter,
bool else_prot)
120 QObject::tr(
"Unable to add fixed modification string after "
121 "addLabeledModificationString function"));
123 QStringList mod_list_str =
124 mod_str.simplified().replace(
" ",
"").split(
",", Qt::SkipEmptyParts);
125 for(
auto i = 0; i < mod_list_str.size(); ++i)
139 QStringList str_split = mod_str.split(
"@", Qt::SkipEmptyParts);
166 const QString &mod_str)
173 const QString &mod_str)
180 const QString &mod_str)
187 const QString &mod_str,
bool Nter,
bool Cter,
bool else_prot)
193 QObject::tr(
"Unable to add potential modification string after "
194 "addLabeledModificationString function"));
197 QStringList mod_list_str =
198 mod_str.simplified().replace(
" ",
"").split(
",", Qt::SkipEmptyParts);
199 for(
auto i = 0; i < mod_list_str.size(); ++i)
213 QStringList str_split = mod_str.split(
"@", Qt::SkipEmptyParts);
215 QString mod_acc_str = str_split[0];
216 QStringList str_acc_split = mod_acc_str.split(
"(", Qt::SkipEmptyParts);
224 if(str_acc_split.length() == 2)
226 QStringList max_num_str_list =
227 str_acc_split[1].replace(
")",
"").split(
"-", Qt::SkipEmptyParts);
228 if(max_num_str_list.length() == 1)
232 else if(max_num_str_list.length() == 2)
265 "Please use setSink before addLabeledModificationString function"));
285 QStringList mod_list_str =
286 mod_str.simplified().replace(
" ",
"").split(
",", Qt::SkipEmptyParts);
287 for(
auto i = 0; i < mod_list_str.size(); ++i)
312 QStringList str_split = mod_str.split(
"@", Qt::SkipEmptyParts);
338 unsigned int missed_cleavage_number,
349 missed_cleavage_number,
360 missed_cleavage_number,
370 const QString &peptide_str,
373 unsigned int missed_cleavage_number,
377 qDebug() <<
"PeptideModificatorPipeline::setPeptide begin";
383 qDebug() <<
"PeptideModificatorPipeline::setPeptide m_sink->setPeptideSp";
390 missed_cleavage_number,
392 qDebug() <<
"PeptideModificatorPipeline::setPeptide end";
static AaModificationP getInstance(const QString &accession)
void setProtElse(bool arg1)
this modification concerns all peptides between Nter and Cter
void setProtCter(bool arg1)
this modification concerns the Cter peptide
void setSink(PeptideModificatorInterface *sink) override
void setProtNter(bool arg1)
this modification concerns the Nter peptide
virtual void setModificationPattern(QString &pattern) final
set the pattern on which the modification will be applied (usually the list of concerned AA)
virtual void setPeptideSp(std::int8_t sequence_database_id, const ProteinSp &protein_sp, bool is_decoy, const PeptideSp &peptide_sp, unsigned int start, bool is_nter, unsigned int missed_cleavage_number, bool semi_enzyme)=0
function to give the products of modifications for a digested peptide
PeptideModificatorInterface * m_sink
void addFixedNterModificationString(const QString &mod_str)
PeptideModificatorPipeline()
void addPotentialCterModificationString(const QString &mod_str)
void parsePotentialModification(const QString &mod_str, bool Nter, bool Cter, bool else_prot)
void addLabeledModificationString(const QString &mod_str)
virtual ~PeptideModificatorPipeline()
void setSink(PeptideModificatorInterface *sink) override
void parseLabeledModification(const QString &mod_str, bool Nter, bool Cter, bool else_prot)
void privAddFixedModificationString(const QString &mod_str, bool Nter, bool Cter, bool else_prot)
void privAddPotentialModificationString(const QString &mod_str, bool Nter, bool Cter, bool else_prot)
void setPeptideSp(std::int8_t sequence_database_id, const ProteinSp &protein_sp, bool is_decoy, const PeptideSp &peptide_sp_original, unsigned int start, bool is_nter, unsigned int missed_cleavage_number, bool semi_enzyme) override
function to give the products of modifications for a digested peptide
void addFixedModificationString(const QString &mod_str)
std::vector< PeptideModificatorInterface * > m_pepModificatorPtrList
PeptideModificatorInterface * mp_firstModificator
void setPeptide(std::int8_t sequence_database_id, const ProteinSp &protein_sp, bool is_decoy, const QString &peptide_str, unsigned int start, bool is_nter, unsigned int missed_cleavage_number, bool semi_enzyme) override
function to give the products of a protein digestion by an enzyme
PeptideSpSinkInterface * mp_lastPeptideSinkInterface
PeptideModificatorTee * mp_peptideModificatorTee
void addFixedCterModificationString(const QString &mod_str)
void addPotentialNterModificationString(const QString &mod_str)
void addPotentialModificationString(const QString &mod_str)
void parseFixedModification(const QString &mod_str, bool Nter, bool Cter, bool else_prot)
void addModificator(PeptideModificatorInterface *p_peptide_mod)
virtual void setSink(PeptideModificatorInterface *sink)=0
Modify a peptide shared pointer with a variable modification on one AA.
void setSink(PeptideModificatorInterface *sink) override
void setMinNumberMod(unsigned int min_num)
void setMaxNumberMod(unsigned int max_num)
void setModificationCounter(unsigned int counter)
void setProtNter(bool arg1)
this modification concerns the Nter peptide
void setProtElse(bool arg1)
this modification concerns all peptides between Nter and Cter
void setProtCter(bool arg1)
this modification concerns the Cter peptide
PeptideSp makePeptideSp() const
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
std::shared_ptr< const Peptide > PeptideSp
std::shared_ptr< const Protein > ProteinSp
shared pointer on a Protein object