OpenMS
ModifiedPeptideGenerator Class Reference

#include <OpenMS/CHEMISTRY/ModifiedPeptideGenerator.h>

Collaboration diagram for ModifiedPeptideGenerator:
[legend]

Classes

struct  MapToResidueType
 

Static Public Member Functions

static MapToResidueType getModifications (const StringList &modNames)
 Retrieve modifications from strings. More...
 
static void applyFixedModifications (const MapToResidueType &fixed_mods, AASequence &peptide)
 
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)
 

Static Protected Member Functions

static MapToResidueType createResidueModificationToResidueMap_ (const std::vector< const ResidueModification * > &mods)
 
static void applyAtMostOneVariableModification_ (const MapToResidueType &var_mods, const AASequence &peptide, std::vector< AASequence > &all_modified_peptides, bool keep_original=true)
 

Static Protected Attributes

static const int N_TERM_MODIFICATION_INDEX
 
static const int C_TERM_MODIFICATION_INDEX
 

Static Private Member Functions

static void applyAllModsAtIdxAndExtend_ (std::vector< AASequence > &original_sequences, int idx_to_modify, const std::vector< const ResidueModification * > &mods, const MapToResidueType &var_mods)
 take a vector of AASequences original_sequences, and for each mod in mods, add a version with mod at index idx_to_modify. In-place, with the original sequences recieving the first mod in mods. More...
 
static void applyModToPep_ (AASequence &current_peptide, int current_index, const ResidueModification *m, const MapToResidueType &var_mods)
 applies a modification m to the current_peptide at current_index. Overwrites mod if it exists. Looks up in var_mods for existing modified Residue pointers. More...
 

Class Documentation

◆ OpenMS::ModifiedPeptideGenerator::MapToResidueType

struct OpenMS::ModifiedPeptideGenerator::MapToResidueType
Collaboration diagram for ModifiedPeptideGenerator::MapToResidueType:
[legend]
Class Members
unordered_map< const ResidueModification *, const Residue * > val

Member Function Documentation

◆ applyAllModsAtIdxAndExtend_()

static void applyAllModsAtIdxAndExtend_ ( std::vector< AASequence > &  original_sequences,
int  idx_to_modify,
const std::vector< const ResidueModification * > &  mods,
const MapToResidueType var_mods 
)
staticprivate

take a vector of AASequences original_sequences, and for each mod in mods, add a version with mod at index idx_to_modify. In-place, with the original sequences recieving the first mod in mods.

◆ applyAtMostOneVariableModification_()

static void applyAtMostOneVariableModification_ ( const MapToResidueType var_mods,
const AASequence peptide,
std::vector< AASequence > &  all_modified_peptides,
bool  keep_original = true 
)
staticprotected

◆ applyFixedModifications()

static void applyFixedModifications ( const MapToResidueType fixed_mods,
AASequence peptide 
)
static

◆ applyModToPep_()

static void applyModToPep_ ( AASequence current_peptide,
int  current_index,
const ResidueModification m,
const MapToResidueType var_mods 
)
staticprivate

applies a modification m to the current_peptide at current_index. Overwrites mod if it exists. Looks up in var_mods for existing modified Residue pointers.

◆ applyVariableModifications()

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 
)
static

◆ createResidueModificationToResidueMap_()

static MapToResidueType createResidueModificationToResidueMap_ ( const std::vector< const ResidueModification * > &  mods)
staticprotected

◆ getModifications()

static MapToResidueType getModifications ( const StringList modNames)
static

Retrieve modifications from strings.

Parameters
modNamesThe list of modification names
Returns
A map of modifications and associated residue ResidueModifications are referenced by Residues in AASequence objects. Every time an AASequence object with modifications is constructed, it needs to query if the (modified) Residue is already registered in ResidueDB. This implies a lock of the whole db. To make modified peptide generation lock-free, we query and cache all modified residues once so we can directly apply them without further queries.

Member Data Documentation

◆ C_TERM_MODIFICATION_INDEX

const int C_TERM_MODIFICATION_INDEX
staticprotected

◆ N_TERM_MODIFICATION_INDEX

const int N_TERM_MODIFICATION_INDEX
staticprotected