def _hgvs_coord_to_ci(s, e):
    """convert start,end interval in inclusive, discontinuous HGVS coordinates
    (..,-2,-1,1,2,..) to continuous interbase (right-open) coordinates
    (..,-2,-1,0,1,..)"""
    def _hgvs_to_ci(c):
        assert c != 0, 'received CDS coordinate 0; expected ..,-2,-1,1,1,...'
        return c-1 if c>0 else c
    return (None if s is None else _hgvs_to_ci(s),
            None if e is None else _hgvs_to_ci(e) + 1)