libXpertMass Developer Documentation

libXpertMass Namespace

MsXpS::libXpertMass

Contains libXpertMass documentation. More...

Header: #include <libXpertMass>

Classes

class CalcOptions
class ChemicalGroup
class ChemicalGroupProp
class ChemicalGroupRule
class CleaveMotif
class CleaveRule
class CleaveSpec
class CoordinateList
class Coordinates
class CrossLink
class CrossLinkList
class CrossLinker
class CrossLinkerSpec
class DoubleProp
class Formula
class FragRule
class FragSpec
class IntProp
class Ionizable
class IonizeRule
class Isotope
class IsotopicClusterGenerator
class IsotopicClusterShaper
class IsotopicData
class IsotopicDataBaseHandler
class IsotopicDataLibraryHandler
class IsotopicDataManualConfigHandler
class IsotopicDataUserConfigHandler
class MassDataClient
class MassDataServer
class MassDataServerThread
class MassPeakShaper
class MassPeakShaperConfig
class Modif
class ModifProp
class ModifSpec
class Monomer
class MonomerSpec
class NoDeletePointerProp
class Oligomer
class PkaPhPi
class PkaPhPiDataParser
class PolChemDef
class PolChemDefEntity
class Polymer
class Ponderable
class Prop
class PropListHolder
class Sequence
class StringProp

Types

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 }
FormulaChargePair
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 }
IsotopeCstSPtr
enum class IsotopeFields { ID, ELEMENT, SYMBOL, ATOMIC_NUMBER, MASS, …, RADIOACTIVE }
IsotopeSPtr
IsotopicClusterChargePair
IsotopicClusterGeneratorCstSPtr
IsotopicClusterGeneratorSPtr
IsotopicDataCstSPtr
IsotopicDataLibraryHandlerCstSPtr
IsotopicDataLibraryHandlerSPtr
IsotopicDataManualConfigHandlerCstSPtr
IsotopicDataManualConfigHandlerSPtr
IsotopicDataSPtr
enum class IsotopicDataType { NOT_SET, LIBRARY_CONFIG, USER_CONFIG, MANUAL_CONFIG }
enum class MassPeakShapeType { GAUSSIAN, LORENTZIAN }
MassPeakShaperSPtr
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 }
OligomerCstSPtr
OligomerSPtr
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 }

Variables

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
QRegularExpression gEndOfLineRegExp
QRegularExpression gXyFormatMassDataRegExp
QMap<int, QString> massToleranceTypeMap

Functions

double addPpm(double value, double ppm)
double addRes(double value, double res)
bool almostEqual(double value1, double value2, int decimal_places = 10)
QString binaryRepresentation(int value)
QString configSettingsFilePath(const QString &module_name)
int countZeroDecimals(double value)
void doubleListStatistics(QList<double> list, double *sum, double *average, double *variance, double *stdDeviation, double *nonZeroSmallest, double *smallest, double *smallestMedian, double *greatest)
void doubleVectorStatistics(std::vector<double> &vector, double *sum, double *average, double *variance, double *stdDeviation, double *nonZeroSmallest, double *smallest, double *smallestMedian, double *greatest)
QString elideText(const QString &text, int chars_left = 4, int chars_right = 4, const QString &delimiter = "...")
QString pointerAsString(void *pointer)
double ppm(double value, double ppm)
QTextStream &qStdOut()
double removePpm(double value, double ppm)
double removeRes(double value, double res)
double res(double value, double res)
QString stanzify(const QString &text, int width)
QString stanzifyParagraphs(const QString &text, int width)
QString &unspacifyString(QString &text)

Detailed Description

Classes

class CalcOptions

The CalcOptions class provides the specifications that configure the way masses are calculated for Oligomers, Polymers and product ions. More...

class ChemicalGroup

The ChemicalGroup class provides a model for specifying the acido-basic behaviour of a chemical group of either a Monomer object or of a Modif object. More...

class ChemicalGroupProp

The ChemicalGroupProp class provides a Prop instance of which the member data points to a dynamically allocated ChemicalGroup instance. More...

class ChemicalGroupRule

The ChemicalGroupRule class provides a model for refining the acido-basic behaviour of a chemical group of either a Monomer object or of a Modif object. More...

class CleaveMotif

The CleaveMotif class provides a model for specifying aqueous cleavage sites of Polymer Sequences. More...

class CleaveRule

The CleaveRule class provides a model for specifying aqueous cleavage rules for refining cleavage specifications (CleaveSpec) of Polymer Sequences. More...

class CleaveSpec

The CleaveSpec class provides a model for specifying aqueous cleavage specifications (patterns) of Polymer Sequences. More...

class CoordinateList

The CoordinateList class provides a list of Coordinates allocated instances. More...

class Coordinates

The Coordinates class provides the localization of a sequence region in a Polymer Sequence. More...

class CrossLink

The CrossLink class provides abstractions to work with a cross-link entity between Monomer instances. More...

class CrossLinkList

The CrossLinkList class provides a list of CrossLink instances. More...

class CrossLinker

The CrossLinker class provides abstractions to define the chemical basis of a cross-linking reaction. More...

class CrossLinkerSpec

The CrossLinkerSpec class provides the specification about how CrossLinker objects are represented. More...

class DoubleProp

The DoubleProp class is the specialized class for properties that hold data in the form of double values. More...

class Formula

The Formula class provides sophisticated abstractions to work with formulas. More...

class FragRule

The FragRule class provides a model for specifying gas phase fragmentation rules for refining fragmentation specifications (FragSpec) of Oligomer Sequences. More...

class FragSpec

The FragSpec class provides a model for specifying gas phase fragmentations of Oligomer Sequences. More...

class IntProp

The IntProp class is the specialized class for properties that hold data in the form of integer values. More...

class Ionizable

The Ionizable class provides abstractions to work with entities that have masses (base class Ponderable) and that can be ionized. More...

class IonizeRule

The IonizeRule class provides an ionization rule. More...

class Isotope

The Isotope class models an isotope. More...

class IsotopicClusterGenerator

The IsotopicClusterGenerator class provides the features needed to model isotopic clusters starting from (elemental-composition, charge) pairs. More...

class IsotopicClusterShaper

The IsotopicClusterShaper class provides the features needed to shape sets of (peak centroid m/z, intensity) pairs associated to a given charge into a mass spectral pappso;:Trace. More...

class IsotopicData

The IsotopicData class provides a collection of Isotopes and associated methods to access them in various ways. More...

class IsotopicDataBaseHandler

The IsotopicDataBaseHandler class features basic handling of IsotopicData. More...

class IsotopicDataLibraryHandler

The IsotopicDataLibraryHandler class handles IsotopicData from the IsoSpec element data tables directly from the library's data. These are the reference, pristine, unmodified, isotopic data. More...

class IsotopicDataManualConfigHandler

The IsotopicDataManualConfigHandler class handles a peculiar kind of IsotopicData that cannot be handled with the other handlers. More...

class IsotopicDataUserConfigHandler

The IsotopicDataUserConfigHandler class handles user-defined IsotopicData. More...

class MassDataClient

The MassDataClient class provides a network client. More...

class MassDataServer

The MassDataServer class provides a network server. More...

class MassDataServerThread

The MassDataServerThread class provides a server in a QThread instance. More...

class MassPeakShaper

The MassPeakShaper class provides the features needed to shape a mass peak. More...

class MassPeakShaperConfig

The MassPeakShaperConfig class provides the features required to configure the shaping of a mass peak centroid into a Gaussian or a Lorentzian fully profiled shape. More...

class Modif

The Modif class provides abstractions to work with chemical modifications. More...

class ModifProp

The ModifProp class provides a Prop instance of which the member data points to a dynamically allocated Modif instance. More...

class ModifSpec

The ModifSpec class provides the specification about how Modif objects are represented. More...

class Monomer

The Monomer class provides abstractions to work with monomers. More...

class MonomerSpec

The MonomerSpec class provides the specification about how Monomer objects are represented. More...

class NoDeletePointerProp

The NoDeletePointerProp class provides a pointer property. More...

class Oligomer

The Oligomer class provides abstractions to work with an oligomer molecule (peptide , for example). More...

