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

Represents modification specificity objects in unimod.xml. More...

#include <ms_umod_specificity.hpp>

Public Member Functions

 ms_umod_specificity ()
 Default constructor.
 
 ms_umod_specificity (const ms_quant_specificity &src, const ms_umod_configfile &umodFile)
 Copying constructor that takes an object from quantitation.xml.
 
 ms_umod_specificity (const ms_umod_specificity &src)
 Copying constructor.
 
virtual ~ms_umod_specificity ()
 Destructor.
 
void appendNeutralLoss (const ms_umod_neutralloss *nl)
 Adds a new 'NeutralLoss' element at the end of the list.
 
void appendPepNeutralLoss (const ms_umod_neutralloss *pnl)
 Adds a new 'PepNeutralLoss' element at the end of the list.
 
void clearNeutralLosses ()
 Deletes all 'NeutralLoss' elements from the list.
 
void clearPepNeutralLosses ()
 Deletes all 'PepNeutralLoss' elements from the list.
 
void copyFrom (const ms_quant_specificity *right, const ms_umod_configfile &umodFile)
 Copies all content from an object of quantitation.xml.
 
void copyFrom (const ms_umod_specificity *right)
 Copies all content from another instance.
 
void defaultValues ()
 Call this member if you want to start again.
 
bool deleteNeutralLoss (const int idx)
 Remove a 'NeutralLoss' element from the list in memory.
 
bool deletePepNeutralLoss (const int idx)
 Remove a 'PepNeutralLoss' element object from the list in memory.
 
void dropClassification ()
 Delete the classification attribute.
 
void dropHidden ()
 Delete the hidden attribute.
 
void dropMiscNotes ()
 Delete the misc_notes element.
 
void dropPosition ()
 Delete the position attribute.
 
void dropSite ()
 Delete the site attribute.
 
void dropSpecGroup ()
 Delete the spec_group attribute.
 
std::string getClassification () const
 Returns the value of the classification attribute.
 
std::string getClassificationSchemaType () const
 Obtain a symbolic name for the classification attribute schema type.
 
std::string getHiddenSchemaType () const
 Obtain a symbolic name for the hidden attribute schema type.
 
std::string getMiscNotes () const
 Returns the value of the misc_notes element.
 
std::string getMiscNotesSchemaType () const
 Obtain a symbolic name for the misc_notes element schema type.
 
const ms_umod_neutrallossgetNeutralLoss (const int idx) const
 Returns a read-only pointer to a 'NeutralLoss' element by its number.
 
std::string getNeutralLossSchemaType () const
 Obtain a symbolic name for the 'NeutralLoss' element schema type.
 
int getNumberOfNeutralLosses () const
 Returns the number of 'NeutralLoss' elements currently held in memory.
 
int getNumberOfPepNeutralLosses () const
 Returns the number of 'PepNeutralLoss' elements currently held in memory.
 
const ms_umod_neutrallossgetPepNeutralLoss (const int idx) const
 Returns a read-only pointer to a 'PepNeutralLoss' element object by its number.
 
std::string getPepNeutralLossSchemaType () const
 Obtain a symbolic name for the 'NeutralLoss' element schema type.
 
std::string getPosition () const
 Returns the value of the position attribute.
 
std::string getPositionSchemaType () const
 Obtain a symbolic name for the position attribute schema type.
 
virtual std::string getSchemaType () const
 Returns name of the schema type that can be used to validate this element.
 
std::string getSite () const
 Returns the value of the site attribute.
 
std::string getSiteSchemaType () const
 Obtain a symbolic name for the site attribute schema type.
 
int getSpecGroup () const
 Returns the value of the spec_group attribute.
 
std::string getSpecGroupSchemaType () const
 Obtain a symbolic name for the spec_group attribute schema type.
 
bool haveClassification () const
 Indicates presence of the classification attribute.
 
bool haveHidden () const
 Indicates presence of the hidden attribute.
 
bool haveMiscNotes () const
 Indicates presence of the misc_notes element.
 
bool havePosition () const
 Indicates presence of the position attribute.
 
bool haveSite () const
 Indicates presence of the site attribute.
 
bool haveSpecGroup () const
 Indicates presence of the spec_group attribute.
 
bool inErrorTolerant () const
 
bool inLongList () const
 Indicates whether this specificity is in the full list on the Mascot search form.
 
bool inShortList () const
 Indicates whether this specificity is in the short list on the Mascot search form.
 
bool isHidden () const
 Returns the value of the hidden attribute.
 
bool isSameAs (const ms_umod_specificity &right) const
 Returns true if instances contain the same information.
 
ms_umod_specificityoperator= (const ms_umod_specificity &right)
 C++ style assignment operator.
 
void setClassification (const char *value)
 Set a custom value for the classification attribute.
 
void setHidden (const bool value)
 Set a custom value for the hidden attribute.
 
void setMiscNotes (const char *value)
 Set a custom value for the misc_notes element.
 
void setPosition (const char *value)
 Set a custom value for the position attribute.
 
void setSite (const char *value)
 Set a custom value for the site attribute.
 
void setSpecGroup (const int value)
 Set a custom value for the spec_group attribute.
 
void showInLongList (bool b)
 
void showInShortList (bool b)
 
bool updateNeutralLoss (const int idx, const ms_umod_neutralloss *nl)
 Update the information for a particular 'NeutralLoss' element.
 
bool updatePepNeutralLoss (const int idx, const ms_umod_neutralloss *pnl)
 Update the information for a particular 'PepNeutralLoss' element.
 
void useInErrorTolerant (bool b)
 
virtual std::string validateDeep (const ms_xml_schema *pSchemaFileObj) const
 Performs validation of all child elements in addition to 'shallow' validation.
 
virtual std::string validateShallow (const ms_xml_schema *pSchemaFileObj) const
 Performs simple validation of the top-level elements only.
 

Detailed Description

Represents modification specificity objects in unimod.xml.

Constructor & Destructor Documentation

◆ ms_umod_specificity() [1/3]

Default constructor.

Assigns reasonable default values to all internal members.

◆ ms_umod_specificity() [2/3]

Copying constructor.

Parameters
srcanother instance of this class to copy the content from.

◆ ms_umod_specificity() [3/3]

ms_umod_specificity ( const ms_quant_specificity src,
const ms_umod_configfile umodFile 
)

Copying constructor that takes an object from quantitation.xml.

Parameters
srcan instance of quantitation.xml class to copy the content from.
umodFilea Unimod file object to extract element masses from.

Member Function Documentation

◆ appendNeutralLoss()

void appendNeutralLoss ( const ms_umod_neutralloss nl)

Adds a new 'NeutralLoss' element at the end of the list.

Creates a new neutral loss object, copies all content from the object supplied as a parameter and adds it at the end of the list.

Parameters
nlan instance of neutral loss object to copy the content from.

◆ appendPepNeutralLoss()

void appendPepNeutralLoss ( const ms_umod_neutralloss pnl)

Adds a new 'PepNeutralLoss' element at the end of the list.

Creates a new peptide neutral loss object, copies all content from the object supplied as a parameter and adds it at the end of the list.

Parameters
pnlan instance of peptide neutral loss object to copy the content from.

◆ copyFrom() [1/2]

void copyFrom ( const ms_quant_specificity right,
const ms_umod_configfile umodFile 
)

Copies all content from an object of quantitation.xml.

Parameters
rightan instance of a quantitation.xml class.
umodFilea Unimod file object to extract element masses from.

◆ copyFrom() [2/2]

void copyFrom ( const ms_umod_specificity right)

Copies all content from another instance.

Parameters
rightanother instance of this class to copy the content from.

◆ defaultValues()

void defaultValues ( )

Call this member if you want to start again.

All internal values are reset to their defaults, as if the object had been freshly created with the default constructor.

◆ deleteNeutralLoss()

bool deleteNeutralLoss ( const int  idx)

Remove a 'NeutralLoss' element from the list in memory.

Parameters
idxnumber of the neutral loss for deletion from 0 to (getNumberOfNeutralLosses() - 1).
Returns
TRUE if the object has been found and successfully deleted and FALSE otherwise.

◆ deletePepNeutralLoss()

bool deletePepNeutralLoss ( const int  idx)

Remove a 'PepNeutralLoss' element object from the list in memory.

Parameters
idxnumber of the peptide neutral loss for deletion from 0 to (getNumberOfPepNeutralLosses() - 1).
Returns
TRUE if the object has been found and successfully deleted and FALSE otherwise.

◆ dropClassification()

void dropClassification ( )

Delete the classification attribute.

Deletes the attribute until is re-set.

◆ dropHidden()

void dropHidden ( )

Delete the hidden attribute.

Deletes the attribute until is re-set.

◆ dropMiscNotes()

void dropMiscNotes ( )

Delete the misc_notes element.

Deletes the element until it is re-set.

◆ dropPosition()

void dropPosition ( )

Delete the position attribute.

Deletes the attribute until is re-set.

◆ dropSite()

void dropSite ( )

Delete the site attribute.

Deletes the attribute until is re-set.

◆ dropSpecGroup()

void dropSpecGroup ( )

Delete the spec_group attribute.

Deletes the attribute until is re-set.

◆ getClassification()

std::string getClassification ( ) const

Returns the value of the classification attribute.

Returns
current value of the attribute.

◆ getClassificationSchemaType()

std::string getClassificationSchemaType ( ) const

Obtain a symbolic name for the classification attribute schema type.

The obtained type name can be used to get a corresponding type description object from ms_xml_schema.

Returns
symbolic type name for the element.

◆ getHiddenSchemaType()

std::string getHiddenSchemaType ( ) const

Obtain a symbolic name for the hidden attribute schema type.

The obtained type name can be used to get a corresponding type description object from ms_xml_schema.

Returns
symbolic type name for the element.

◆ getMiscNotes()

std::string getMiscNotes ( ) const

Returns the value of the misc_notes element.

Returns
current value of the element.

◆ getMiscNotesSchemaType()

std::string getMiscNotesSchemaType ( ) const

Obtain a symbolic name for the misc_notes element schema type.

The obtained type name can be used to get a corresponding type description object from ms_xml_schema.

Returns
symbolic type name for the element.

◆ getNeutralLoss()

const ms_umod_neutralloss * getNeutralLoss ( const int  idx) const

Returns a read-only pointer to a 'NeutralLoss' element by its number.

Parameters
idxnumber of the neutral loss from 0 to (getNumberOfNeutralLosses() - 1).
Returns
a read-only pointer to the retrieved object. See Maintaining object references: two rules of thumb.

◆ getNeutralLossSchemaType()

std::string getNeutralLossSchemaType ( ) const

Obtain a symbolic name for the 'NeutralLoss' element schema type.

The obtained type name can be used to get a corresponding type description object from ms_xml_schema.

Returns
symbolic type name for the element.

◆ getNumberOfNeutralLosses()

int getNumberOfNeutralLosses ( ) const

Returns the number of 'NeutralLoss' elements currently held in memory.

Returns
total number of neutral losses in the specificity.

◆ getNumberOfPepNeutralLosses()

int getNumberOfPepNeutralLosses ( ) const

Returns the number of 'PepNeutralLoss' elements currently held in memory.

Returns
total number of peptide neutral losses in the specificity.

◆ getPepNeutralLoss()

const ms_umod_neutralloss * getPepNeutralLoss ( const int  idx) const

Returns a read-only pointer to a 'PepNeutralLoss' element object by its number.

Parameters
idxnumber of the peptide neutral loss from 0 to (getNumberOfPepNeutralLosses() - 1).
Returns
a read-only pointer to the retrieved object. See Maintaining object references: two rules of thumb.

◆ getPepNeutralLossSchemaType()

std::string getPepNeutralLossSchemaType ( ) const

Obtain a symbolic name for the 'NeutralLoss' element schema type.

The obtained type name can be used to get a corresponding type description object from ms_xml_schema.

Returns
symbolic type name for the element.

◆ getPosition()

std::string getPosition ( ) const

Returns the value of the position attribute.

Returns
Position of the specificity that should be one of the Type mqm:positionType values.

◆ getPositionSchemaType()

std::string getPositionSchemaType ( ) const

Obtain a symbolic name for the position attribute schema type.

The obtained type name can be used to get a corresponding type description object from ms_xml_schema.

Returns
symbolic type name for the element.

◆ getSchemaType()

std::string getSchemaType ( ) const
virtual

Returns name of the schema type that can be used to validate this element.

Additional information about the current object can be retrieved from the associated XML schema file. Every element in an XML document is defined with a named type, which you can use to find out what kind of limits (numerical or otherwise) are defined for values of that type.

See also
validateShallow(), validateDeep()
Returns
a symbolic fully qualified type name (for example, "umod:nameType")

◆ getSite()

std::string getSite ( ) const

Returns the value of the site attribute.

Returns
Site string that should be one of the Type mqm:siteType values.

◆ getSiteSchemaType()

std::string getSiteSchemaType ( ) const

Obtain a symbolic name for the site attribute schema type.

The obtained type name can be used to get a corresponding type description object from ms_xml_schema.

Returns
symbolic type name for the element.

◆ getSpecGroup()

int getSpecGroup ( ) const

Returns the value of the spec_group attribute.

Returns
current value of the attribute.

◆ getSpecGroupSchemaType()

std::string getSpecGroupSchemaType ( ) const

Obtain a symbolic name for the spec_group attribute schema type.

The obtained type name can be used to get a corresponding type description object from ms_xml_schema.

Returns
symbolic type name for the element.

◆ haveClassification()

bool haveClassification ( ) const

Indicates presence of the classification attribute.

Returns
TRUE if the attribute is present and FALSE otherwise.

◆ haveHidden()

bool haveHidden ( ) const

Indicates presence of the hidden attribute.

Returns
TRUE if the attribute is present and FALSE otherwise.

◆ haveMiscNotes()

bool haveMiscNotes ( ) const

Indicates presence of the misc_notes element.

Returns
TRUE if the element is present and FALSE otherwise.

◆ havePosition()

bool havePosition ( ) const

