OpenMS
2.5.0
|
Representation of a modification. More...
#include <OpenMS/CHEMISTRY/ResidueModification.h>
Public Types | |
enum | TermSpecificity { ANYWHERE = 0, C_TERM = 1, N_TERM = 2, PROTEIN_C_TERM = 3, PROTEIN_N_TERM = 4, NUMBER_OF_TERM_SPECIFICITY } |
Position where the modification is allowed to occur. More... | |
enum | SourceClassification { ARTIFACT = 0, HYPOTHETICAL, NATURAL, POSTTRANSLATIONAL, MULTIPLE, CHEMICAL_DERIVATIVE, ISOTOPIC_LABEL, PRETRANSLATIONAL, OTHER_GLYCOSYLATION, NLINKED_GLYCOSYLATION, AA_SUBSTITUTION, OTHER, NONSTANDARD_RESIDUE, COTRANSLATIONAL, OLINKED_GLYCOSYLATION, UNKNOWN, NUMBER_OF_SOURCE_CLASSIFICATIONS } |
Classification of the modification. More... | |
Public Member Functions | |
Constructors and Destructors | |
ResidueModification () | |
Default constructor. More... | |
ResidueModification (const ResidueModification &)=default | |
Copy constructor. More... | |
ResidueModification (ResidueModification &&)=default | |
Move constructor. More... | |
virtual | ~ResidueModification () |
Destructor. More... | |
Assignment operator | |
ResidueModification & | operator= (const ResidueModification &)=default |
Assignment operator. More... | |
ResidueModification & | operator= (ResidueModification &&) &=default |
Move assignment operator. More... | |
Accessors | |
void | setId (const String &id) |
set the identifier of the modification More... | |
const String & | getId () const |
returns the identifier of the modification More... | |
void | setFullId (const String &full_id="") |
Sets the full identifier (Unimod Accession + origin, if available) More... | |
const String & | getFullId () const |
returns the full identifier of the mod (Unimod accession + origin, if available) More... | |
void | setUniModRecordId (const Int &id) |
sets the unimod record id More... | |
const Int & | getUniModRecordId () const |
gets the unimod record id More... | |
const String | getUniModAccession () const |
returns the unimod accession if available More... | |
void | setPSIMODAccession (const String &id) |
set the MOD:XXXXX accession of PSI-MOD More... | |
const String & | getPSIMODAccession () const |
returns the PSI-MOD accession if available More... | |
void | setFullName (const String &full_name) |
sets the full name of the modification More... | |
const String & | getFullName () const |
returns the full name of the modification More... | |
void | setName (const String &name) |
sets the name of modification More... | |
const String & | getName () const |
returns the PSI-MS-label if available; e.g. Mascot uses this name More... | |
void | setTermSpecificity (TermSpecificity term_spec) |
Sets the term specificity. More... | |
void | setTermSpecificity (const String &name) |
Sets the terminal specificity using a name. More... | |
TermSpecificity | getTermSpecificity () const |
returns terminal specificity More... | |
String | getTermSpecificityName (TermSpecificity term_spec=NUMBER_OF_TERM_SPECIFICITY) const |
Returns the name of the terminal specificity. More... | |
void | setOrigin (char origin) |
Sets the origin (i.e. modified amino acid) More... | |
char | getOrigin () const |
Returns the origin (i.e. modified amino acid) More... | |
void | setSourceClassification (const String &classification) |
classification as defined by the PSI-MOD More... | |
void | setSourceClassification (SourceClassification classification) |
sets the source classification More... | |
SourceClassification | getSourceClassification () const |
returns the source classification, if none was set, it is unspecific More... | |
String | getSourceClassificationName (SourceClassification classification=NUMBER_OF_SOURCE_CLASSIFICATIONS) const |
returns the classification More... | |
void | setAverageMass (double mass) |
sets the average mass More... | |
double | getAverageMass () const |
returns the average mass if set More... | |
void | setMonoMass (double mass) |
sets the monoisotopic mass More... | |
double | getMonoMass () const |
return the monoisotopic mass, if set More... | |
void | setDiffAverageMass (double mass) |
set the difference average mass More... | |
double | getDiffAverageMass () const |
returns the difference average mass if set More... | |
void | setDiffMonoMass (double mass) |
sets the difference monoisotopic mass More... | |
double | getDiffMonoMass () const |
returns the diff monoisotopic mass if set More... | |
void | setFormula (const String &composition) |
set the formula More... | |
const String & | getFormula () const |
returns the chemical formula if set More... | |
void | setDiffFormula (const EmpiricalFormula &diff_formula) |
sets diff formula More... | |
const EmpiricalFormula & | getDiffFormula () const |
returns the diff formula if one was set More... | |
void | setSynonyms (const std::set< String > &synonyms) |
sets the synonyms of that modification More... | |
void | addSynonym (const String &synonym) |
adds a synonym to the unique list More... | |
const std::set< String > & | getSynonyms () const |
returns the set of synonyms More... | |
void | setNeutralLossDiffFormula (const EmpiricalFormula &loss) |
sets the neutral loss formula More... | |
const EmpiricalFormula & | getNeutralLossDiffFormula () const |
returns the neutral loss diff formula (if available) More... | |
void | setNeutralLossMonoMass (double mono_mass) |
set the neutral loss mono weight More... | |
double | getNeutralLossMonoMass () const |
returns the neutral loss mono weight More... | |
void | setNeutralLossAverageMass (double average_mass) |
set the neutral loss average weight More... | |
double | getNeutralLossAverageMass () const |
returns the neutral loss average weight More... | |
Predicates | |
String | id_ |
String | full_id_ |
String | psi_mod_accession_ |
Int | unimod_record_id_ |
String | full_name_ |
String | name_ |
TermSpecificity | term_spec_ |
char | origin_ |
SourceClassification | classification_ |
double | average_mass_ |
double | mono_mass_ |
double | diff_average_mass_ |
double | diff_mono_mass_ |
String | formula_ |
EmpiricalFormula | diff_formula_ |
std::set< String > | synonyms_ |
EmpiricalFormula | neutral_loss_diff_formula_ |
double | neutral_loss_mono_mass_ |
double | neutral_loss_average_mass_ |
bool | hasNeutralLoss () const |
returns true if a neutral loss formula is set More... | |
bool | isUserDefined () const |
returns true if it is a user-defined modification (empty id) More... | |
bool | operator== (const ResidueModification &modification) const |
equality operator More... | |
bool | operator!= (const ResidueModification &modification) const |
inequality operator More... | |
bool | operator< (const ResidueModification &modification) const |
less operator More... | |
Representation of a modification.
This class represents a modification of a residue. A residue modification has several attributes like the diff formula, a terminal specificity a mass and maybe an origin which means a specific residue which it can be applied to. A residue modification can be represented by its Unimod name identifier, e.g. "Oxidation (M)" or "Oxidation". This is a unique key which only occurs once in an OpenMS instance stored in the ModificationsDB.
Example: methionine sulfoxide formation by oxidation of methionine
Function | Result ---------------------------------------------------- getFullId() | "Oxidation (M)" getId() | "Oxidation" getFullName() | "Oxidation or Hydroxylation" getUniModAccession() | "UniMod:312"
Note that some modifications are not explicitly defined from an input file but get added on the fly when reading amino acid sequences with bracket notation, e.g. "PEPTX[999]IDE". If there is no known modification corresponding to the indicated mass, then a new ResidueModification will be created which will return the initial string through "getFullId()" – which will either be "[999]" for internal modifications or ".[999]" for N/C-terminal modifications. Please use "isUserDefined" to check for user-defined modifications.
enum SourceClassification |
Classification of the modification.
enum TermSpecificity |
Position where the modification is allowed to occur.
Enums The allowed sites are Anywhere Any C-term Any N-term Protein C-term Protein N-term
This does not describe the amino acids which are valid for a specific amino acid!
Enumerator | |
---|---|
ANYWHERE | |
C_TERM | |
N_TERM | |
PROTEIN_C_TERM | |
PROTEIN_N_TERM | |
NUMBER_OF_TERM_SPECIFICITY |
Default constructor.
|
default |
Copy constructor.
|
default |
Move constructor.
|
virtual |
Destructor.
void addSynonym | ( | const String & | synonym | ) |
adds a synonym to the unique list
double getAverageMass | ( | ) | const |
returns the average mass if set
double getDiffAverageMass | ( | ) | const |
returns the difference average mass if set
const EmpiricalFormula& getDiffFormula | ( | ) | const |
returns the diff formula if one was set
double getDiffMonoMass | ( | ) | const |
returns the diff monoisotopic mass if set
const String& getFormula | ( | ) | const |
returns the chemical formula if set
const String& getFullId | ( | ) | const |
returns the full identifier of the mod (Unimod accession + origin, if available)
Returns the full identifier (Unimod Accession + origin, if available)
const String& getFullName | ( | ) | const |
returns the full name of the modification
const String& getId | ( | ) | const |
returns the identifier of the modification
double getMonoMass | ( | ) | const |
return the monoisotopic mass, if set
const String& getName | ( | ) | const |
returns the PSI-MS-label if available; e.g. Mascot uses this name
double getNeutralLossAverageMass | ( | ) | const |
returns the neutral loss average weight
const EmpiricalFormula& getNeutralLossDiffFormula | ( | ) | const |
returns the neutral loss diff formula (if available)
double getNeutralLossMonoMass | ( | ) | const |
returns the neutral loss mono weight
char getOrigin | ( | ) | const |
Returns the origin (i.e. modified amino acid)
const String& getPSIMODAccession | ( | ) | const |
returns the PSI-MOD accession if available
SourceClassification getSourceClassification | ( | ) | const |
returns the source classification, if none was set, it is unspecific
String getSourceClassificationName | ( | SourceClassification | classification = NUMBER_OF_SOURCE_CLASSIFICATIONS | ) | const |
returns the classification
const std::set<String>& getSynonyms | ( | ) | const |
returns the set of synonyms
TermSpecificity getTermSpecificity | ( | ) | const |
returns terminal specificity
String getTermSpecificityName | ( | TermSpecificity | term_spec = NUMBER_OF_TERM_SPECIFICITY | ) | const |
Returns the name of the terminal specificity.
By default, returns the name of the specificity set in member term_spec_
. Alternatively, returns the name corresponding to argument term_spec
.
const String getUniModAccession | ( | ) | const |
returns the unimod accession if available
const Int& getUniModRecordId | ( | ) | const |
gets the unimod record id
bool hasNeutralLoss | ( | ) | const |
returns true if a neutral loss formula is set
bool isUserDefined | ( | ) | const |
returns true if it is a user-defined modification (empty id)
bool operator!= | ( | const ResidueModification & | modification | ) | const |
inequality operator
bool operator< | ( | const ResidueModification & | modification | ) | const |
less operator
|
default |
Assignment operator.
|
default |
Move assignment operator.
bool operator== | ( | const ResidueModification & | modification | ) | const |
equality operator
void setAverageMass | ( | double | mass | ) |
sets the average mass
void setDiffAverageMass | ( | double | mass | ) |
set the difference average mass
void setDiffFormula | ( | const EmpiricalFormula & | diff_formula | ) |
sets diff formula
void setDiffMonoMass | ( | double | mass | ) |
sets the difference monoisotopic mass
void setFormula | ( | const String & | composition | ) |
set the formula
void setFullId | ( | const String & | full_id = "" | ) |
Sets the full identifier (Unimod Accession + origin, if available)
With empty argument, create a full ID based on (short) ID, terminal specificity and residue of origin.
Exception::MissingInformation | if both argument full_id and member id_ are empty. |
void setFullName | ( | const String & | full_name | ) |
sets the full name of the modification
void setId | ( | const String & | id | ) |
set the identifier of the modification
void setMonoMass | ( | double | mass | ) |
sets the monoisotopic mass
void setName | ( | const String & | name | ) |
sets the name of modification
void setNeutralLossAverageMass | ( | double | average_mass | ) |
set the neutral loss average weight
void setNeutralLossDiffFormula | ( | const EmpiricalFormula & | loss | ) |
sets the neutral loss formula
void setNeutralLossMonoMass | ( | double | mono_mass | ) |
set the neutral loss mono weight
void setOrigin | ( | char | origin | ) |
Sets the origin (i.e. modified amino acid)
origin
must be a valid amino acid one-letter code or X, i.e. a letter from A to Y, excluding B and J. X represents any amino acid (for modifications with terminal specificity).
Exception::InvalidValue | if origin is not in the valid range |
void setPSIMODAccession | ( | const String & | id | ) |
set the MOD:XXXXX accession of PSI-MOD
void setSourceClassification | ( | const String & | classification | ) |
classification as defined by the PSI-MOD
void setSourceClassification | ( | SourceClassification | classification | ) |
sets the source classification
void setSynonyms | ( | const std::set< String > & | synonyms | ) |
sets the synonyms of that modification
void setTermSpecificity | ( | const String & | name | ) |
Sets the terminal specificity using a name.
Valid names: "C-term", "N-term", "none"
Exception::InvalidValue | if no valid specificity was given |
void setTermSpecificity | ( | TermSpecificity | term_spec | ) |
Sets the term specificity.
Exception::InvalidValue | if no valid specificity was given |
void setUniModRecordId | ( | const Int & | id | ) |
sets the unimod record id
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |