| | |
The CleavageMotif class provides a model for specifying aqueous cleavage motfis of Polymer Sequences. More...
| Header: | #include <CleavageMotif.hpp> |
| CleavageMotif(MsXpS::libXpertMassCore::PolChemDefCstSPtr pol_chem_def_csp) | |
| CleavageMotif(MsXpS::libXpertMassCore::PolChemDefCstSPtr pol_chem_def_csp, const QString &motif, int offset, MsXpS::libXpertMassCore::Enums::CleavageAction cleavage_action) | |
| CleavageMotif(const MsXpS::libXpertMassCore::CleavageMotif &other) | |
| ~CleavageMotif() | |
| MsXpS::libXpertMassCore::Enums::CleavageAction | getCleavageAction() const |
| const std::vector<MsXpS::libXpertMassCore::MonomerSPtr> & | getMonomersCstRef() const |
| std::vector<MsXpS::libXpertMassCore::MonomerSPtr> & | getMonomersRef() |
| QString | getMotif() const |
| int | getOffset() const |
| MsXpS::libXpertMassCore::PolChemDefCstSPtr | getPolChemDefCstSPtr() const |
| std::size_t | parseMotif(const QString &motif) |
| std::size_t | parseSite(const QString &site) |
| void | setCleavageAction(MsXpS::libXpertMassCore::Enums::CleavageAction cleavage_action) |
| void | setMotif(const QString &motif) |
| void | setOffset(int offset) |
| void | setPolChemDefCstSPtr(MsXpS::libXpertMassCore::PolChemDefCstSPtr pol_chem_def_csp) |
| bool | validate(MsXpS::libXpertMassCore::ErrorList *error_list_p) const |
| bool | operator!=(const MsXpS::libXpertMassCore::CleavageMotif &other) const |
| MsXpS::libXpertMassCore::CleavageMotif & | operator=(const MsXpS::libXpertMassCore::CleavageMotif &other) |
| bool | operator==(const MsXpS::libXpertMassCore::CleavageMotif &other) const |
| MsXpS::libXpertMassCore::Enums::CleavageAction | m_cleavageAction |
| bool | m_isValid |
| std::vector<MsXpS::libXpertMassCore::MonomerSPtr> | m_monomers |
| std::size_t | m_offset |
| MsXpS::libXpertMassCore::PolChemDefCstSPtr | mcsp_polChemDef |
When a polymer sequence cleavage occurs, using, for example, the Trypsin cleavage agent, that cleavage agent specifies that cleavage should occur at the following sites "Lys/;Arg/;-Lys/Pro".
The "Lys/;Arg/;-Lys/Pro" string of sites gets parsed and cleavage motifs are generated from it. In this specific case, we'll have three CleavageMotif instances with the following data:
- First motif (or cleavage site): - "Lys" - monomer container: [0] = "Lys" - offset = 1 ('/' indicates that the cut is right of monomer) - is for cleavage ? = Enums::CleavageAction::CLEAVE
- Second motif (or cleavage site): - "Arg" - monomer container: [0] = "Arg" - offset = 1 ('/' indicates that the cut is right of monomer) - is for cleavage ? = Enums::CleavageAction::CLEAVE
- Third motif (or non-cleavage site): - "-LysPro" - monomer container: [0] = "Lys", [1] = "Pro" - offset = 1 ('/' indicates that the cut is right of monomer) - is for cleavage ? = Enums::CleavageAction::NO_CLEAVE
Thanks to this deconstruction (from "Lys/;Arg/;-Lys/Pro" to the 3 cleavage motifs above) is the polymer sequence cleaved according to the cleavage agent specification.
See also CleavageAgent and CleavageRule.
[explicit] CleavageMotif::CleavageMotif(MsXpS::libXpertMassCore::PolChemDefCstSPtr pol_chem_def_csp)Constructs a cleavage motif with pol_chem_def_csp as the polymer chemistry definition.
The instance will be invalid (m_isValid set to false).
[explicit] CleavageMotif::CleavageMotif(MsXpS::libXpertMassCore::PolChemDefCstSPtr pol_chem_def_csp, const QString &motif, int offset, MsXpS::libXpertMassCore::Enums::CleavageAction cleavage_action)Constructs a cleavage motif with a number of parameters.
After setting the member data, the CleavageMotif instance is validated and m_isValid is set to the result of this validation.
Constructs a CleavageMotif instance as a copy of other.
After setting the member data, the CleavageMotif instance is validated and m_isValid is set to the result of this validation.
[noexcept] CleavageMotif::~CleavageMotif()Destructs this CleavageMotif instance.
Returns if motif is for cleavage or not.
Returns a const reference to the container of Monomers.
Returns a reference to the container of Monomers.
Returns the motif as a concatenation of the codes of the Monomer instances found in the member container of Monomers.
Returns the offset.
Returns the PolChemDef.
Parses the cleavage motif and returns the count of Monomer instances stored in m_monomers as a result of parsing the motif.
A cleavage motif is a string in the form "LysPro" or "Asp" (in fact that is the string representation of a Sequence).
Parses the cleavage site and returns the count of Monomer instances stored in the member container as a result of parsing the site.
A cleavage site is a string in the form "Lys/Pro" or "/Asp". The member container of Monomer pointers is filled-in with pointers to the PolChemDef's Monomer instances having codes {Lys, Pro} or {Asp}. The offset is the position of the '/' cleavage symbol (that is, the actual cleavage position in the motif). For "Lys/Pro", the offset is 1 while for "/Asp", the offset is 0.
After setting the member data, the CleavageMotif instance is validated and m_isValid is set to the result of this validation.
Sets the member Enums::CleavageAction to cleavage_action.
This instance then undergoes validation and m_isValid is set to the result of it.
Parses the motif and fills-in the member container of Monomers as a result of the parsing.
See also parseMotif().
Sets the offset.
The offset is the position of the cleavage inside the motif, with reset to the first monomer code in that motif. For example, for a cleavage site "Lys/Pro", the cleavage motif becomes {"Lys", "Pro"} and the offset is 1, while for a site "/Asp", the cleavage motif becomes {"Asp"} and the offset is 0.
An offset value can thus not be greater than the number of Monomer codes in the motif.
This instance then undergoes validation and m_isValid is set to the result of it.
Sets the PolChemDef member to pol_chem_def_csp.
This instance then undergoes validation and m_isValid is set to the result of it.
Returns true if validation of this CleavageMotif instance was successful, false otherwise.
If errors are encountered and error_list_p is not nullptr, then these error are stored in that ErrorList.
Returns true if this and other are different.
Returns the negated result of operator==().
Assigns other to this CleavageMotif instance.
This instance then undergoes validation and m_isValid is set to the result of it.
Returns a reference to this CleavageMotif instance.
Returns true if this and other are identical.
The comparison of the Monomer instances in the member container is deep (that is the Monomer instances are compared and not the shared pointers).
Tells if the motif is for cleavage or not for cleavage.
In the "Lys/" and "Arg/" motif, that would be true; for "-Lys/Pro", that would be false, because Trypsin does not cleave after a Lysyl residue if it is followed by a Prolyl residue.
Tell the validity status of the CleavageMotif instance.
This variable holds the container of Monomer instances. The Monomer instances are in the form of const shared pointers to Monomer in the polymer chemistry definition.
A "Lys/Pro" motif will translate into two Monomer instances (actually pointers) having codes Lys and Pro, in the right order.
This variable holds the offset between the actual cleavage site and the first monomer of the motif.
In the The "Lys/", "Arg/" and "-Lys/Pro" examples, the offset would be 1 for each motif, because each time the cleavage occurs after the first monomer code: Lys/, or Arg/ or Lys/Pro. In the /Asp cleavage site the offset would be 0, because the cleavage occurs before the first monomer in the motif (Asp). In the ATGC/GCAT cleavage motif, the offset would be 4.
This variable holds the PolChemDef (polymer chemistry definition) that is needed.