class PkaPhPi

The PkaPhPi class provides a model for specifying the acido-basic properties of a chemical entity. More...

class PkaPhPiDataParser

The PkaPhPiDataParser class provides a file reader for the pKa, pH, pI data XML file.. More...

class PolChemDef

The PolChemDef class provides a complete set of chemical entities fully qualifying a polymer chemistry definition, like Proteins, Saccharides or Nucleic acids. More...

class PolChemDefEntity

The PolChemDefEntity class describes a chemical entity that belongs to a specific PolChemDef polymer chemistry definition. More...

class Polymer

The Polymer class provides abstractions to work with a polymer molecule (protein or saccharide , for example). More...

class Ponderable

The Ponderable class provides an abstraction for any chemical entity having a monoisotopic and an average mass. More...

class Prop

The Prop class is the abstract base class for a number of specialized properties. More...

class PropListHolder

The PropListHolder class is the base class for a number of classes that need storing Prop instances. More...

class Sequence

The Sequence class provides abstractions to work with a simple sequence of Monomers. More...

class StringProp

The StringProp class is the specialized class for properties that hold data in the form of string objects. More...

Type Documentation

enum libXpertMass::CapType

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.

ConstantValueDescription
MsXpS::libXpertMass::CAP_NONE0 << 1The cap is not defined
MsXpS::libXpertMass::CAP_LEFT1 << 1The left cap
MsXpS::libXpertMass::CAP_RIGHT2 << 1The right cap
MsXpS::libXpertMass::CAP_BOTH(CAP_LEFT | CAP_RIGHT)(CAP_LEFT | CAP_RIGHT)

enum libXpertMass::ChemicalGroupRuleFate

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.

ConstantValueDescription
MsXpS::libXpertMass::LOST0The chemical group is lost upon modification of the Monomer.
MsXpS::libXpertMass::PRESERVED1The chemical group is preserved upon modification of the Monomer.

enum libXpertMass::ChemicalGroupTrapping

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.

ConstantValueDescription
MsXpS::libXpertMass::NEVER_TRAPPED1 << 0The chemical group is not lost upon polymerization, it should thus always be accounted for.
MsXpS::libXpertMass::LEFT_TRAPPED1 << 1The chemical group gets trapped in the inter-monomer bond if polymerization occurs at left of the Monomer.
MsXpS::libXpertMass::RIGHT_TRAPPED1 << 2The chemical group gets trapped in the inter-monomer bond if polymerization occurs at right of the Monomer.

enum libXpertMass::CrossLinkEncompassed

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:

ConstantValueDescription
MsXpS::libXpertMass::CROSS_LINK_ENCOMPASSED_NO0The region does not contain any Monomer involved in a CrossLink.
MsXpS::libXpertMass::CROSS_LINK_ENCOMPASSED_PARTIAL1The region contains one or more Monomers involved in a CrossLink but not all.
MsXpS::libXpertMass::CROSS_LINK_ENCOMPASSED_FULL2All the Monomers involved in the CrossLink are contained in the Polymer or Oligomer region.

[alias] libXpertMass::FormulaChargePair

Alias for std::pair<QString, int>.

enum class libXpertMass::FormulaSplitResult

This enum type specifies the result of an actionformula parsing process:

ConstantValueDescription
MsXpS::libXpertMass::FormulaSplitResult::NOT_SET0x0000The value was not set
MsXpS::libXpertMass::FormulaSplitResult::FAILURE1 << 0The splitting work failed
MsXpS::libXpertMass::FormulaSplitResult::HAS_PLUS_COMPONENT1 << 1The action formula has a plus component
MsXpS::libXpertMass::FormulaSplitResult::HAS_MINUS_COMPONENT1 << 2The 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

enum libXpertMass::FragEnd

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.

ConstantValueDescription
MsXpS::libXpertMass::FRAG_END_NONE1 << 0The value is not set.
MsXpS::libXpertMass::FRAG_END_LEFT1 << 1The generated fragment contains the left end of the oligomer
MsXpS::libXpertMass::FRAG_END_RIGHT1 << 2The 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)

enum libXpertMass::HashAccountData

