Matrix Science Mascot Parser toolkit
 
Loading...
Searching...
No Matches
ms_modvector Class Reference

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_modificationgetModificationByName (const std::string &name) const
 Returns a modification object by its name.
 
const ms_modificationgetModificationByNumber (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_modvectoroperator= (const ms_modvector &right)
 C++ style assignment operator.
 

Detailed Description

General usage class for creating lists of modifications to be passed as parameters.

Examples
tools_aahelper.cpp.

Constructor & Destructor Documentation

◆ ms_modvector()

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.

Parameters
srca Unimod object to copy the content from.
umod_filean instance of a Unimod file object from which to extract element masses.

Member Function Documentation

◆ copyFrom()

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.

Parameters
righta Unimod style modification object to copy the content from.
umod_fileUnimod file object from which to get masses of elements and amino-acids.

◆ getModificationByName()

const ms_modification * getModificationByName ( const std::string &  nameMod) const

Returns a modification object by its name.

Parameters
nameModis the modification name to match.
Returns
The modification object, or a null value if a non-existent nameMod value is passed.

◆ getModificationByNumber()

const ms_modification * getModificationByNumber ( const int  numMod) const

Returns a modification object by its number.

Parameters
numModis the modification number greater than or equal to zero and less than getNumberOfModifications().
Returns
The modification object, or a null value if an invalid numMod value is passed. See Maintaining object references: two rules of thumb.
Examples
tools_aahelper.cpp.

The documentation for this class was generated from the following files: