libXpertMassCore and libXpertMassGui Developer Documentation
  • libXpertMassCore
  • CalcOptions
  • MsXpS::libXpertMassCore::CalcOptions Class

    class MsXpS::libXpertMassCore::CalcOptions

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

    Header: #include <MsXpS/libXpertMassCore/CalcOptions.hpp>
    Inherits: QObject

    Public Functions

    CalcOptions(QObject *parent = nullptr)
    CalcOptions(bool deepCalculation, MsXpS::libXpertMassCore::Enums::MassType mass_type, MsXpS::libXpertMassCore::Enums::CapType capping, MsXpS::libXpertMassCore::Enums::ChemicalEntity monomer_entities, MsXpS::libXpertMassCore::Enums::ChemicalEntity polymer_entities, QObject *parent = nullptr)
    CalcOptions(const MsXpS::libXpertMassCore::CalcOptions &other, QObject *parent = nullptr)
    virtual ~CalcOptions()
    MsXpS::libXpertMassCore::CalcOptions *clone(QObject *parent = nullptr)
    MsXpS::libXpertMassCore::Enums::CapType getCapType() const
    MsXpS::libXpertMassCore::IndexRangeCollection *getIndexRangeCollection()
    const MsXpS::libXpertMassCore::IndexRangeCollection &getIndexRangeCollectionCstRef() const
    MsXpS::libXpertMassCore::IndexRangeCollection &getIndexRangeCollectionRef()
    MsXpS::libXpertMassCore::Enums::MassType getMassType() const
    MsXpS::libXpertMassCore::Enums::ChemicalEntity getMonomerEntities() const
    MsXpS::libXpertMassCore::Enums::ChemicalEntity getPolymerEntities() const
    MsXpS::libXpertMassCore::Enums::SelectionType getSelectionType() const
    MsXpS::libXpertMassCore::CalcOptions &initialize(const MsXpS::libXpertMassCore::CalcOptions &other, QObject *parent = nullptr)
    bool isDeepCalculation() const
    void setCapType(MsXpS::libXpertMassCore::Enums::CapType cap_type)
    void setDeepCalculation(bool deep)
    void setIndexRange(const MsXpS::libXpertMassCore::IndexRange &index_range = IndexRange())
    void setIndexRange(qsizetype index_start, qsizetype index_stop)
    void setIndexRanges(const MsXpS::libXpertMassCore::IndexRangeCollection &index_ranges)
    void setMassType(MsXpS::libXpertMassCore::Enums::MassType mass_type)
    void setMonomerEntities(MsXpS::libXpertMassCore::Enums::ChemicalEntity monomer_chem_ent)
    void setPolymerEntities(MsXpS::libXpertMassCore::Enums::ChemicalEntity polymer_chem_ent)
    void setSelectionType(MsXpS::libXpertMassCore::Enums::SelectionType selection_type)
    QString toString() const
    bool operator!=(const MsXpS::libXpertMassCore::CalcOptions &other) const
    bool operator==(const MsXpS::libXpertMassCore::CalcOptions &other) const

    Static Public Members

    MsXpS::libXpertMassCore::CalcOptions *clone(const MsXpS::libXpertMassCore::CalcOptions &other, QObject *parent = nullptr)

    Protected Variables

    MsXpS::libXpertMassCore::Enums::CapType m_capType
    bool m_deepCalculation
    MsXpS::libXpertMassCore::Enums::MassType m_massType
    MsXpS::libXpertMassCore::Enums::ChemicalEntity m_monomerEntities
    MsXpS::libXpertMassCore::Enums::ChemicalEntity m_polymerEntities
    MsXpS::libXpertMassCore::Enums::SelectionType m_selectionType
    MsXpS::libXpertMassCore::IndexRangeCollection *mpa_indexRangeCollection

    Detailed Description

    Member Function Documentation

    [explicit] CalcOptions::CalcOptions(QObject *parent = nullptr)

    Constructs a CalcOptions instance with default initialization.

    [explicit] CalcOptions::CalcOptions(bool deepCalculation, MsXpS::libXpertMassCore::Enums::MassType mass_type, MsXpS::libXpertMassCore::Enums::CapType capping, MsXpS::libXpertMassCore::Enums::ChemicalEntity monomer_entities, MsXpS::libXpertMassCore::Enums::ChemicalEntity polymer_entities, QObject *parent = nullptr)

    Constructs a CalcOptions instance using the parameters, including parentship establishment with parent.

    The following members are initialized using the parameters:

    The selection type is set by default to Enums::SelectionType::OLIGOMERS (not residual chain).

    [explicit] CalcOptions::CalcOptions(const MsXpS::libXpertMassCore::CalcOptions &other, QObject *parent = nullptr)

    Construct a CalcOptions instance as a copy of other setting parentship to parent.

    [virtual noexcept] CalcOptions::~CalcOptions()

    Destructs this CalcOptions instance.

    MsXpS::libXpertMassCore::CalcOptions *CalcOptions::clone(QObject *parent = nullptr)

    Allocates a new instance as a copy of this instance, setting parentship with parent.

    [static] MsXpS::libXpertMassCore::CalcOptions *CalcOptions::clone(const MsXpS::libXpertMassCore::CalcOptions &other, QObject *parent = nullptr)

    Allocates a new instance as a copy of other, setting parentship with parent.

    MsXpS::libXpertMassCore::Enums::CapType CalcOptions::getCapType() const

    Returns the cap type.

    See also m_capType.

    MsXpS::libXpertMassCore::IndexRangeCollection *CalcOptions::getIndexRangeCollection()

    Returns the member IndexRangeCollection instance.

    const MsXpS::libXpertMassCore::IndexRangeCollection &CalcOptions::getIndexRangeCollectionCstRef() const

    Returns a const reference to the member IndexRangeCollection instance.

    MsXpS::libXpertMassCore::IndexRangeCollection &CalcOptions::getIndexRangeCollectionRef()

    Returns a reference to the member IndexRangeCollection instance.

    MsXpS::libXpertMassCore::Enums::MassType CalcOptions::getMassType() const

    Returns the mass type.

    See also m_massType.

    MsXpS::libXpertMassCore::Enums::ChemicalEntity CalcOptions::getMonomerEntities() const

    Returns the monomer entities.

    See also m_monomerEntities.

    MsXpS::libXpertMassCore::Enums::ChemicalEntity CalcOptions::getPolymerEntities() const

    Returns the polymer entities.

    See also m_polymerEntities.

    MsXpS::libXpertMassCore::Enums::SelectionType CalcOptions::getSelectionType() const

    Returns the selection type.

    See also m_selectionType.

    MsXpS::libXpertMassCore::CalcOptions &CalcOptions::initialize(const MsXpS::libXpertMassCore::CalcOptions &other, QObject *parent = nullptr)

    Assigns other to this instance and returns a reference to this instance.

    If parent is not nullptr, parentship is set using parent.

    bool CalcOptions::isDeepCalculation() const

    Returns if the calculation should be deep.

    See also m_deepCalculation.

    void CalcOptions::setCapType(MsXpS::libXpertMassCore::Enums::CapType cap_type)

    Sets the cap type to cap_type.

    See also m_capType.

    void CalcOptions::setDeepCalculation(bool deep)

    Sets to deep the configuration defining if the mass calculations must involve the recalculation of the masses of all the Monomer instances.

    The deep calculation is typically requested when computing masses involving Monomer instances that might be modified with Modif instances.

    See also isDeepCalculation() and m_deepCalculation.

    void CalcOptions::setIndexRange(const MsXpS::libXpertMassCore::IndexRange &index_range = IndexRange())

    Copies index_range to the member IndexRangeCollection.

    Note: The member IndexRangeCollection instance is first emptied, making index_range essentially replacing its contents with a copy of index_range.

    void CalcOptions::setIndexRange(qsizetype index_start, qsizetype index_stop)

    Creates an IndexRange instance with index_start and index_stop and sets it as the sole member of the member IndexRangeCollection instance.

    Note: The member IndexRangeCollection container is first emptied, making the new IndexRange instance essentially replacing the container contents.

    void CalcOptions::setIndexRanges(const MsXpS::libXpertMassCore::IndexRangeCollection &index_ranges)

    Allocates a copy of each IndexRange instance in the index_ranges container and adds it to the member IndexRangeCollection instance.

    Note: The member IndexRangeCollection container is first emptied, having thus index_ranges essentially replacing its contents.

    void CalcOptions::setMassType(MsXpS::libXpertMassCore::Enums::MassType mass_type)

    Sets the mass type to mass_type.

    See also m_massType.

    void CalcOptions::setMonomerEntities(MsXpS::libXpertMassCore::Enums::ChemicalEntity monomer_chem_ent)

    Sets the monomer entities to monomer_chem_ent.

    See also m_monomerEntities.

    void CalcOptions::setPolymerEntities(MsXpS::libXpertMassCore::Enums::ChemicalEntity polymer_chem_ent)

    Sets the polymer entities to polymer_chem_ent.

    See also m_polymerEntities.

    void CalcOptions::setSelectionType(MsXpS::libXpertMassCore::Enums::SelectionType selection_type)

    Set the selection type to selection_type.

    See also m_selectionType.

    QString CalcOptions::toString() const

    Returns a string describing this CalcOptions instance.

    bool CalcOptions::operator!=(const MsXpS::libXpertMassCore::CalcOptions &other) const

    Returns true if this instance is different than other, false otherwise.

    bool CalcOptions::operator==(const MsXpS::libXpertMassCore::CalcOptions &other) const

    Returns true if this instance is identical to other, false otherwise.

    Member Variable Documentation

    MsXpS::libXpertMassCore::Enums::CapType CalcOptions::m_capType

    This variable holds the cap type, left or right (or both), to account for in the calculations.

    By default, initializes to Enums::CapType::BOTH.

    See also Enums::CapType.

    bool CalcOptions::m_deepCalculation

    Tells if the calculations must involve the recalculation of all the masses of the Monomers in the sequence. This is typically needed when calculating masses involving modified Monomer instances, whereby each Monomer needs to recompute its mass taking into account the Modif instances attached to it.

    By default initializes to false.

    MsXpS::libXpertMassCore::Enums::MassType CalcOptions::m_massType

    This variable holds the mass type to compute, monoisotopic or average.

    By default, initializes to Enums::MassType::BOTH.

    See also Enums::MassType.

    MsXpS::libXpertMassCore::Enums::ChemicalEntity CalcOptions::m_monomerEntities

    This variable holds the Monomer entities to be accounted for in the calculations.

    By default, initializes to Enums::ChemicalEntity::NONE.

    In the protein realm, the left cap is the proton while the end cap is the hydroxyl.

    See also Enums::ChemicalEntity.

    MsXpS::libXpertMassCore::Enums::ChemicalEntity CalcOptions::m_polymerEntities

    This variable holds the Polymer entities to be accounted for in the calculations.

    By default, initializes to Enums::ChemicalEntity::NONE.

    See also Enums::ChemicalEntity.

    MsXpS::libXpertMassCore::Enums::SelectionType CalcOptions::m_selectionType

    This variable holds the manner the Monomers need to be accounted for: as residual chains or as finished-polymerization state sequences.

    The calculations might consider only the residual chain. In that case, only the mass of the monomers is considered and then the polymer is not in its finished polymerization state. If that latter state is required, then, the residual chain must be capped with both the left and the right end caps.

    By default, initializes to Enums::SelectionType::OLIGOMERS.

    See also MsXpS::libXpertMassCore::Enums::SelectionType.

    MsXpS::libXpertMassCore::IndexRangeCollection *CalcOptions::mpa_indexRangeCollection

    This variable holds the IndexRangeCollection container holds all the IndexRange instances that describe what regions of the Polymer need to be accounted for in the calculation. Most generally, there will be only one IndexRange, but there might be situations in which multiple regions might be selected.