libXpertMass Developer Documentation
  • libXpertMass
  • Coordinates
  • Coordinates Class

    class MsXpS::libXpertMass::Coordinates

    The Coordinates class provides the localization of a sequence region in a Polymer Sequence. More...

    Header: #include <Coordinates.hpp>

    Public Functions

    Coordinates(int index_start = -1, int index_end = -1)
    Coordinates(const Coordinates &other)
    ~Coordinates()
    int end() const
    void incrementEnd()
    QString indicesAsText() const
    int length() const
    QString positionsAsText() const
    void reset()
    void setEnd(int value)
    void setStart(int value)
    int start() const

    Protected Variables

    int m_end
    int m_start

    Detailed Description

    The localization of the sequence region is performed by using indices pointing to the location in the Polymer sequence.

    Member Function Documentation

    Coordinates::Coordinates(int index_start = -1, int index_end = -1)

    Constructs a Coordinates object with index_start and index_end indices.

    The indices define a region in the Sequence. They are sorted so as to ensure that index_start <= index_end.

    Coordinates::Coordinates(const Coordinates &other)

    Constructs a Coordinates object as a copy of other.

    After assigning other to this Coordinates, the indices are sorted so as to ensure that index_start <= index_end.

    [noexcept] Coordinates::~Coordinates()

    Destructs this Coordinates instance.

    int Coordinates::end() const

    Returns the member end index.

    See also setEnd().

    void Coordinates::incrementEnd()

    Increments by one unit the member end index.

    QString Coordinates::indicesAsText() const

    Returns a string with the region described by this Coordinates instance.

    The values are the member indices and the format is

    [125--259]

    int Coordinates::length() const

    Returns the number of monomer codes in the region described by this Coordinates instance.

    return (m_end - m_start + 1)

    QString Coordinates::positionsAsText() const

    Returns a string with the region described by this Coordinates instance.

    The values are the member indices incremented by one unit (thus being positions and not indices) and the format is

    [126--260]

    void Coordinates::reset()

    Resets the member indices to 0.

    void Coordinates::setEnd(int value)

    Set the end index to value.

    Ensures that m_start is <= m_end.

    See also end().

    void Coordinates::setStart(int value)

    Set the start index to value.

    Ensures that m_start is <= m_end.

    See also start().

    int Coordinates::start() const

    Returns the member start index.

    See also setStart().

    Member Variable Documentation

    int Coordinates::m_end

    This variable holds the index of the last monomer in the sequence region described by this Coordinates instance.

    int Coordinates::m_start

    This variable holds the index of the first monomer in the sequence region described by this Coordinates instance.