| |
Contains libXpertMass documentation. More...
| Header: | #include <libXpertMass> |
| class | ChemicalGroupProp |
| class | ModifProp |
| enum | CapType { CAP_NONE, CAP_LEFT, CAP_RIGHT, CAP_BOTH } |
| enum | ChemicalGroupRuleFate { LOST, PRESERVED } |
| enum | ChemicalGroupTrapping { NEVER_TRAPPED, LEFT_TRAPPED, RIGHT_TRAPPED } |
| enum | CrossLinkEncompassed { CROSS_LINK_ENCOMPASSED_NO, CROSS_LINK_ENCOMPASSED_PARTIAL, CROSS_LINK_ENCOMPASSED_FULL } |
| enum class | FormulaSplitResult { NOT_SET, FAILURE, HAS_PLUS_COMPONENT, HAS_MINUS_COMPONENT, HAS_BOTH_COMPONENTS } |
| enum | FragEnd { FRAG_END_NONE, FRAG_END_LEFT, FRAG_END_RIGHT, FRAG_END_BOTH } |
| enum | HashAccountData { HASH_ACCOUNT_SEQUENCE, HASH_ACCOUNT_MONOMER_MODIF, HASH_ACCOUNT_POLYMER_MODIF } |
| enum class | IsotopeFields { ID, ELEMENT, SYMBOL, ATOMIC_NUMBER, MASS, …, RADIOACTIVE } |
| enum class | IsotopicDataType { NOT_SET, LIBRARY_CONFIG, USER_CONFIG, MANUAL_CONFIG } |
| enum class | MassPeakShapeType { GAUSSIAN, LORENTZIAN } |
| enum class | MassPeakWidthLogic { FWHM, RESOLUTION } |
| enum | MassToleranceType { MASS_TOLERANCE_NONE, MASS_TOLERANCE_PPM, MASS_TOLERANCE_MZ, MASS_TOLERANCE_AMU, MASS_TOLERANCE_RES } |
| enum | MassType { MASS_NONE, MASS_MONO, MASS_AVG, MASS_BOTH } |
| enum | MonomerChemEnt { MONOMER_CHEMENT_NONE, MONOMER_CHEMENT_MODIF, MONOMER_CHEMENT_CROSS_LINK } |
| enum | PolymerChemEnt { POLYMER_CHEMENT_NONE, POLYMER_CHEMENT_LEFT_END_MODIF, POLYMER_CHEMENT_FORCE_LEFT_END_MODIF, POLYMER_CHEMENT_RIGHT_END_MODIF, POLYMER_CHEMENT_FORCE_RIGHT_END_MODIF, …, POLYMER_CHEMENT_FORCE_BOTH_END_MODIF } |
| enum | PolymerEnd { END_NONE, END_LEFT, END_RIGHT, END_BOTH } |
| enum | SelectionType { SELECTION_TYPE_RESIDUAL_CHAINS, SELECTION_TYPE_OLIGOMERS } |
| int | ATOM_DEC_PLACES |
| int | FWHM_PEAK_SPAN_FACTOR |
| int | OLIGOMER_DEC_PLACES |
| int | PH_PKA_DEC_PLACES |
| int | POLYMER_DEC_PLACES |
| const int | POL_CHEM_DEF_FILE_FORMAT_VERSION |
| const int | POL_SEQ_FILE_FORMAT_VERSION |
| int | gEndOfLineRegExp |
| int | gXyFormatMassDataRegExp |
| int | massToleranceTypeMap |
| int | subFormulaRegExp |
| int | addPpm(double value, double ppm) |
| int | addRes(double value, double res) |
| int | almostEqual(double value1, double value2, int decimal_places = 10) |
| int | countZeroDecimals(double value) |
| int | doubleListStatistics(int list, double *sum, double *average, double *variance, double *stdDeviation, double *nonZeroSmallest, double *smallest, double *smallestMedian, double *greatest) |
| int | ppm(double value, double ppm) |
| int | removePpm(double value, double ppm) |
| int | removeRes(double value, double res) |
| int | res(double value, double res) |
The ChemicalGroupProp class provides a Prop instance of which the member data points to a dynamically allocated ChemicalGroup instance. More...
The ModifProp class provides a Prop instance of which the member data points to a dynamically allocated Modif instance. More...
This enum specifies the type of cap (the chemical entities that are set to the polymer ends so as to finish its polymerization state from a chain of residues to an actual polymer molecule.
| Constant | Value | Description |
|---|---|---|
MsXpS::libXpertMass::CAP_NONE | 0 << 1 | The cap is not defined |
MsXpS::libXpertMass::CAP_LEFT | 1 << 1 | The left cap |
MsXpS::libXpertMass::CAP_RIGHT | 2 << 1 | The right cap |
MsXpS::libXpertMass::CAP_BOTH | (CAP_LEFT | CAP_RIGHT) | (CAP_LEFT | CAP_RIGHT) |
This enum specifies how the chemical group behaves when the chemical entity that it holds polymerizes into a Polymer.
This example clarifies the concept:
<monomer> <code>C</code> <mnmchemgroup> <name>N-term NH2</name> <pka>9.6</pka> <acidcharged>TRUE</acidcharged> <polrule>left_trapped</polrule> <chemgrouprule> <entity>LE_PLM_MODIF</entity> <name>Acetylation</name> <outcome>LOST</outcome> </chemgrouprule> </mnmchemgroup>
When the Cysteine's amino group is modified because the Cys residue on on the N-terminal end of the polymer, if it gets acetylated, then the amino group is lost because it is trapped in the amide bond. It is thus not accounted for when computing the pI of the protein.
| Constant | Value | Description |
|---|---|---|
MsXpS::libXpertMass::LOST | 0 | The chemical group is lost upon modification of the Monomer. |
MsXpS::libXpertMass::PRESERVED | 1 | The chemical group is preserved upon modification of the Monomer. |
This enum specifies how the chemical group behaves when the chemical entity that it holds polymerizes into a Polymer.
One example will clear things out:
An amino acid has a amino group and a carboxylic acid group. The amino group gets entrapped in the monomer-to-monomer bond (the peptide bond) if the polymerization occurs at the left of the monomer. That means that if the Monomer holding this ChemicalGroup is N-terminal, then the amino group should be accounted for because it is intact. Conversely, the carboxylic acid group gets entrapped in the peptide bond if the polymerization occurs at the right of the monomer. That means that if the Monomer holding this ChemicalGroup is C-terminal, then the carboxylic acid group should be accounted for because it is intact.
| Constant | Value | Description |
|---|---|---|
MsXpS::libXpertMass::NEVER_TRAPPED | 1 << 0 | The chemical group is not lost upon polymerization, it should thus always be accounted for. |
MsXpS::libXpertMass::LEFT_TRAPPED | 1 << 1 | The chemical group gets trapped in the inter-monomer bond if polymerization occurs at left of the Monomer. |
MsXpS::libXpertMass::RIGHT_TRAPPED | 1 << 2 | The chemical group gets trapped in the inter-monomer bond if polymerization occurs at right of the Monomer. |
This enum type specifies the manner in which a sequence region in a Polymer or in an Oligomer contains fully, or partially not does not contain all the monomers involved in a CrossLink:
| Constant | Value | Description |
|---|---|---|
MsXpS::libXpertMass::CROSS_LINK_ENCOMPASSED_NO | 0 | The region does not contain any Monomer involved in a CrossLink. |
MsXpS::libXpertMass::CROSS_LINK_ENCOMPASSED_PARTIAL | 1 | The region contains one or more Monomers involved in a CrossLink but not all. |
MsXpS::libXpertMass::CROSS_LINK_ENCOMPASSED_FULL | 2 | All the Monomers involved in the CrossLink are contained in the Polymer or Oligomer region. |
This enum type specifies the result of an actionformula parsing process:
| Constant | Value | Description |
|---|---|---|
MsXpS::libXpertMass::FormulaSplitResult::NOT_SET | 0x0000 | The value was not set |
MsXpS::libXpertMass::FormulaSplitResult::FAILURE | 1 << 0 | The splitting work failed |
MsXpS::libXpertMass::FormulaSplitResult::HAS_PLUS_COMPONENT | 1 << 1 | The action formula has a plus component |
MsXpS::libXpertMass::FormulaSplitResult::HAS_MINUS_COMPONENT | 1 << 2 | The action formula has a minus component |
MsXpS::libXpertMass::FormulaSplitResult::HAS_BOTH_COMPONENTS | (HAS_PLUS_COMPONENT |
HAS_MINUS_COMPONENT) | The action formula has both plus and minus components |
This enum specifies the end of the Oligomer that will be contained in the fragment resulting from its fragmentation. In protein chemistry, for example, a,b and x fragments are N-terminal fragments, that is, they contain the left end of the framgented Oligomer's sequence.
| Constant | Value | Description |
|---|---|---|
MsXpS::libXpertMass::FRAG_END_NONE | 1 << 0 | The value is not set. |
MsXpS::libXpertMass::FRAG_END_LEFT | 1 << 1 | The generated fragment contains the left end of the oligomer |
MsXpS::libXpertMass::FRAG_END_RIGHT | 1 << 2 | The generated fragment contains the right end of the oligomer |
MsXpS::libXpertMass::FRAG_END_BOTH | (FRAG_END_LEFT | FRAG_END_RIGHT) | The generated fragment contains both the left and the right end of the oligomer (that is, is all the oligomer) |
This enum specifies the chemical entites to account for when calculating a hash.
| Constant | Value | Description |
|---|---|---|
MsXpS::libXpertMass::HASH_ACCOUNT_SEQUENCE | 1 << 0 | The sequence |
MsXpS::libXpertMass::HASH_ACCOUNT_MONOMER_MODIF | 1 << 1 | Monomer modifications |
MsXpS::libXpertMass::HASH_ACCOUNT_POLYMER_MODIF | 1 << 2 | Polymer modifications |
This enum type documents the various member data in Isotope.
The values assigned to the various enum members are used to specify the columsn in the GUI table view. They are also used to access substrings in the proper order in the Isotope::initialize().
| Constant | Value | Description |
|---|---|---|
MsXpS::libXpertMass::IsotopeFields::ID | 0 | Indicates Isotope::m_id. |
MsXpS::libXpertMass::IsotopeFields::ELEMENT | 1 | Indicates Isotope::m_element. |
MsXpS::libXpertMass::IsotopeFields::SYMBOL | 2 | Indicates the Isotope::m_symbol. |
MsXpS::libXpertMass::IsotopeFields::ATOMIC_NUMBER | 3 | Indicates the Isotope::m_atomicNo. |
MsXpS::libXpertMass::IsotopeFields::MASS | 4 | Indicates the Isotope::m_mass. |
MsXpS::libXpertMass::IsotopeFields::MASS_NUMBER | 5 | Indicates the Isotope::m_massNo. |
MsXpS::libXpertMass::IsotopeFields::EXTRA_NEUTRONS | 6 | Indicates the Isotope::m_extraNeutrons. |
MsXpS::libXpertMass::IsotopeFields::PROBABILITY | 7 | Indicates the Isotope::m_probability. |
MsXpS::libXpertMass::IsotopeFields::LN_PROBABILITY | 8 | Indicates the Isotope::m_lnProbability. |
MsXpS::libXpertMass::IsotopeFields::RADIOACTIVE | 9 | Indicates the Isotope::m_radioactive. |
This enum specifies the type of isotopic data.
| Constant | Value | Description |
|---|---|---|
MsXpS::libXpertMass::IsotopicDataType::NOT_SET | 0 | : Not configured. . |
MsXpS::libXpertMass::IsotopicDataType::LIBRARY_CONFIG | 1 | : The isotopic data are loaded intact from the IsoSpec library data and are considered pristine natural abundance data. . |
MsXpS::libXpertMass::IsotopicDataType::USER_CONFIG | 2 | : The isotopic data are in the same format as for LIBRARY_CONFIG but might have been modified by the user to configure new abundances. . |
MsXpS::libXpertMass::IsotopicDataType::MANUAL_CONFIG | 3 | : The isotopic data are in a specific format, different than the two above, that actually crafts the isotopes starting from scratch. |
This enum specifies the type of mass peak shape to be computed around a m/z peak centroid.
| Constant | Value | Description |
|---|---|---|
MsXpS::libXpertMass::MassPeakShapeType::GAUSSIAN | 1 | The peak will be shaped using the Gaussian model. |
MsXpS::libXpertMass::MassPeakShapeType::LORENTZIAN | 2 | The peak will be shaped using the Lorentizan model. |
This enum specifies the logic used to computed the width of the mass peak shape around a m/z peak centroid.
| Constant | Value | Description |
|---|---|---|
MsXpS::libXpertMass::MassPeakWidthLogic::FWHM | 1 | The full width at half maximum is directly used to compute the peak shape width. |
MsXpS::libXpertMass::MassPeakWidthLogic::RESOLUTION | 2 | The resolving power of the instrument is the starting point to compute the FWHM. |
This enum type specifies the kind of mass tolerance to use for a mass calculation or a mass comparison.
| Constant | Value | Description |
|---|---|---|
MsXpS::libXpertMass::MASS_TOLERANCE_NONE | 0 | The tolerance is not specified |
MsXpS::libXpertMass::MASS_TOLERANCE_PPM | 1 | The tolerance is based on parts per million |
MsXpS::libXpertMass::MASS_TOLERANCE_MZ | 2 | The tolerance is based on an absolute m/z value |
MsXpS::libXpertMass::MASS_TOLERANCE_AMU | 3 | The tolerance is based on an absolute mass value |
MsXpS::libXpertMass::MASS_TOLERANCE_RES | 4 | The tolerance is based on resolution |
This enum type specifies the type of mass:
| Constant | Value | Description |
|---|---|---|
MsXpS::libXpertMass::MASS_NONE | 0x0000 | The mass type is not defined |
MsXpS::libXpertMass::MASS_MONO | 1 << 0 | The mass is monoisotopic |
MsXpS::libXpertMass::MASS_AVG | 1 << 1 | The mass is average |
MsXpS::libXpertMass::MASS_BOTH | (MASS_MONO | MASS_AVG) | (MASS_MONO | MASS_AVG) |
This enum specifies the monomer chemical entities to account for in a calculation.
This enum is typically used when mass calculations need to account or not for the various chemical entities that are attached to a given monomer.
| Constant | Value | Description |
|---|---|---|
MsXpS::libXpertMass::MONOMER_CHEMENT_NONE | 0 << 1 | The monomer chemical entity is not defined. |
MsXpS::libXpertMass::MONOMER_CHEMENT_MODIF | 1 << 1 | The monomer modifications |
MsXpS::libXpertMass::MONOMER_CHEMENT_CROSS_LINK | 1 << 2 | The monomer cross-links |
This enum specifies the polymer sequence chemical entities to account for in a calculation.
This enum is typically used when mass calculations need to account or not for the various chemical entities that are attached to a given polymer.
| Constant | Value | Description |
|---|---|---|
MsXpS::libXpertMass::POLYMER_CHEMENT_NONE | 1 << 0 | The polymer chemical entity is not defined. |
MsXpS::libXpertMass::POLYMER_CHEMENT_LEFT_END_MODIF | 1 << 1 | The left end modification |
MsXpS::libXpertMass::POLYMER_CHEMENT_FORCE_LEFT_END_MODIF | 1 << 2 | The left end modification, even if that polymer's end is not selected |
MsXpS::libXpertMass::POLYMER_CHEMENT_RIGHT_END_MODIF | 1 << 3 | The right end modification |
MsXpS::libXpertMass::POLYMER_CHEMENT_FORCE_RIGHT_END_MODIF | 1 << 4 | The right end modification, even if that polymer's end is not selected |
MsXpS::libXpertMass::POLYMER_CHEMENT_BOTH_END_MODIF | (POLYMER_CHEMENT_LEFT_END_MODIF | POLYMER_CHEMENT_RIGHT_END_MODIF) | (POLYMER_CHEMENT_LEFT_END_MODIF | POLYMER_CHEMENT_RIGHT_END_MODIF) |
MsXpS::libXpertMass::POLYMER_CHEMENT_FORCE_BOTH_END_MODIF | (POLYMER_CHEMENT_FORCE_LEFT_END_MODIF |
POLYMER_CHEMENT_FORCE_RIGHT_END_MODIF) | (POLYMER_CHEMENT_FORCE_LEFT_END_MODIF | POLYMER_CHEMENT_FORCE_RIGHT_END_MODIF) |
This enum specifies the polymer end.
| Constant | Value | Description |
|---|---|---|
MsXpS::libXpertMass::END_NONE | 0 << 1 | Not defined |
MsXpS::libXpertMass::END_LEFT | 1 << 1 | The left end |
MsXpS::libXpertMass::END_RIGHT | 2 << 1 | The right end |
MsXpS::libXpertMass::END_BOTH | (END_LEFT | END_RIGHT) | (END_LEFT | END_RIGHT) |
This enum specifies the selection type in a polymer sequence.
| Constant | Value | Description |
|---|---|---|
MsXpS::libXpertMass::SELECTION_TYPE_RESIDUAL_CHAINS | 0 | The selection comprises only residues |
MsXpS::libXpertMass::SELECTION_TYPE_OLIGOMERS | 1 | The selection comprises oligomers, that is, residual chains capped with the left and right caps. |
Number of decimal places after the decimal symbol for atom masses.
This variable holds the compounding factor to account for when shaping the sides of the peak.
The shape of the peak needs to reflect a real mass peak. In particular, the shape of the peak has to return, on each one of both sides, to the baseline, thus mimicking the baseline for a m/z distance equivalent to FWHM_PEAK_SPAN_FACTOR times the FWHM m/z range from left to right. That means that the simulated peak region at the left hand side of the centroid value will span (FWHM_PEAK_SPAN_FACTOR/2) times the FWHM and the same one right. Empirically, a good FWHM_PEAK_SPAN_FACTOR is 4, meaning that the left half of the peak (that is centered on the centroid) will have a size corresponding to two times the FHWM, and the same for the right half of the peak.
This is best exemplified as follows:
Centroid value
^
|
[ m/z - (2 * FWHM) <-|-> m/z + (2 * FWHM) ]
<----- width of the whole peak shape ----->
Number of decimal places after the decimal symbol for oligomer masses.
Number of decimal places after the decimal symbol for pH/pKa values.
Number of decimal places after the decimal symbol for polymer masses.
This variable holds the latest version of the format of the file containing the polymer chemistry definition.
Brought to 1 20230130 for massXpert2
Version number of the polymer sequence file format.
Regular expression that matches the end of line in text files.
Regular expression that matches the m/z,i pairs in text files.
Map relating the MassToleranceType to a textual representation
Regular expression used to deconstruct the main formula into minus and plus component subformulas.
"([+-]?)([A-Z][a-z]*)(\\d*[\\.]?\\d*)"
See also Formula::splitActionParts().
Returns value incremented by the matching ppm part.
Returns value incremented by the matching res part.
Returns true if both double values value1 and value2, are equal within the double representation capabilities of the platform, false otherwise.
In the comparison, the decimal_places are taken into account.
Returns the number of zero decimals in value that are found between the decimal point and the first non-zero decimal.
For example, 0.11 would return 0 (no empty decimal)
2.001 would return 2
1000.0001254 would return 3
Returns the average of the list of double values.
All the values in list are process in order to compute the following:
statistical values if the corresponding parameters are non-nullptr.
See also doubleVectorStatistics().
Returns the delta value corresponding to value and ppm part-per-million.
Returns value decremented by the matching ppm part.
Returns value decremented by the matching res part.
Return the delta corresponding to value and resolution res.