This enum specifies the chemical entites to account for when calculating a hash.

ConstantValueDescription
MsXpS::libXpertMass::HASH_ACCOUNT_SEQUENCE1 << 0The sequence
MsXpS::libXpertMass::HASH_ACCOUNT_MONOMER_MODIF1 << 1Monomer modifications
MsXpS::libXpertMass::HASH_ACCOUNT_POLYMER_MODIF1 << 2Polymer modifications

IsotopeCstSPtr

Synonym for std::shared_ptr<const Isotope>.

enum class libXpertMass::IsotopeFields

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

ConstantValueDescription
MsXpS::libXpertMass::IsotopeFields::ID0Indicates Isotope::m_id.
MsXpS::libXpertMass::IsotopeFields::ELEMENT1Indicates Isotope::m_element.
MsXpS::libXpertMass::IsotopeFields::SYMBOL2Indicates the Isotope::m_symbol.
MsXpS::libXpertMass::IsotopeFields::ATOMIC_NUMBER3Indicates the Isotope::m_atomicNo.
MsXpS::libXpertMass::IsotopeFields::MASS4Indicates the Isotope::m_mass.
MsXpS::libXpertMass::IsotopeFields::MASS_NUMBER5Indicates the Isotope::m_massNo.
MsXpS::libXpertMass::IsotopeFields::EXTRA_NEUTRONS6Indicates the Isotope::m_extraNeutrons.
MsXpS::libXpertMass::IsotopeFields::PROBABILITY7Indicates the Isotope::m_probability.
MsXpS::libXpertMass::IsotopeFields::LN_PROBABILITY8Indicates the Isotope::m_lnProbability.
MsXpS::libXpertMass::IsotopeFields::RADIOACTIVE9Indicates the Isotope::m_radioactive.

IsotopeSPtr

Synonym for std::shared_ptr<Isotope>.

[alias] libXpertMass::IsotopicClusterChargePair

Alias for std::pair<pappso::TraceCstSPtr, int>.

IsotopicClusterGeneratorCstSPtr

Synonym for std::shared_ptr<const IsotopicClusterGenerator>.

IsotopicClusterGeneratorSPtr

Synonym for std::shared_ptr<IsotopicClusterGenerator>.

IsotopicDataCstSPtr

Synonym for std::shared_ptr<const IsotopicData>.

IsotopicDataLibraryHandlerCstSPtr

Synonym for std::shared_ptr<const IsotopicDataLibraryHandler>.

IsotopicDataLibraryHandlerSPtr

Synonym for std::shared_ptr<IsotopicDataLibraryHandler>.

IsotopicDataManualConfigHandlerCstSPtr

Synonym for std::shared_ptr<const IsotopicDataManualConfigHandler>.

IsotopicDataManualConfigHandlerSPtr

Synonym for std::shared_ptr<IsotopicDataManualConfigHandler>.

IsotopicDataSPtr

Synonym for std::shared_ptr<IsotopicData>.

enum class libXpertMass::IsotopicDataType

This enum specifies the type of isotopic data.

ConstantValueDescription
MsXpS::libXpertMass::IsotopicDataType::NOT_SET0: Not configured. .
MsXpS::libXpertMass::IsotopicDataType::LIBRARY_CONFIG1: The isotopic data are loaded intact from the IsoSpec library data and are considered pristine natural abundance data. .
MsXpS::libXpertMass::IsotopicDataType::USER_CONFIG2: 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_CONFIG3: The isotopic data are in a specific format, different than the two above, that actually crafts the isotopes starting from scratch.

enum class libXpertMass::MassPeakShapeType

This enum specifies the type of mass peak shape to be computed around a m/z peak centroid.

ConstantValueDescription
MsXpS::libXpertMass::MassPeakShapeType::GAUSSIAN1The peak will be shaped using the Gaussian model.
MsXpS::libXpertMass::MassPeakShapeType::LORENTZIAN2The peak will be shaped using the Lorentizan model.

MassPeakShaperSPtr

Synonym for std::shared_ptr<MassPeakShaper>.

enum class libXpertMass::MassPeakWidthLogic

This enum specifies the logic used to computed the width of the mass peak shape around a m/z peak centroid.

