# Path: hgvs/exceptions.py
# class HGVSInvalidIntervalError(HGVSError):
#     pass


import logging
import re
from hgvs.exceptions import HGVSInvalidIntervalError
from six.moves import range
  interval 1: 34,36   -> 29,36 (no ambiguity)
  interval 2: 35,35   -> 30,35 (reasonable)
  interval 3: 34,35   -> 29,30 (minimal) or 29,35 (maximal)
  interval 4: 35,36   -> 35,36 (minimal) or 30,36 (maximal)

So, for interval 3, end_i=35 matches segment 3 and segment 4.  Analagously
for interval 4, start_i=35 matches segment 4 and segment 5.

Currently, this code matches an interval <start_i,end_i> using the maximal
start_i and minimal end_i.
"""

from __future__ import absolute_import, division, print_function, unicode_literals



_logger = logging.getLogger(__name__)
_logger.warning("This module is deprecated and will be removed in a future release")


# N.B. This Interval is internal to intervalmapper.py. It is *NOT* the
# same as the Interval defined in location.py.
class Interval(object):
    """Represents a segment of a sequence in interbase
    coordinates (0-based, right-open).
    """
    __slots__ = ("start_i", "end_i")

    def __init__(self, start_i, end_i):
        if not (start_i <= end_i):

# Path: hgvs/exceptions.py
# class HGVSInvalidIntervalError(HGVSError):
#     pass


# Path: hgvs/intervalmapper.py
import logging
import re
from hgvs.exceptions import HGVSInvalidIntervalError
from six.moves import range

  interval 1: 34,36   -> 29,36 (no ambiguity)
  interval 2: 35,35   -> 30,35 (reasonable)
  interval 3: 34,35   -> 29,30 (minimal) or 29,35 (maximal)
  interval 4: 35,36   -> 35,36 (minimal) or 30,36 (maximal)

So, for interval 3, end_i=35 matches segment 3 and segment 4.  Analagously
for interval 4, start_i=35 matches segment 4 and segment 5.

Currently, this code matches an interval <start_i,end_i> using the maximal
start_i and minimal end_i.
"""

from __future__ import absolute_import, division, print_function, unicode_literals



_logger = logging.getLogger(__name__)
_logger.warning("This module is deprecated and will be removed in a future release")


# N.B. This Interval is internal to intervalmapper.py. It is *NOT* the
# same as the Interval defined in location.py.
class Interval(object):
    """Represents a segment of a sequence in interbase
    coordinates (0-based, right-open).
    """
    __slots__ = ("start_i", "end_i")

    def __init__(self, start_i, end_i):
        if not (start_i <= end_i):

            raise HGVSInvalidIntervalError("start_i must be less than or equal to end_i")