18#include <unordered_map>
117 Size max_variable_mods_per_peptide,
118 std::vector<AASequence>& all_modified_peptides,
119 bool keep_original=
true);
155 std::vector<AASequence>& all_modified_peptides,
156 bool keep_original=
true);
Representation of a peptide/protein sequence.
Definition AASequence.h:88
Generate fixed- and variable-modification variants of an AASequence, lock-free.
Definition ModifiedPeptideGenerator.h:46
static void applyVariableModifications(const MapToResidueType &var_mods, const AASequence &peptide, Size max_variable_mods_per_peptide, std::vector< AASequence > &all_modified_peptides, bool keep_original=true)
Enumerate all peptide variants obtained by combinatorially placing up to max_variable_mods_per_peptid...
std::unordered_map< const ResidueModification *, const Residue * > val
Definition ModifiedPeptideGenerator.h:59
static const int N_TERM_MODIFICATION_INDEX
Sentinel index used internally to mark a strict N_TERM-only modification placed at the N-terminal res...
Definition ModifiedPeptideGenerator.h:123
static MapToResidueType getModifications(const StringList &modNames)
Resolve modification names from UniMod terms and pre-cache the corresponding modified Residue pointer...
static void applyModToPep_(AASequence ¤t_peptide, int current_index, const ResidueModification *m, const MapToResidueType &var_mods)
Install modification m on current_peptide at residue index current_index, looking up the pre-cached m...
static void applyAtMostOneVariableModification_(const MapToResidueType &var_mods, const AASequence &peptide, std::vector< AASequence > &all_modified_peptides, bool keep_original=true)
Fast path for the common case where exactly one variable modification is placed per peptide.
static const int C_TERM_MODIFICATION_INDEX
Sentinel index used internally to mark a strict C_TERM-only modification placed at the C-terminal res...
Definition ModifiedPeptideGenerator.h:125
static void applyAllModsAtIdxAndExtend_(std::vector< AASequence > &original_sequences, int idx_to_modify, const std::vector< const ResidueModification * > &mods, const MapToResidueType &var_mods)
For each modification in mods, extend original_sequences with a copy carrying that mod at idx_to_modi...
static void applyFixedModifications(const MapToResidueType &fixed_mods, AASequence &peptide)
Apply all compatible fixed modifications in fixed_mods to peptide in place.
static MapToResidueType createResidueModificationToResidueMap_(const std::vector< const ResidueModification * > &mods)
Build the ResidueModification -> Residue cache used by the apply* methods (the lock-free trick — see ...
Cached mapping ResidueModification* -> already-instantiated modified Residue*.
Definition ModifiedPeptideGenerator.h:59
Representation of a modification on an amino acid residue.
Definition ResidueModification.h:55
size_t Size
Size type e.g. used as variable which can hold result of size()
Definition Types.h:97
std::vector< std::string > StringList
Vector of String.
Definition ListUtils.h:44
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19