Indicates presence of the position attribute.

Returns
TRUE if the attribute is present and FALSE otherwise.

◆ haveSite()

bool haveSite ( ) const

Indicates presence of the site attribute.

Returns
TRUE if the attribute is present and FALSE otherwise.

◆ haveSpecGroup()

bool haveSpecGroup ( ) const

Indicates presence of the spec_group attribute.

Returns
TRUE if the attribute is present and FALSE otherwise.

◆ inErrorTolerant()

bool inErrorTolerant ( ) const
Returns
true if this specificity is included in error tolerant searches in mascot.

◆ inLongList()

bool inLongList ( ) const

Indicates whether this specificity is in the full list on the Mascot search form.

Returns
true if this specificity is required in the mascot search form full list.

◆ inShortList()

bool inShortList ( ) const

Indicates whether this specificity is in the short list on the Mascot search form.

Returns
true if this specificity is required in the mascot search form short list.

◆ isHidden()

bool isHidden ( ) const

Returns the value of the hidden attribute.

Returns
current value of the attribute.

◆ isSameAs()

bool isSameAs ( const ms_umod_specificity right) const

Returns true if instances contain the same information.

Parameters
rightanother instance of this class to compare.
Returns
true if the specificities are equivalent.

◆ operator=()

ms_umod_specificity & operator= ( const ms_umod_specificity right)

C++ style assignment operator.

Parameters
rightanother instance of this class to copy the content from.
Returns
reference to the current object

◆ setClassification()

void setClassification ( const char *  value)

Set a custom value for the classification attribute.

Parameters
valuea new value for the attribute.

◆ setHidden()

void setHidden ( const bool  value)

Set a custom value for the hidden attribute.

Parameters
valuea new value for the attribute.

◆ setMiscNotes()

void setMiscNotes ( const char *  value)

Set a custom value for the misc_notes element.

Parameters
valuea new value for the element.

◆ setPosition()

void setPosition ( const char *  value)

Set a custom value for the position attribute.

Parameters
valuePosition of the specificity that should be one of the Type mqm:positionType values.

◆ setSite()

void setSite ( const char *  value)

Set a custom value for the site attribute.

Parameters
valuethat should be one of the Type mqm:siteType values.

◆ setSpecGroup()

void setSpecGroup ( const int  value)

Set a custom value for the spec_group attribute.

Parameters
valuea new value for the attribute.

◆ showInLongList()

void showInLongList ( bool  b)
Parameters
bsets if this specificity is required in the mascot search form full list.

◆ showInShortList()

void showInShortList ( bool  b)
Parameters
bsets if this specificity is required in the mascot search form short list.

◆ updateNeutralLoss()

bool updateNeutralLoss ( const int  idx,
const ms_umod_neutralloss nl 
)

Update the information for a particular 'NeutralLoss' element.

Parameters
idxnumber of the neutral loss object for updating from 0 to (getNumberOfNeutralLosses() - 1).
nlan object to copy the content from.
Returns
TRUE if the neutral loss has been found and successfully updated and FALSE otherwise.

◆ updatePepNeutralLoss()

bool updatePepNeutralLoss ( const int  idx,
const ms_umod_neutralloss pnl 
)

Update the information for a particular 'PepNeutralLoss' element.

Parameters
idxnumber of the peptide neutral loss object for updating from 0 to (getNumberOfPepNeutralLosses() - 1).
pnlan object to copy the content from.
Returns
TRUE if the peptide neutral loss has been found and successfully updated and FALSE otherwise.

◆ useInErrorTolerant()

void useInErrorTolerant ( bool  b)
Parameters
bsets if this specificity is required in error tolerant searches.

◆ validateDeep()

std::string validateDeep ( const ms_xml_schema *  pSchemaFileObj) const
virtual

Performs validation of all child elements in addition to 'shallow' validation.

The current object can be checked against an XML schema. When using this method all possible checks are performed. However, this is not a substitute for the schema: some schema-defined constraint are not applied (unique fields, foreign keys etc.).

In order to make sure that current object is free from all syntax errors validate it as a part of the whole document.

See also
validateShallow(), getSchemaType()
Parameters
pSchemaFileObja valid schema object instance to validate against.
Returns
user-friendly description of any errors found during validation or an empty string if no errors detected.

◆ validateShallow()

std::string validateShallow ( const ms_xml_schema *  pSchemaFileObj) const
virtual

Performs simple validation of the top-level elements only.

The current object can be checked against some basic constraints in a schema without looking at children element types. When using this method only the current object and children derived from standard types (for example, restrictions with enumerations) are checked. For more thorough validation, use validateDeep().

See also
getSchemaType()
Parameters
pSchemaFileObja valid schema object instance to validate against.
Returns
user-friendly description of any errors found during validation or an empty string if no errors detected.

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