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);
97 unsigned int missed_cleavage_number,
104 bool modify_this_peptide =
true;
107 modify_this_peptide =
false;
111 modify_this_peptide =
true;
114 (protein_sp.get()->size() == (start + peptide_sp_original.get()->size())))
117 modify_this_peptide =
true;
121 modify_this_peptide =
true;
125 if(modify_this_peptide)
128 std::vector<unsigned int> position_list;
145 missed_cleavage_number,
149 unsigned int nb_pos = position_list.size();
153 unsigned int comb_size = 1;
160 Peptide new_peptide(*(peptide_sp_original.get()));
161 for(
unsigned int i = 0; i < comb_size; i++)
172 missed_cleavage_number,
176 position_list.begin(), position_list.begin() + comb_size, position_list.end()));
183 Peptide new_peptide(*(peptide_sp_original.get()));
184 for(
unsigned int i = 0; i < nb_pos; i++)
195 missed_cleavage_number,
209 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