| | |
The CleavageMotif class provides a model for specifying aqueous cleavage motfis of Polymer Sequences. More...
| Header: | #include <MsXpS/libXpertMassCore/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 |
| bool | isValid() 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 sites denoted '/' in the following pattern: "Lys/;Arg/;-Lys/Pro".
The "Lys/;Arg/;-Lys/Pro" string of sites is parsed and cleavage motifs (CleavageMotif) are generated from it. In this specific case, we'll have three CleavageMotif instances with the following data cleavage sites:
Thanks to this deconstruction from "Lys/;Arg/;-Lys/Pro" to the 3 cleavage motifs above, the polymer sequence is cleaved according to the cleavage agent specification.
See also CleavageAgent and CleavageRule.
[explicit] CleavageMotif::CleavageMotif(MsXpS::libXpertMassCore::PolChemDefCstSPtr pol_chem_def_csp)Constructs an uninitialized 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. If the validation fails, qFatal() is called.
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. If the validation fails, qFatal() is called.
[noexcept] CleavageMotif::~CleavageMotif()Destructs this CleavageMotif instance.
Returns the member m_cleavageAction Enums::CleavageAction value.
Returns a const reference to the m_monomers container of Monomers.
Returns a reference to the m_monomers container of Monomers.
Returns the motif as a concatenation of the codes of the Monomer instances found in the m_monomers container.
Returns the m_offset member offset value.
Returns the mcsp_polChemDef PolChemDef member.
Returns the m_isValid validity status of this CleavageMotif instance.
Parses the literal cleavage motif and returns the count of Monomer instances stored in the m_monomers member container 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).
The difference between a cleavage motif ("LysPro") and a cleavage site ("Lys/Pro") is that the latter specifies the site using the '/' character.
Parses the literal cleavage site and returns the count of Monomer instances stored in the m_monomers member container as a result of parsing the site.
A cleavage site is a string in the form "Lys/Pro" or "/Asp" (note the presence of the '/' that represents the actual cleavage site). The m_monomers member container of Monomer pointers is filled-in with pointers to the member mcsp_polChemDef 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 that 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 m_monomers container of Monomers as a result of the parsing.
This instance then undergoes validation and m_isValid is set to the result of that validation.
See also parseMotif().
Sets the m_offset member offset value to offset.
The offset is the position of the cleavage inside the motif, with reference 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 that validation.
Sets the PolChemDef member to pol_chem_def_csp.
This instance then undergoes validation and m_isValid is set to the result of that validation.
Returns true if validation of this CleavageMotif instance was successful, false otherwise.
The validation process encompasses the following steps:
Upon finishing the validation, if successful m_isValid is set to true, otherwise it is set to false.
If errors are encountered and error_list_p is not nullptr, these errors 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 that validation. If the validation fails, qFatal() is called.
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.
For the "Lys/" and "Arg/" motifs, that would be CleavageAction::CLEAVE; for the "-Lys/Pro" motif, that would be CleavageAction::NO_CLEAVE, because Trypsin does not cleave after a lysyl residue if it is followed by a prolyl residue (the '-' sign before the literal string).
Tells 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 pointers to two PolChemDef-defined Monomer instances 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 "Lys/", "Arg/" and "-Lys/Pro" examples, the offset would be 1 for each motif, because the cleavage occurs after the first monomer code: Lys✂, or Arg✂ or Lys✂Pro. In the "/Asp" cleavage motif 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: ATGC✂GCAT.
This variable holds the PolChemDef (polymer chemistry definition) that is needed to get to reference chemical entities like {Monomer}s.