Matrix Science header
Public Member Functions

ms_umod_specificity Class Reference
[Mascot configuration files module]

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

#include <ms_umod_specificity.hpp>

List of all members.

Public Member Functions

 ms_umod_specificity ()
 Default constructor.
 ms_umod_specificity (const ms_umod_specificity &src)
 Copying constructor.
 ms_umod_specificity (const ms_quant_specificity &src, const ms_umod_configfile &umodFile)
 Copying constructor that takes an object from quantitation.xml.
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_umod_specificity *right)
 Copies all content from another instance.
void copyFrom (const ms_quant_specificity *right, const ms_umod_configfile &umodFile)
 Copies all content from an object of quantitation.xml.
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

Default constructor.

Assigns reasonable default values to all internal members.

Copying constructor.

Parameters:
srcanother instance of this class to copy the content from.
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

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.
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.
void copyFrom ( const ms_umod_specificity right )

Copies all content from another instance.

Parameters:
rightanother instance of this class to copy the content from.
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.
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.

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.
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.
void dropClassification (  )

Delete the classification attribute.

Deletes the attribute until is re-set.

void dropHidden (  )

Delete the hidden attribute.

Deletes the attribute until is re-set.

void dropMiscNotes (  )

Delete the misc_notes element.

Deletes the element until it is re-set.

void dropPosition (  )

Delete the position attribute.

Deletes the attribute until is re-set.

void dropSite (  )

Delete the site attribute.

Deletes the attribute until is re-set.

void dropSpecGroup (  )

Delete the spec_group attribute.

Deletes the attribute until is re-set.

std::string getClassification (  ) const

Returns the value of the classification attribute.

Returns:
current value of the attribute.
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.
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.
std::string getMiscNotes (  ) const

Returns the value of the misc_notes element.

Returns:
current value of the element.
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.
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.
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.
int getNumberOfNeutralLosses (  ) const

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

Returns:
total number of neutral losses in the specificity.
int getNumberOfPepNeutralLosses (  ) const

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

Returns:
total number of peptide neutral losses in the specificity.
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.
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.
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.
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.
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")
std::string getSite (  ) const

Returns the value of the site attribute.

Returns:
Site string that should be one of the Type mqm:siteType values.
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.
int getSpecGroup (  ) const

Returns the value of the spec_group attribute.

Returns:
current value of the attribute.
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.
bool haveClassification (  ) const

Indicates presence of the classification attribute.

Returns:
TRUE if the attribute is present and FALSE otherwise.
bool haveHidden (  ) const

Indicates presence of the hidden attribute.

Returns:
TRUE if the attribute is present and FALSE otherwise.
bool haveMiscNotes (  ) const

Indicates presence of the misc_notes element.

Returns:
TRUE if the element is present and FALSE otherwise.
bool havePosition (  ) const

Indicates presence of the position attribute.

Returns:
TRUE if the attribute is present and FALSE otherwise.
bool haveSite (  ) const

Indicates presence of the site attribute.

Returns:
TRUE if the attribute is present and FALSE otherwise.
bool haveSpecGroup (  ) const

Indicates presence of the spec_group attribute.

Returns:
TRUE if the attribute is present and FALSE otherwise.
bool inErrorTolerant (  ) const
Returns:
true if this specificity is included in error tolerant searches in mascot.
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.
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.
bool isHidden (  ) const

Returns the value of the hidden attribute.

Returns:
current value of the attribute.
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.
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
void setClassification ( const char *  value )

Set a custom value for the classification attribute.

Parameters:
valuea new value for the attribute.
void setHidden ( const bool  value )

Set a custom value for the hidden attribute.

Parameters:
valuea new value for the attribute.
void setMiscNotes ( const char *  value )

Set a custom value for the misc_notes element.

Parameters:
valuea new value for the element.
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.
void setSite ( const char *  value )

Set a custom value for the site attribute.

Parameters:
valuethat should be one of the Type mqm:siteType values.
void setSpecGroup ( const int  value )

Set a custom value for the spec_group attribute.

Parameters:
valuea new value for the attribute.
void showInLongList ( bool  b )
Parameters:
bsets if this specificity is required in the mascot search form full list.
void showInShortList ( bool  b )
Parameters:
bsets if this specificity is required in the mascot search form short list.
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.
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.
void useInErrorTolerant ( bool  b )
Parameters:
bsets if this specificity is required in error tolerant searches.
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.
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:

Copyright © 2022 Matrix Science Ltd.  All Rights Reserved. Generated on Thu Mar 31 2022 01:12:39