ConstantValueDescription
MsXpS::libXpertMass::MassPeakWidthLogic::FWHM1The full width at half maximum is directly used to compute the peak shape width.
MsXpS::libXpertMass::MassPeakWidthLogic::RESOLUTION2The resolving power of the instrument is the starting point to compute the FWHM.

enum libXpertMass::MassToleranceType

This enum type specifies the kind of mass tolerance to use for a mass calculation or a mass comparison.

ConstantValueDescription
MsXpS::libXpertMass::MASS_TOLERANCE_NONE0The tolerance is not specified
MsXpS::libXpertMass::MASS_TOLERANCE_PPM1The tolerance is based on parts per million
MsXpS::libXpertMass::MASS_TOLERANCE_MZ2The tolerance is based on an absolute m/z value
MsXpS::libXpertMass::MASS_TOLERANCE_AMU3The tolerance is based on an absolute mass value
MsXpS::libXpertMass::MASS_TOLERANCE_RES4The tolerance is based on resolution

enum libXpertMass::MassType

This enum type specifies the type of mass:

ConstantValueDescription
MsXpS::libXpertMass::MASS_NONE0x0000The mass type is not defined
MsXpS::libXpertMass::MASS_MONO1 << 0The mass is monoisotopic
MsXpS::libXpertMass::MASS_AVG1 << 1The mass is average
MsXpS::libXpertMass::MASS_BOTH(MASS_MONO | MASS_AVG)(MASS_MONO | MASS_AVG)

enum libXpertMass::MonomerChemEnt

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.

ConstantValueDescription
MsXpS::libXpertMass::MONOMER_CHEMENT_NONE0 << 1The monomer chemical entity is not defined.
MsXpS::libXpertMass::MONOMER_CHEMENT_MODIF1 << 1The monomer modifications
MsXpS::libXpertMass::MONOMER_CHEMENT_CROSS_LINK1 << 2The monomer cross-links

OligomerCstSPtr

Synonym for std::shared_ptr<const Oligomer> OligomerSPtr.

OligomerSPtr

Synonym for std::shared_ptr<Oligomer> OligomerSPtr.

enum libXpertMass::PolymerChemEnt

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.

ConstantValueDescription
MsXpS::libXpertMass::POLYMER_CHEMENT_NONE1 << 0The polymer chemical entity is not defined.
MsXpS::libXpertMass::POLYMER_CHEMENT_LEFT_END_MODIF1 << 1The left end modification
MsXpS::libXpertMass::POLYMER_CHEMENT_FORCE_LEFT_END_MODIF1 << 2The left end modification, even if that polymer's end is not selected
MsXpS::libXpertMass::POLYMER_CHEMENT_RIGHT_END_MODIF1 << 3The right end modification
MsXpS::libXpertMass::POLYMER_CHEMENT_FORCE_RIGHT_END_MODIF1 << 4The 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)

enum libXpertMass::PolymerEnd

This enum specifies the polymer end.

ConstantValueDescription
MsXpS::libXpertMass::END_NONE0 << 1Not defined
MsXpS::libXpertMass::END_LEFT1 << 1The left end
MsXpS::libXpertMass::END_RIGHT2 << 1The right end
MsXpS::libXpertMass::END_BOTH(END_LEFT | END_RIGHT)(END_LEFT | END_RIGHT)

enum libXpertMass::SelectionType

This enum specifies the selection type in a polymer sequence.

ConstantValueDescription
MsXpS::libXpertMass::SELECTION_TYPE_RESIDUAL_CHAINS0The selection comprises only residues
MsXpS::libXpertMass::SELECTION_TYPE_OLIGOMERS1The selection comprises oligomers, that is, residual chains capped with the left and right caps.

Variable Documentation

int libXpertMass::ATOM_DEC_PLACES

Number of decimal places after the decimal symbol for atom masses.

int libXpertMass::FWHM_PEAK_SPAN_FACTOR

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 ----->

int libXpertMass::OLIGOMER_DEC_PLACES

Number of decimal places after the decimal symbol for oligomer masses.

int libXpertMass::PH_PKA_DEC_PLACES

