General usage class for creating lists of modifications to be passed as parameters. More...
#include <ms_modfile.hpp>
Public Member Functions | |
ms_modvector () | |
Default constructor. | |
ms_modvector (const ms_modvector &src) | |
Copying constructor. | |
ms_modvector (const ms_umod_modification &src, const ms_umod_configfile &umod_file) | |
Copying constructor that takes a Unimod file object as a source. | |
~ms_modvector () | |
Destructor. | |
void | appendModification (const ms_modification *item) |
Adds a new modification at the end of the vector. | |
void | appendModifications (ms_modvector &right) |
Adds copies of modifications at the end of the vector. | |
void | clearModifications () |
Deletes all modifications from the vector. | |
void | copyFrom (const ms_modvector *right) |
Copies all content from another instance. | |
void | copyFrom (const ms_umod_modification *right, const ms_umod_configfile *umod_file) |
Copies all content from a Unimod modification object. | |
const ms_modification * | getModificationByName (const std::string &name) const |
Returns a modification object by its name. | |
const ms_modification * | getModificationByNumber (const int numMod) const |
Returns a modification object by its number. | |
int | getNumberOfModifications () const |
Returns the number of modifications currently held in the vector. | |
ms_modvector & | operator= (const ms_modvector &right) |
C++ style assignment operator. | |
General usage class for creating lists of modifications to be passed as parameters.
ms_modvector | ( | const ms_umod_modification & | src, |
const ms_umod_configfile & | umod_file | ||
) |
Copying constructor that takes a Unimod file object as a source.
Each modificationbelement in Unimod consists of one or more specificities that can be grouped by their specGroup value. Therefore, each modification element can be converted to one or more mod_file style modifications.
src | a Unimod object to copy the content from. |
umod_file | an instance of a Unimod file object from which to extract element masses. |
void copyFrom | ( | const ms_umod_modification * | right, |
const ms_umod_configfile * | umod_file | ||
) |
Copies all content from a Unimod modification object.
Every modification object in a Unimod file consits of one or more specificities. Specificities can be grouped or merged by their specificity group ID. Therefore, we can potentially obtain a vector of specificity groups out of any modification in a Unimod file. Such specificity groups can be converted into mod_file style modifications directly.
right | a Unimod style modification object to copy the content from. |
umod_file | Unimod file object from which to get masses of elements and amino-acids. |
const ms_modification * getModificationByName | ( | const std::string & | nameMod | ) | const |
Returns a modification object by its name.
nameMod | is the modification name to match. |
const ms_modification * getModificationByNumber | ( | const int | numMod | ) | const |
Returns a modification object by its number.
numMod | is the modification number greater than or equal to zero and less than getNumberOfModifications(). |