| | |
The Oligomer class provides abstractions to work with an oligomer molecule (peptide or oligonucleotide, for example). More...
| Header: | #include <Oligomer.hpp> |
| Inherits: | MsXpS::libXpertMassCore::PropListHolder |
| Oligomer(MsXpS::libXpertMassCore::PolymerCstQSPtr polymer_cqsp, const QString &name = QString(), const QString &description = QString(), bool is_modified = false, const MsXpS::libXpertMassCore::Ionizer &ionizer = Ionizer(), const MsXpS::libXpertMassCore::CalcOptions &calc_options = CalcOptions()) | |
| Oligomer(const MsXpS::libXpertMassCore::Oligomer &other) | |
| virtual | ~Oligomer() |
| bool | addCrossLink(MsXpS::libXpertMassCore::CrossLinkSPtr cross_link_sp) |
| virtual bool | calculateMasses() |
| virtual bool | calculateMasses(const MsXpS::libXpertMassCore::CalcOptions &calc_options, const MsXpS::libXpertMassCore::Ionizer &ionizer) |
| MsXpS::libXpertMassCore::Enums::IonizationOutcome | deionize() |
| virtual QString | elementalComposition() const |
| virtual QString | elementalComposition(const MsXpS::libXpertMassCore::CalcOptions &calc_options, const MsXpS::libXpertMassCore::Ionizer &ionizer) const |
| bool | encompasses(MsXpS::libXpertMassCore::MonomerCstRPtr monomer_crp) const |
| bool | encompasses(MsXpS::libXpertMassCore::MonomerSPtr monomer_sp) const |
| bool | encompasses(std::size_t index) const |
| const MsXpS::libXpertMassCore::CalcOptions & | getCalcOptionsCstRef() const |
| MsXpS::libXpertMassCore::CalcOptions & | getCalcOptionsRef() |
| const std::vector<MsXpS::libXpertMassCore::CrossLinkSPtr> & | getCrossLinksCstRef() const |
| std::vector<MsXpS::libXpertMassCore::CrossLinkSPtr> & | getCrossLinksRef() |
| QString | getDescription() const |
| const MsXpS::libXpertMassCore::Formula & | getFormulaCstRef() const |
| MsXpS::libXpertMassCore::Formula & | getFormulaRef() |
| const MsXpS::libXpertMassCore::IndexRangeCollection & | getIndexRangeCollectionCstRef() const |
| MsXpS::libXpertMassCore::IndexRangeCollection & | getIndexRangeCollectionRef() |
| const MsXpS::libXpertMassCore::Ionizer & | getIonizerCstRef() const |
| MsXpS::libXpertMassCore::Ionizer & | getIonizerRef() |
| MsXpS::libXpertMassCore::MonomerSPtr | getLeftEndMonomerCstSPtr() const |
| double | getMass(MsXpS::libXpertMassCore::Enums::MassType mass_type) const |
| double & | getMassRef(MsXpS::libXpertMassCore::Enums::MassType mass_type) |
| MsXpS::libXpertMassCore::MonomerSPtr | getMonomerCstSPtrAt(std::size_t index) const |
| QString | getName() const |
| std::size_t | getPartialCleavage() const |
| const MsXpS::libXpertMassCore::PolymerCstQSPtr & | getPolymerCstSPtr() const |
| MsXpS::libXpertMassCore::MonomerSPtr | getRightEndMonomerCstSPtr() const |
| MsXpS::libXpertMassCore::Enums::IonizationOutcome | ionize() |
| bool | isModified(bool deep = false) const |
| std::size_t | modifiedMonomerCount() const |
| MsXpS::libXpertMassCore::Enums::IonizationOutcome | molecularMasses(double &mono, double &avg) const |
| void | setCalcOptions(const MsXpS::libXpertMassCore::CalcOptions &calc_options) |
| void | setDescription(const QString &description) |
| void | setFormula(const MsXpS::libXpertMassCore::Formula &formula) |
| void | setFormula(const QString &formula_string) |
| void | setIndexRange(const MsXpS::libXpertMassCore::IndexRange &index_range) |
| void | setIndexRanges(const MsXpS::libXpertMassCore::IndexRangeCollection &index_ranges) |
| void | setIonizer(const MsXpS::libXpertMassCore::Ionizer &ionizer) |
| void | setMass(MsXpS::libXpertMassCore::Enums::MassType mass_type, double mass) |
| void | setMasses(double mono, double avg) |
| void | setModified(bool is_modified = true) |
| void | setName(const QString &name) |
| void | setPartialCleavage(std::size_t partial_cleavage) |
| void | setPolymerCstSPtr(MsXpS::libXpertMassCore::PolymerCstQSPtr polymer_cqsp) |
| void | setStartAndStopIndices(std::size_t start_index, std::size_t stop_index) |
| void | setStartIndex(int start_index) |
| void | setStopIndex(int stop_index) |
| std::size_t | size() |
| qsizetype | startIndex(bool &ok) const |
| qsizetype | stopIndex(bool &ok) const |
| QString | toString() const |
| MsXpS::libXpertMassCore::Oligomer & | operator=(const MsXpS::libXpertMassCore::Oligomer &other) |
| double | m_avg |
| MsXpS::libXpertMassCore::CalcOptions | m_calcOptions |
| std::vector<MsXpS::libXpertMassCore::CrossLinkSPtr> | m_crossLinks |
| QString | m_description |
| MsXpS::libXpertMassCore::Formula | m_formula |
| MsXpS::libXpertMassCore::Ionizer | m_ionizer |
| bool | m_isModified |
| double | m_mono |
| QString | m_name |
| std::size_t | m_partialCleavage |
| MsXpS::libXpertMassCore::PolymerCstQSPtr | mcsp_polymer |
The notion of an Oligomer is that it is part of a Polymer and is thus defined by a range of Monomer indices in this Polymer (the IndexRangeCollection).
The start index cannot be less than 0 nor greater than the size of the polymer minus one, and the end index follows the same rule.
An Oligomer is also characterized by a monoisotopic mass and an average mass.
The ionization of the Oligomer is handled by the member Ionizer instance.
All computations about an oligomer (fragmentation, composition, for example, isoelectric point, ...) can only be performed by referring to the sequence of its "enclosing" Polymer.
Constructs an Oligomer.
The Oligomer instance is constructed with these arguments:
Constructs the Oligomer as a copy of other.
[virtual noexcept] Oligomer::~Oligomer()Destructs this Oligomer.
Adds the cross_link_sp CrossLink to this Oligomer's container of CrossLink instances.
Returns true if the CrossLink was added succesfully, or false cross_link_sp was already in the container.
[virtual] bool Oligomer::calculateMasses()Calculates the monoisotopic and average masses.
The calculation is performed by computing the mono and avg masses of the sequence stretch as described by the set of start and top indices (member IndexRangeCollection object) in the polymer sequence.
The member CalcOptions (m_calcOptions) and the member Ionizer (m_ionizer) are used.
The m_mono and m_avg member objects are reset to 0.0 before the calculations.
Returns true if calculations were successful, false otherwise.
[virtual] bool Oligomer::calculateMasses(const MsXpS::libXpertMassCore::CalcOptions &calc_options, const MsXpS::libXpertMassCore::Ionizer &ionizer)Calculates the monoisotopic and average masses.
The calculation is performed by computing the mono and avg masses of the sequence stretch as described by the start and end indices in the polymer sequence. The calculations are configured by calc_options and the ionization is defined in ionizer.
The m_mono and m_avg member objects are reset to 0.0 before the calculations.
The member Ionizer is not set to ionizer. This is so that a whole set of ionization computations can be performed without touching the internal Ionizer.
Returns true if calculations were successful, false otherwise.
Returns the result of the deionization process.
The new masses, if a change occurred, are updated in the member m_mono and m_avg variables.
[virtual] QString Oligomer::elementalComposition() constReturns the elemental composition of this Oligomer instance.
[virtual] QString Oligomer::elementalComposition(const MsXpS::libXpertMassCore::CalcOptions &calc_options, const MsXpS::libXpertMassCore::Ionizer &ionizer) constReturns the elemental composition of this Oligomer instance.
The computation of the elemental composition is performed as configured in calc_options and using the ionization described in ionizer.
Returns true if this Oligomer spans at least one region of the enclosing Polymer that contains the Monomer monomer_crp, false otherwise.
The search is performed by comparing pointers, thus the Monomer to be search is monomer_crp.
Returns true if this Oligomer spans at least one region of the enclosing Polymer that contains the Monomer monomer_sp, false otherwise.
The search is performed by comparing pointers, thus the Monomer to be search is monomer_sp.
Returns true if this Oligomer spans at least one region of the enclosing polymer that contains a Monomer at index, false otherwise.
Returns the CalcOptions member.
Returns a reference to the CalcOptions member.
Returns a const reference to the CrossLink container.
Returns a reference to the CrossLink container.
Returns the description.
Returns a constant reference to the formula.
Returns a reference to the formula.
Returns a const reference to the IndexRangeCollection.
Returns a reference to the IndexRangeCollection.
Returns a const reference to the Ionizer.
Returns a reference to the Ionizer.
Returns the Monomer in the member Polymer that is located at the index that has the start value of the first IndexRange object in the member IndexRangeCollection container.
If the Polymer is not avaialable, or if the start index could not be obtained, nullptr is returned.
If the index is out of bounds, that is a fatal error.
Returns the Oligomer's mass of the type defined by mass_type.
Returns a reference to the Oligomer's mass of the type defined by mass_type.
Returns the Monomer in the member Polymer that is located at the index.
If the Polymer is not available, nullptr is returned. If index is not encompassed by the member IndexRangeCollection container, or if that container is empty, nullptr is returned.
If index is out of bounds, that is a fatal error.
Returns the name.
Returns the m_partialCleavage member.
Returns the polymer.
See also getPolymerCstSPtr().
Returns the Monomer in the member Polymer that is located at the index that has the stop value of the first IndexRange object in the member IndexRangeCollection container.
If the Polymer is not avaialable, or if the stop index could not be obtained, nullptr is returned.
If the index is out of bounds, that is a fatal error.
Returns the result of the ionization process.
The new masses, if a change occurred, are updated in the member m_mono and m_avg variables.
Returns the chemical modification status of this Oligomer.
If deep is true, the member Polymer must exist (mcsp_polymer cannot be nullptr) because the polymer itself is asked for the count of Monomer instances being modified. The sequence ranges of the polymer that are surveyed are those in this Oligomer's IndexRangeCollection. Upon checking the result, if the count of modified Monomer instances is not 0, then m_isModified is set to true, otherwise it is set to false. That m_isModified value is then returned.
If deep is false, the value of m_isModified is immediately returned.
See also Polymer::hasModifiedMonomer and Monomer::isModified().
Return the count of the Polymer's Sequence's Monomer instances that are modified.
See also Polymer::modifiedMonomerCount.
Sets mono and avg to the masses of unionized analyte.
The member Ionizer is used to first deionize the mono and avg masses (on copy data, if the Ionizer reports that the analyte is ionized).
mono and avg are then set to the masses of this polymer instance in an unionized status.
Nothing is modified in this Oligomer instance.
Returns the process outcome.
Sets calc_options to the member datum.
Sets the description.
Sets the formula to formula.
Sets the formula to formula_string.
Sets index_range to the member datum as the sole range in the member IndexRange container.
Sets index_ranges to the member datum.
Sets ionizer to the member datum.
Set the mass qualified using mass_type to the mass value.
See also setMasses().
Sets mono and avg masses to this Oligomer.
See also setMass().
Sets the modification status to is_modified.
See also isModified().
Sets the name.
Set the member m_partialCleavage to partial_cleavage.
Set the PolChemDef mcsp_polymer member to polymer_cqsp.
See also getPolymerCstSPtr().
Sets the start_index and stop_index indices to the first IndexRange instance of the member IndexRangeCollection container.
Sets start_index as the the first IndexRange instance'start value of the member IndexRangeCollection container.
See also startIndex().
Sets stop_index as the the first IndexRange instance'stop value of the member IndexRangeCollection container.
See also stopIndex().
Returns the size of this Oligomer.
The size is computed by adding the length of all the regions of the enclosing Polymer as documented in the Coordinates instances in the member coordinateList.
Returns the start index, or 0 (ok is set to false) if the IndexRangeCollection member is empty.
The returned start index is that of the first IndexRange instance in the IndexRangeCollection member (ok is set to true).
See also setStartIndex().
Returns the stop index, or 0 (ok is set to false) if the IndexRangeCollection member is empty.
The returned stop index is that of the first IndexRange instance in the IndexRangeCollection member (ok is set to true).
See also setStopIndex().
Returns a string documenting this Oligomer instance.
Assigns other to this Oligomer instance.
This variable holds the average mass.
This variable holds the CalcOptions instance that drives the mass and formula calculations.
This variable holds the container of CrossLink instances formed in the Oligomer sequence.
This variable holds the description of the Oligomer.
Stores the formula of the Oligomer.
This variable holds the Ionizer instance that drives the ionization of the Oligomer.
Tells if the Oligomer is modified.
This variable holds the monoisotopic mass.
This variable holds the name of the Oligomer.
Stores the partial cleavage out of which the Oligomer has been obtained if that process was a (bio)-chemical cleavage.
This variable holds the Polymer instance of which this Oligomer is part.