Number of decimal places after the decimal symbol for pH/pKa values.

int libXpertMass::POLYMER_DEC_PLACES

Number of decimal places after the decimal symbol for polymer masses.

const int libXpertMass::POL_CHEM_DEF_FILE_FORMAT_VERSION

This variable holds the latest version of the format of the file containing the polymer chemistry definition.

Brought to 1 20230130 for massXpert2

const int libXpertMass::POL_SEQ_FILE_FORMAT_VERSION

Version number of the polymer sequence file format.

QRegularExpression libXpertMass::gEndOfLineRegExp

Regular expression that matches the end of line in text files.

QRegularExpression libXpertMass::gXyFormatMassDataRegExp

Regular expression that matches the m/z,i pairs in text files.

QMap<int, QString> libXpertMass::massToleranceTypeMap

Map relating the MassToleranceType to a textual representation

Function Documentation

double libXpertMass::addPpm(double value, double ppm)

Returns value incremented by the matching ppm part.

double libXpertMass::addRes(double value, double res)

Returns value incremented by the matching res part.

bool libXpertMass::almostEqual(double value1, double value2, int decimal_places = 10)

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.

QString libXpertMass::binaryRepresentation(int value)

Returns a string with a binary representation of the value integer.

QString libXpertMass::configSettingsFilePath(const QString &module_name)

Returns a string holding the the file path to the configuration settings for application module_name.

int libXpertMass::countZeroDecimals(double value)

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

void libXpertMass::doubleListStatistics(QList<double> list, double *sum, double *average, double *variance, double *stdDeviation, double *nonZeroSmallest, double *smallest, double *smallestMedian, double *greatest)

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

void libXpertMass::doubleVectorStatistics(std::vector<double> &vector, double *sum, double *average, double *variance, double *stdDeviation, double *nonZeroSmallest, double *smallest, double *smallestMedian, double *greatest)

Returns the average of the vector 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 doubleListStatistics().

QString libXpertMass::elideText(const QString &text, int chars_left = 4, int chars_right = 4, const QString &delimiter = "...")

Returns a shortened (elided) version of the text string.

It is sometimes necessary to display, in a graphical user interface a very long string, that cannot fit in the provided widget. This function returns a shortened version of the input string.

For example, "Interesting bits of information are often lost where there are too many details", becomes "Interes...details".

chars_left: Count of characters to be kept on the left side of the string.

chars_right: Count of characters to be kept on the right side of the string.

delimiter string to use as the elision delimiter (in the above example, that is '.').

QString libXpertMass::pointerAsString(void *pointer)

Returns a string representing the pointer address location (for debugging).

double libXpertMass::ppm(double value, double ppm)

Returns the delta value corresponding to value and ppm part-per-million.

QTextStream &libXpertMass::qStdOut()

Provides a text stream handle to the standard output.

Use:

qStdOut() << __FILE__ << __LINE__
                        << "text to the standard output,"
                        << "not the error standard output."

Returns a reference to a static QTextStream that directs to the standard output.

double libXpertMass::removePpm(double value, double ppm)

Returns value decremented by the matching ppm part.

double libXpertMass::removeRes(double value, double res)

Returns value decremented by the matching res part.

double libXpertMass::res(double value, double res)

Return the delta corresponding to value and resolution res.

QString libXpertMass::stanzify(const QString &text, int width)

Returns a string containing a paragraph-based version of the very long single-line text.

When a text string is too long to be displayed in a line of reasonable length, inserts newline characters at positions calculated to yield a paragraph of the given width.

See also stanzifyParagraphs().

QString libXpertMass::stanzifyParagraphs(const QString &text, int width)

Returns a string containing a series of paragraph-based versions of the very long single-line-containing paragraphs in text.

text is a string with newline characters that delimit paragraph that thelmselves are made of a very long single line. This function splits text along the '\n' character and each obtained very long single-line string is reduced to a set of lines to make a pararagraph (see stanzify). The with of the line in that generated paragraph is width.

See also stanzify().

QString &libXpertMass::unspacifyString(QString &text)

Removes all space characters from the text string (the removal is in-place).

Returns a reference to the in-place-modified string.