31 const std::vector<unsigned int>::iterator first,
32 std::vector<unsigned int>::iterator k,
33 const std::vector<unsigned int>::iterator last)
36 if((first ==
last) || (first == k) || (
last == k))
38 std::vector<unsigned int>::iterator i1 = first;
39 std::vector<unsigned int>::iterator i2 =
last;
51 std::vector<unsigned int>::iterator j = k;
54 std::iter_swap(i1, j);
58 std::rotate(i1, j,
last);
64 std::rotate(k, i2,
last);
68 std::rotate(first, k,
last);
93 std::int8_t sequence_database_id,
99 unsigned int missed_cleavage_number,
106 bool modify_this_peptide =
true;
109 modify_this_peptide =
false;
113 modify_this_peptide =
true;
116 (protein_sp.get()->size() ==
117 (start + peptide_sp_original.get()->size())))
120 modify_this_peptide =
true;
124 modify_this_peptide =
true;
128 if(modify_this_peptide)
131 std::vector<unsigned int> position_list;
148 missed_cleavage_number,
152 unsigned int nb_pos = position_list.size();
156 unsigned int comb_size = 1;
163 Peptide new_peptide(*(peptide_sp_original.get()));
164 for(
unsigned int i = 0; i < comb_size; i++)
175 missed_cleavage_number,
179 position_list.begin() + comb_size,
180 position_list.end()));
187 Peptide new_peptide(*(peptide_sp_original.get()));
188 for(
unsigned int i = 0; i < nb_pos; i++)
199 missed_cleavage_number,
213 missed_cleavage_number,
QRegularExpression m_pattern
virtual void getModificationPositionList(std::vector< unsigned int > &position_list, const QString &peptide_str) final
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
unsigned int m_maxNumberMod
PeptideModificatorInterface * m_sink
unsigned int m_modificationCount
virtual ~PeptideVariableModificationBuilder()
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
static bool next_combination(const std::vector< unsigned int >::iterator first, std::vector< unsigned int >::iterator k, const std::vector< unsigned int >::iterator last)
QString m_aaModificationList
unsigned int m_minNumberMod
PeptideVariableModificationBuilder(AaModificationP mod)
PeptideSp makePeptideSp() const
void addAaModification(AaModificationP aaModification, unsigned int position)
adds a modification to amino acid sequence
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