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

    class MsXpS::libXpertMassCore::Cleaver

    The Cleaver class provides a model for performing aqueous cleavage reactions involving CleavageAgent objects and Polymer Sequences. More...

    Header: #include <MsXpS/libXpertMassCore/Cleaver.hpp>

    Public Functions

    Cleaver()
    Cleaver(MsXpS::libXpertMassCore::PolymerCstQSPtr polymer_cqsp, MsXpS::libXpertMassCore::PolChemDefCstSPtr pol_chem_def_csp, const MsXpS::libXpertMassCore::CleavageConfig &cleavage_config, const MsXpS::libXpertMassCore::CalcOptions &calc_options, const MsXpS::libXpertMassCore::Ionizer &ionizer)
    Cleaver(const MsXpS::libXpertMassCore::Cleaver &other)
    ~Cleaver()
    bool accountCleavageRule(MsXpS::libXpertMassCore::CleavageRuleSPtr cleavage_rule_sp, MsXpS::libXpertMassCore::OligomerSPtr oligomer_sp)
    int analyzeCrossLinkedOligomer(MsXpS::libXpertMassCore::OligomerSPtr oligomer_sp, MsXpS::libXpertMassCore::OligomerCollection &oligomers)
    int analyzeCrossLinks(MsXpS::libXpertMassCore::OligomerCollection &oligomers)
    bool cleave(bool reset = false)
    int cleavePartial(int partial_cleavage)
    int fillCleavageIndices()
    QString getCleaveAgentName() const
    const MsXpS::libXpertMassCore::OligomerCollection &getOligomerCollectionCstRef() const
    MsXpS::libXpertMassCore::OligomerCollection &getOligomerCollectionRef()
    int removeDuplicateCleavageIndices()
    int resolveCleavageNoCleavage()
    std::size_t transferOligomers(MsXpS::libXpertMassCore::OligomerCollection &source, MsXpS::libXpertMassCore::OligomerCollection &dest)
    bool operator!=(const MsXpS::libXpertMassCore::Cleaver &other) const
    MsXpS::libXpertMassCore::Cleaver &operator=(const MsXpS::libXpertMassCore::Cleaver &other)
    bool operator==(const MsXpS::libXpertMassCore::Cleaver &other) const

    Protected Variables

    MsXpS::libXpertMassCore::CalcOptions m_calcOptions
    MsXpS::libXpertMassCore::CleavageConfig m_cleavageConfig
    std::vector<int> m_doCleaveIndices
    std::vector<int> m_doNotCleaveIndices
    MsXpS::libXpertMassCore::Ionizer m_ionizer
    MsXpS::libXpertMassCore::OligomerCollection m_oligomers
    MsXpS::libXpertMassCore::PolymerCstQSPtr mcqsp_polymer
    MsXpS::libXpertMassCore::PolChemDefCstSPtr mcsp_polChemDef

    Detailed Description

    See also CleavageAgent, CleavageMotif, CleavageConfig, and Ionizer.

    Member Function Documentation

    Cleaver::Cleaver()

    Constructs an uninitialized Cleaver instance.

    Cleaver::Cleaver(MsXpS::libXpertMassCore::PolymerCstQSPtr polymer_cqsp, MsXpS::libXpertMassCore::PolChemDefCstSPtr pol_chem_def_csp, const MsXpS::libXpertMassCore::CleavageConfig &cleavage_config, const MsXpS::libXpertMassCore::CalcOptions &calc_options, const MsXpS::libXpertMassCore::Ionizer &ionizer)

    Constructs a Cleaver instance initialized with a number of parameters.

    None of polymer_cqsp and pol_chem_def_csp can be nullptr or qFatal() is called.

    Cleaver::Cleaver(const MsXpS::libXpertMassCore::Cleaver &other)

    Constructs Cleaver instance as a copy of other.

    [noexcept] Cleaver::~Cleaver()

    Desstructs this Cleaver instance

    bool Cleaver::accountCleavageRule(MsXpS::libXpertMassCore::CleavageRuleSPtr cleavage_rule_sp, MsXpS::libXpertMassCore::OligomerSPtr oligomer_sp)

    Accounts for the CleavageRule cleavage_rule_sp in the Oligomer oligomer_sp .

    Returns true if the accounting succeeded, false otherwise.

    int Cleaver::analyzeCrossLinkedOligomer(MsXpS::libXpertMassCore::OligomerSPtr oligomer_sp, MsXpS::libXpertMassCore::OligomerCollection &oligomers)

    Pulls down all the Oligomer instances in oligomers that are found to be cross-linked to oligomer_sp.

    Returns the count of IndexRange instances found in oligomer_sp, which is a reflection of the number of oligomers that are found to be cross-linked to it.

    Analyzes the CrossLink instances that might be involved in the Oligomer instances in the oligomers collection.

    The Oligomers that are found to be cross-linked are set in oligomers and the size of this collection is returned.

    bool Cleaver::cleave(bool reset = false)

    Performs the actual cleavage, thus generating Oligomer instances that are added to the m_oligomers member OligomerCollection instance.

    If reset is true, the member OligomerCollection is first cleared; otherwise the newly generated Oligomer instances are simply added to it.

    Returns true upon success, false otherwise.

    int Cleaver::cleavePartial(int partial_cleavage)

    Performs a cleavage operation for partial cleavage partial_cleavage.

    Returns -1 if an error occurred, the count of generated Oligomers otherwise.

    int Cleaver::fillCleavageIndices()

    Fills-in all the index values that correspond to precise locations where the cleavage reactions must occur. These indices represent locations in the member Polymer's Sequence.

    If the pattern only contains cleaving sites, all the indices are added to the member container of cleavage indices. If the pattern contains also no-cleaving sites (like with Trypsin's "-Lys/Pro" pattern), then the corresponding indices are set to the member container of no-cleavage indices.

    Returns the sum of the two cleavage/no-cleavage containers sizes. Or 0 if not a single cleavage site was found in the Polymer Sequence.

    QString Cleaver::getCleaveAgentName() const

    Returns the CleavageAgent name (from the member CleavageConfig::m_name).

    const MsXpS::libXpertMassCore::OligomerCollection &Cleaver::getOligomerCollectionCstRef() const

    Returns a const reference to the member OligomerCollection instance.

    MsXpS::libXpertMassCore::OligomerCollection &Cleaver::getOligomerCollectionRef()

    Returns a reference to the member OligomerCollection instance.

    int Cleaver::removeDuplicateCleavageIndices()

    Removes the duplicate cleavage indices from the container of cleavage indices and returns the count of items in the member m_doCleaveIndices container.

    int Cleaver::resolveCleavageNoCleavage()

    Removes from the m_doCleaveIndices member container of cleavage indices all the indices found in the m_doNotCleaveIndices member no-cleavage indices container.

    Returns the size of the container of cleavage indices.

    std::size_t Cleaver::transferOligomers(MsXpS::libXpertMassCore::OligomerCollection &source, MsXpS::libXpertMassCore::OligomerCollection &dest)

    Transfers (using std::move()) all the Oligomer instances from source to dest.

    After the transfer, the source Oligomer container is cleared since it contains only nullptr items.

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

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

    Returns the negated value of operator==().

    See also operator==().

    MsXpS::libXpertMassCore::Cleaver &Cleaver::operator=(const MsXpS::libXpertMassCore::Cleaver &other)

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

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

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

    See also operator!=().

    Member Variable Documentation

    MsXpS::libXpertMassCore::CalcOptions Cleaver::m_calcOptions

    This variable holds the CalcOptions that configure the way masses and formulas are to be computed.

    MsXpS::libXpertMassCore::CleavageConfig Cleaver::m_cleavageConfig

    This variable holds the CleavageConfig that configures the cleavage reaction.

    std::vector<int> Cleaver::m_doCleaveIndices

    This variable holds the container of indices in the Polymer sequence that are actual sites of cleavage.

    std::vector<int> Cleaver::m_doNotCleaveIndices

    This variable holds the container of indices in the Polymer sequence that are not sites of cleavage.

    MsXpS::libXpertMassCore::Ionizer Cleaver::m_ionizer

    This variable holds the Ionizer that directs the ionization of the Oligomer instances obtained by cleaving the Polymer.

    MsXpS::libXpertMassCore::OligomerCollection Cleaver::m_oligomers

    This variable holds the container of Oligomer instances generated as a result of the cleavage.

    MsXpS::libXpertMassCore::PolymerCstQSPtr Cleaver::mcqsp_polymer

    This variable holds the Polymer polymer that is being cleaved (digested).

    MsXpS::libXpertMassCore::PolChemDefCstSPtr Cleaver::mcsp_polChemDef

    This variable holds the PolChemDef polymer chemistry definition.