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



import attr
import hgvs
from functools import total_ordering
from bioutils.sequences import aa1_to_aa3
from hgvs.exceptions import HGVSUnsupportedOperationError, HGVSInvalidIntervalError
from hgvs.enums import Datum, ValidationLevel
                (a.name + "=" + str(getattr(self, a.name))) for a in self.__attrs_attrs__))

    @property
    def is_uncertain(self):
        """return True if the position is marked uncertain or undefined"""
        return self.uncertain or self.base is None

    def _set_uncertain(self):
        "mark this location as uncertain and return reference to self; this is called during parsing (see hgvs.ometa)"
        self.uncertain = True
        return self

    def validate(self):
        if self.base is not None and self.base < 1:
            return (ValidationLevel.ERROR, "Position base must be >= 1")
        return (ValidationLevel.VALID, None)

    def __sub__(lhs, rhs):
        assert type(lhs) == type(rhs), "Cannot substract coordinates of different representations"
        return lhs.base - rhs.base

    def __eq__(lhs, rhs):
        assert type(lhs) == type(rhs), "Cannot compare coordinates of different representations"
        if lhs.uncertain or rhs.uncertain:
            raise HGVSUnsupportedOperationError("Cannot compare coordinates of uncertain positions")
        return lhs.base == rhs.base

    def __lt__(lhs, rhs):
        assert type(lhs) == type(rhs), "Cannot compare coordinates of different representations"
        if lhs.uncertain or rhs.uncertain:

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



# Path: hgvs/location.py
import attr
import hgvs
from functools import total_ordering
from bioutils.sequences import aa1_to_aa3
from hgvs.exceptions import HGVSUnsupportedOperationError, HGVSInvalidIntervalError
from hgvs.enums import Datum, ValidationLevel

                (a.name + "=" + str(getattr(self, a.name))) for a in self.__attrs_attrs__))

    @property
    def is_uncertain(self):
        """return True if the position is marked uncertain or undefined"""
        return self.uncertain or self.base is None

    def _set_uncertain(self):
        "mark this location as uncertain and return reference to self; this is called during parsing (see hgvs.ometa)"
        self.uncertain = True
        return self

    def validate(self):
        if self.base is not None and self.base < 1:
            return (ValidationLevel.ERROR, "Position base must be >= 1")
        return (ValidationLevel.VALID, None)

    def __sub__(lhs, rhs):
        assert type(lhs) == type(rhs), "Cannot substract coordinates of different representations"
        return lhs.base - rhs.base

    def __eq__(lhs, rhs):
        assert type(lhs) == type(rhs), "Cannot compare coordinates of different representations"
        if lhs.uncertain or rhs.uncertain:
            raise HGVSUnsupportedOperationError("Cannot compare coordinates of uncertain positions")
        return lhs.base == rhs.base

    def __lt__(lhs, rhs):
        assert type(lhs) == type(rhs), "Cannot compare coordinates of different representations"
        if lhs.uncertain or rhs.uncertain:

            raise HGVSUnsupportedOperationError("Cannot compare coordinates of uncertain positions")