diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 0ed84026..3eae1f92 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -65,6 +65,9 @@ jobs: - name: Install dependencies run: | + pip install --upgrade setuptools + pip install pytest + pip install pytest-cov pip install -e .[dev] - name: Test with pytest diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 581fa240..0a15e7e3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,14 +1,16 @@ repos: -- repo: local - hooks: - - id: pyright - name: pyright - entry: pyright - language: system - types: [python] +# - repo: local +# hooks: +# - id: pyright +# name: pyright +# entry: pyright +# language: system +# types: [python] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.4.4 + rev: v0.9.2 hooks: - id: ruff + types_or: [ python, pyi ] - id: ruff-format + types_or: [ python, pyi ] args: [ --check ] diff --git a/examples/creating-a-variant.ipynb b/examples/creating-a-variant.ipynb index 47601b50..cb897cbb 100644 --- a/examples/creating-a-variant.ipynb +++ b/examples/creating-a-variant.ipynb @@ -123,7 +123,8 @@ "metadata": {}, "outputs": [], "source": [ - "import hgvs.edit, hgvs.posedit" + "import hgvs.edit\n", + "import hgvs.posedit" ] }, { diff --git a/examples/hgvs-poster.ipynb b/examples/hgvs-poster.ipynb index 4027d3ae..a1d6462d 100644 --- a/examples/hgvs-poster.ipynb +++ b/examples/hgvs-poster.ipynb @@ -43,7 +43,7 @@ }, { "cell_type": "code", - "execution_count": 3, + "execution_count": null, "metadata": { "collapsed": false }, diff --git a/pyproject.toml b/pyproject.toml index f77889d0..7dc318d5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,7 +31,7 @@ keywords = [ "hgvs", "variation" ] -dynamic = ["version", "optional-dependencies"] +dynamic = ["version"] dependencies=[ "attrs >= 17.4.0", # https://github.com/biocommons/hgvs/issues/473 @@ -44,7 +44,10 @@ dependencies=[ "pre-commit ~= 3.4", "psycopg2", ] - +[project.optional-dependencies] +dev = [ + "parameterized" +] [project.urls] "Homepage" = "https://github.com/biocommons/hgvs" "Bug Tracker" = "https://github.com/biocommons/hgvs/issues" diff --git a/src/hgvs/_data/hgvs.pymeta b/src/hgvs/_data/hgvs.pymeta index fb75e710..736c9f6a 100644 --- a/src/hgvs/_data/hgvs.pymeta +++ b/src/hgvs/_data/hgvs.pymeta @@ -2,7 +2,7 @@ # variant specification. The subset is limited to is limited to those # rules that define sequence variants precisely. It does not current # cover rules for translocations or conversions. - + # The basic structure of a HGVS sequence variant is: # :. # where is a sequence accession, determines the sequence @@ -26,7 +26,7 @@ r_variant = accn:ac opt_gene_expr:gene ':' 'r':type '.' r_posedit:posedit -> hgv ############################################################################ ## HGVS Position -- e.g., NM_01234.5:c.22+6 (without an edit) -# This is unofficial syntax +# This is unofficial syntax hgvs_position = g_hgvs_position | m_hgvs_position | c_hgvs_position | n_hgvs_position | r_hgvs_position | p_hgvs_position @@ -65,7 +65,7 @@ r_posedit = (r_interval:pos rna_edit:edit -> hgvs.posedit.PosEdit(pos=pos,edit=e p_posedit = (p_interval:pos pro_edit:edit -> hgvs.posedit.PosEdit(pos=pos,edit=edit)) | ('(' p_interval:pos pro_edit:edit ')' -> hgvs.posedit.PosEdit(pos=pos,edit=edit, uncertain=True)) | p_posedit_special -p_posedit_special = +p_posedit_special = '=':x -> hgvs.posedit.PosEdit(pos=None,edit=x,uncertain=False) | '(' '=':x ')' -> hgvs.posedit.PosEdit(pos=None,edit=x,uncertain=True) | '0':x '?' -> hgvs.posedit.PosEdit(pos=None,edit=x,uncertain=True) @@ -122,20 +122,27 @@ pro_ident = '=' -> hgvs.edit.AARefAlt(ref='',alt='' # potentially indefinite/uncertain intervals c_interval = def_c_interval | '(' def_c_interval:iv ')' -> iv._set_uncertain() -g_interval = def_g_interval | '(' def_g_interval:iv ')' -> iv._set_uncertain() +g_interval = uncertain_g_interval:iv | def_g_interval m_interval = def_m_interval | '(' def_m_interval:iv ')' -> iv._set_uncertain() n_interval = def_n_interval | '(' def_n_interval:iv ')' -> iv._set_uncertain() p_interval = def_p_interval | '(' def_p_interval:iv ')' -> iv._set_uncertain() r_interval = def_r_interval | '(' def_r_interval:iv ')' -> iv._set_uncertain() # definite intervals -def_g_interval = (g_pos:start '_' g_pos:end -> hgvs.location.Interval(start,end)) | (g_pos:start -> hgvs.location.Interval(start,copy.deepcopy(start))) -def_m_interval = (m_pos:start '_' m_pos:end -> hgvs.location.Interval(start,end)) | (m_pos:start -> hgvs.location.Interval(start,copy.deepcopy(start))) -def_p_interval = (p_pos:start '_' p_pos:end -> hgvs.location.Interval(start,end)) | (p_pos:start -> hgvs.location.Interval(start,copy.deepcopy(start))) -def_r_interval = (r_pos:start '_' r_pos:end -> hgvs.location.Interval(start,end)) | (r_pos:start -> hgvs.location.Interval(start,copy.deepcopy(start))) +def_g_interval = (g_pos:start '_' g_pos:end -> hgvs.location.Interval(start,end)) | (g_pos:start -> hgvs.location.Interval(start,None)) +def_m_interval = (m_pos:start '_' m_pos:end -> hgvs.location.Interval(start,end)) | (m_pos:start -> hgvs.location.Interval(start,None)) +def_p_interval = (p_pos:start '_' p_pos:end -> hgvs.location.Interval(start,end)) | (p_pos:start -> hgvs.location.Interval(start,None)) +def_r_interval = (r_pos:start '_' r_pos:end -> hgvs.location.Interval(start,end)) | (r_pos:start -> hgvs.location.Interval(start,None)) def_c_interval = (c_pos:start '_' c_pos:end -> hgvs.location.BaseOffsetInterval(start,end)) | (c_pos:start -> hgvs.location.BaseOffsetInterval(start,copy.deepcopy(start))) def_n_interval = (n_pos:start '_' n_pos:end -> hgvs.location.BaseOffsetInterval(start,end)) | (n_pos:start -> hgvs.location.BaseOffsetInterval(start,copy.deepcopy(start))) +# indefinite ranges +uncertain_g_interval = '(' def_g_interval:ivl_start ')' '_' '(' def_g_interval:ivl_end ')' -> hgvs.location.Interval(start=ivl_start._set_uncertain(), end=ivl_end._set_uncertain()) + | def_g_interval:ivl_start '_' '(' def_g_interval:ivl_end ')' -> hgvs.location.Interval(start=ivl_start, end=ivl_end._set_uncertain()) + | '(' def_g_interval:ivl_start ')' '_' def_g_interval:ivl_end -> hgvs.location.Interval(start=ivl_start._set_uncertain(), end=ivl_end) + | ('(' def_g_interval:iv ')' -> iv._set_uncertain()) + + # positions c_pos = def_c_pos #| '(' def_c_pos:pos ')' -> pos._set_uncertain() g_pos = def_g_pos #| '(' def_g_pos:pos ')' -> pos._set_uncertain() diff --git a/src/hgvs/alignmentmapper.py b/src/hgvs/alignmentmapper.py index 894d3f58..d6a0b998 100644 --- a/src/hgvs/alignmentmapper.py +++ b/src/hgvs/alignmentmapper.py @@ -26,6 +26,9 @@ # g. ... 123 124 125 126 127 128 129 130 131 132 133 ... # +from __future__ import absolute_import, division, print_function, unicode_literals + +from typing import Optional from bioutils.coordinates import strand_int_to_pm @@ -38,6 +41,7 @@ HGVSInvalidIntervalError, HGVSUsageError, ) +from hgvs.location import Interval, BaseOffsetInterval from hgvs.utils import build_tx_cigar from hgvs.utils.cigarmapper import CIGARMapper @@ -108,11 +112,16 @@ def __init__(self, hdp, tx_ac, alt_ac, alt_aln_method): # is that exons are adjacent. Assert that here. sorted_tx_exons = sorted(tx_exons, key=lambda e: e["ord"]) for i in range(1, len(sorted_tx_exons)): - if sorted_tx_exons[i - 1]["tx_end_i"] != sorted_tx_exons[i]["tx_start_i"]: + if ( + sorted_tx_exons[i - 1]["tx_end_i"] + != sorted_tx_exons[i]["tx_start_i"] + ): raise HGVSDataNotAvailableError( "AlignmentMapper(tx_ac={self.tx_ac}, " "alt_ac={self.alt_ac}, alt_aln_method={self.alt_aln_method}): " - "Exons {a} and {b} are not adjacent".format(self=self, a=i, b=i + 1) + "Exons {a} and {b} are not adjacent".format( + self=self, a=i, b=i + 1 + ) ) self.strand = tx_exons[0]["alt_strand"] @@ -138,9 +147,9 @@ def __init__(self, hdp, tx_ac, alt_ac, alt_aln_method): self.tgt_len = sum(tx_identity_info["lengths"]) self.cigarmapper = None - assert not ( - (self.cds_start_i is None) ^ (self.cds_end_i is None) - ), "CDS start and end must both be defined or neither defined" + assert not ((self.cds_start_i is None) ^ (self.cds_end_i is None)), ( + "CDS start and end must both be defined or neither defined" + ) def __str__(self): return ( @@ -150,16 +159,31 @@ def __str__(self): ) ) - def g_to_n(self, g_interval, strict_bounds=None): + def g_to_n( + self, g_interval: Interval, strict_bounds: Optional[bool] = None + ) -> BaseOffsetInterval: """convert a genomic (g.) interval to a transcript cDNA (n.) interval""" if strict_bounds is None: strict_bounds = global_config.mapping.strict_bounds - grs, gre = ( - g_interval.start.base - 1 - self.gc_offset, - g_interval.end.base - 1 - self.gc_offset, - ) + # in case of uncertain ranges, we fall back to the inner (more confident) interval + if g_interval.start.uncertain: + grs = g_interval.start.end.base - 1 - self.gc_offset + else: + if isinstance(g_interval.start, Interval): + grs = g_interval.start.start.base - 1 - self.gc_offset + else: + grs = g_interval.start.base - 1 - self.gc_offset + + if g_interval.end.uncertain: + gre = g_interval.end.start.base - 1 - self.gc_offset + else: + if isinstance(g_interval.end, Interval): + gre = g_interval.end.end.base - 1 - self.gc_offset + else: + gre = g_interval.end.base - 1 - self.gc_offset + # frs, fre = (f)orward (r)na (s)tart & (e)nd; forward w.r.t. genome frs, frs_offset, frs_cigar = self.cigarmapper.map_ref_to_tgt( pos=grs, end="start", strict_bounds=strict_bounds @@ -173,17 +197,24 @@ def g_to_n(self, g_interval, strict_bounds=None): frs_offset, fre_offset = -fre_offset, -frs_offset # The returned interval would be uncertain when locating at alignment gaps + # of if the initial interval was uncertain return hgvs.location.BaseOffsetInterval( start=hgvs.location.BaseOffsetPosition( - base=_zbc_to_hgvs(frs), offset=frs_offset, datum=Datum.SEQ_START + base=_zbc_to_hgvs(frs), + offset=frs_offset, + datum=Datum.SEQ_START, + uncertain=g_interval.start.uncertain, ), end=hgvs.location.BaseOffsetPosition( - base=_zbc_to_hgvs(fre), offset=fre_offset, datum=Datum.SEQ_START + base=_zbc_to_hgvs(fre), + offset=fre_offset, + datum=Datum.SEQ_START, + uncertain=g_interval.end.uncertain, ), uncertain=frs_cigar in "DI" or fre_cigar in "DI", ) - def n_to_g(self, n_interval, strict_bounds=None): + def n_to_g(self, n_interval, strict_bounds=None) -> Interval: """convert a transcript (n.) interval to a genomic (g.) interval""" if strict_bounds is None: @@ -208,14 +239,32 @@ def n_to_g(self, n_interval, strict_bounds=None): grs, gre = grs + self.gc_offset + 1, gre + self.gc_offset + 1 gs, ge = grs + start_offset, gre + end_offset + if n_interval.start.uncertain: + start = hgvs.location.Interval( + start=hgvs.location.SimplePosition(uncertain=False), + end=hgvs.location.SimplePosition(gs, uncertain=False), + uncertain=True, + ) + else: + start = hgvs.location.SimplePosition(gs, uncertain=False) + + if n_interval.end.uncertain: + end = hgvs.location.Interval( + start=hgvs.location.SimplePosition(ge, uncertain=False), + end=hgvs.location.SimplePosition(uncertain=False), + uncertain=True, + ) + else: + end = hgvs.location.SimplePosition(ge, uncertain=False) + # The returned interval would be uncertain when locating at alignment gaps return hgvs.location.Interval( - start=hgvs.location.SimplePosition(gs, uncertain=n_interval.start.uncertain), - end=hgvs.location.SimplePosition(ge, uncertain=n_interval.end.uncertain), + start=start, + end=end, uncertain=grs_cigar in "DI" or gre_cigar in "DI", ) - def n_to_c(self, n_interval, strict_bounds=None): + def n_to_c(self, n_interval: Interval, strict_bounds: Optional[bool] = None): """convert a transcript cDNA (n.) interval to a transcript CDS (c.) interval""" if strict_bounds is None: @@ -230,7 +279,9 @@ def n_to_c(self, n_interval, strict_bounds=None): ) ) - if strict_bounds and (n_interval.start.base <= 0 or n_interval.end.base > self.tgt_len): + if strict_bounds and ( + n_interval.start.base <= 0 or n_interval.end.base > self.tgt_len + ): raise HGVSInvalidIntervalError( "The given coordinate is outside the bounds of the reference sequence." ) @@ -245,7 +296,9 @@ def pos_n_to_c(pos): else: c = pos.base - self.cds_end_i c_datum = Datum.CDS_END - return hgvs.location.BaseOffsetPosition(base=c, offset=pos.offset, datum=c_datum) + return hgvs.location.BaseOffsetPosition( + base=c, offset=pos.offset, datum=c_datum, uncertain=pos.uncertain + ) c_interval = hgvs.location.BaseOffsetInterval( start=pos_n_to_c(n_interval.start), @@ -278,9 +331,15 @@ def pos_c_to_n(pos): n -= 1 if n <= 0 or n > self.tgt_len: if strict_bounds: - raise HGVSInvalidIntervalError(f"c.{pos} coordinate is out of bounds") + raise HGVSInvalidIntervalError( + f"c.{pos} coordinate is out of bounds" + ) + return hgvs.location.BaseOffsetPosition( - base=n, offset=pos.offset, datum=Datum.SEQ_START + base=n, + offset=pos.offset, + datum=Datum.SEQ_START, + uncertain=pos.uncertain, ) n_interval = hgvs.location.BaseOffsetInterval( @@ -288,6 +347,7 @@ def pos_c_to_n(pos): end=pos_c_to_n(c_interval.end), uncertain=c_interval.uncertain, ) + return n_interval def g_to_c(self, g_interval, strict_bounds=None): diff --git a/src/hgvs/generated/hgvs_grammar.py b/src/hgvs/generated/hgvs_grammar.py index 38f407b0..0fd318c4 100644 --- a/src/hgvs/generated/hgvs_grammar.py +++ b/src/hgvs/generated/hgvs_grammar.py @@ -3,9 +3,9 @@ # Changes will be overwritten by the generation script. # Generated by: sbin/generate_parser.py # Grammar file: src/hgvs/_data/hgvs.pymeta -# Grammar hash: 3a6ac8d6d2dda7f4a178efe0081659e0 +# Grammar hash: e84f0c08f3981f13aa7426baf87ad45d # Parsley version: 1.3 -# Python version: 3.10.12 (main, Jun 11 2023, 05:26:28) [GCC 11.4.0] +# Python version: 3.12.5 (main, Sep 1 2024, 23:23:26) [Clang 15.0.0 (clang-1500.3.9.4)] # -------------------------------------------------- @@ -20,41 +20,55 @@ def rule_hgvs_variant(self): def _G_or_1(): self._trace("", (697, 707), self.input.position) - _G_apply_2, lastError = self._apply(self.rule_g_variant, "g_variant", []) + _G_apply_2, lastError = self._apply( + self.rule_g_variant, "g_variant", [] + ) self.considerError(lastError, None) return (_G_apply_2, self.currentError) def _G_or_3(): self._trace("", (709, 719), self.input.position) - _G_apply_4, lastError = self._apply(self.rule_m_variant, "m_variant", []) + _G_apply_4, lastError = self._apply( + self.rule_m_variant, "m_variant", [] + ) self.considerError(lastError, None) return (_G_apply_4, self.currentError) def _G_or_5(): self._trace("", (721, 731), self.input.position) - _G_apply_6, lastError = self._apply(self.rule_c_variant, "c_variant", []) + _G_apply_6, lastError = self._apply( + self.rule_c_variant, "c_variant", [] + ) self.considerError(lastError, None) return (_G_apply_6, self.currentError) def _G_or_7(): self._trace("", (733, 743), self.input.position) - _G_apply_8, lastError = self._apply(self.rule_n_variant, "n_variant", []) + _G_apply_8, lastError = self._apply( + self.rule_n_variant, "n_variant", [] + ) self.considerError(lastError, None) return (_G_apply_8, self.currentError) def _G_or_9(): self._trace("", (746, 756), self.input.position) - _G_apply_10, lastError = self._apply(self.rule_r_variant, "r_variant", []) + _G_apply_10, lastError = self._apply( + self.rule_r_variant, "r_variant", [] + ) self.considerError(lastError, None) return (_G_apply_10, self.currentError) def _G_or_11(): self._trace("", (758, 768), self.input.position) - _G_apply_12, lastError = self._apply(self.rule_p_variant, "p_variant", []) + _G_apply_12, lastError = self._apply( + self.rule_p_variant, "p_variant", [] + ) self.considerError(lastError, None) return (_G_apply_12, self.currentError) - _G_or_13, lastError = self._or([_G_or_1, _G_or_3, _G_or_5, _G_or_7, _G_or_9, _G_or_11]) + _G_or_13, lastError = self._or( + [_G_or_1, _G_or_3, _G_or_5, _G_or_7, _G_or_9, _G_or_11] + ) self.considerError(lastError, "hgvs_variant") return (_G_or_13, self.currentError) @@ -66,7 +80,9 @@ def rule_c_variant(self): self.considerError(lastError, "c_variant") _locals["ac"] = _G_apply_14 self._trace("", (789, 803), self.input.position) - _G_apply_15, lastError = self._apply(self.rule_opt_gene_expr, "opt_gene_expr", []) + _G_apply_15, lastError = self._apply( + self.rule_opt_gene_expr, "opt_gene_expr", [] + ) self.considerError(lastError, "c_variant") _locals["gene"] = _G_apply_15 self._trace("", (808, 812), self.input.position) @@ -95,7 +111,9 @@ def rule_g_variant(self): self.considerError(lastError, "g_variant") _locals["ac"] = _G_apply_22 self._trace("", (949, 963), self.input.position) - _G_apply_23, lastError = self._apply(self.rule_opt_gene_expr, "opt_gene_expr", []) + _G_apply_23, lastError = self._apply( + self.rule_opt_gene_expr, "opt_gene_expr", [] + ) self.considerError(lastError, "g_variant") _locals["gene"] = _G_apply_23 self._trace("", (968, 972), self.input.position) @@ -124,7 +142,9 @@ def rule_m_variant(self): self.considerError(lastError, "m_variant") _locals["ac"] = _G_apply_29 self._trace("", (1109, 1123), self.input.position) - _G_apply_30, lastError = self._apply(self.rule_opt_gene_expr, "opt_gene_expr", []) + _G_apply_30, lastError = self._apply( + self.rule_opt_gene_expr, "opt_gene_expr", [] + ) self.considerError(lastError, "m_variant") _locals["gene"] = _G_apply_30 self._trace("", (1128, 1132), self.input.position) @@ -153,7 +173,9 @@ def rule_n_variant(self): self.considerError(lastError, "n_variant") _locals["ac"] = _G_apply_36 self._trace("", (1269, 1283), self.input.position) - _G_apply_37, lastError = self._apply(self.rule_opt_gene_expr, "opt_gene_expr", []) + _G_apply_37, lastError = self._apply( + self.rule_opt_gene_expr, "opt_gene_expr", [] + ) self.considerError(lastError, "n_variant") _locals["gene"] = _G_apply_37 self._trace("", (1288, 1292), self.input.position) @@ -182,7 +204,9 @@ def rule_p_variant(self): self.considerError(lastError, "p_variant") _locals["ac"] = _G_apply_43 self._trace("", (1429, 1443), self.input.position) - _G_apply_44, lastError = self._apply(self.rule_opt_gene_expr, "opt_gene_expr", []) + _G_apply_44, lastError = self._apply( + self.rule_opt_gene_expr, "opt_gene_expr", [] + ) self.considerError(lastError, "p_variant") _locals["gene"] = _G_apply_44 self._trace("", (1448, 1452), self.input.position) @@ -211,7 +235,9 @@ def rule_r_variant(self): self.considerError(lastError, "r_variant") _locals["ac"] = _G_apply_50 self._trace("", (1589, 1603), self.input.position) - _G_apply_51, lastError = self._apply(self.rule_opt_gene_expr, "opt_gene_expr", []) + _G_apply_51, lastError = self._apply( + self.rule_opt_gene_expr, "opt_gene_expr", [] + ) self.considerError(lastError, "r_variant") _locals["gene"] = _G_apply_51 self._trace("", (1608, 1612), self.input.position) @@ -237,7 +263,7 @@ def rule_hgvs_position(self): self.locals["hgvs_position"] = _locals def _G_or_57(): - self._trace("", (1920, 1936), self.input.position) + self._trace("", (1919, 1935), self.input.position) _G_apply_58, lastError = self._apply( self.rule_g_hgvs_position, "g_hgvs_position", [] ) @@ -245,7 +271,7 @@ def _G_or_57(): return (_G_apply_58, self.currentError) def _G_or_59(): - self._trace("", (1938, 1954), self.input.position) + self._trace("", (1937, 1953), self.input.position) _G_apply_60, lastError = self._apply( self.rule_m_hgvs_position, "m_hgvs_position", [] ) @@ -253,7 +279,7 @@ def _G_or_59(): return (_G_apply_60, self.currentError) def _G_or_61(): - self._trace("", (1956, 1972), self.input.position) + self._trace("", (1955, 1971), self.input.position) _G_apply_62, lastError = self._apply( self.rule_c_hgvs_position, "c_hgvs_position", [] ) @@ -261,7 +287,7 @@ def _G_or_61(): return (_G_apply_62, self.currentError) def _G_or_63(): - self._trace("", (1974, 1990), self.input.position) + self._trace("", (1973, 1989), self.input.position) _G_apply_64, lastError = self._apply( self.rule_n_hgvs_position, "n_hgvs_position", [] ) @@ -269,7 +295,7 @@ def _G_or_63(): return (_G_apply_64, self.currentError) def _G_or_65(): - self._trace("", (1992, 2008), self.input.position) + self._trace("", (1991, 2007), self.input.position) _G_apply_66, lastError = self._apply( self.rule_r_hgvs_position, "r_hgvs_position", [] ) @@ -277,7 +303,7 @@ def _G_or_65(): return (_G_apply_66, self.currentError) def _G_or_67(): - self._trace("", (2010, 2026), self.input.position) + self._trace("", (2009, 2025), self.input.position) _G_apply_68, lastError = self._apply( self.rule_p_hgvs_position, "p_hgvs_position", [] ) @@ -293,25 +319,27 @@ def _G_or_67(): def rule_c_hgvs_position(self): _locals = {"self": self} self.locals["c_hgvs_position"] = _locals - self._trace("", (2045, 2050), self.input.position) + self._trace("", (2044, 2049), self.input.position) _G_apply_70, lastError = self._apply(self.rule_accn, "accn", []) self.considerError(lastError, "c_hgvs_position") _locals["ac"] = _G_apply_70 - self._trace("", (2053, 2067), self.input.position) - _G_apply_71, lastError = self._apply(self.rule_opt_gene_expr, "opt_gene_expr", []) + self._trace("", (2052, 2066), self.input.position) + _G_apply_71, lastError = self._apply( + self.rule_opt_gene_expr, "opt_gene_expr", [] + ) self.considerError(lastError, "c_hgvs_position") _locals["gene"] = _G_apply_71 - self._trace("", (2072, 2076), self.input.position) + self._trace("", (2071, 2075), self.input.position) _G_exactly_72, lastError = self.exactly(":") self.considerError(lastError, "c_hgvs_position") - self._trace("", (2076, 2080), self.input.position) + self._trace("", (2075, 2079), self.input.position) _G_exactly_73, lastError = self.exactly("c") self.considerError(lastError, "c_hgvs_position") _locals["type"] = _G_exactly_73 - self._trace("", (2085, 2089), self.input.position) + self._trace("", (2084, 2088), self.input.position) _G_exactly_74, lastError = self.exactly(".") self.considerError(lastError, "c_hgvs_position") - self._trace("", (2089, 2100), self.input.position) + self._trace("", (2088, 2099), self.input.position) _G_apply_75, lastError = self._apply(self.rule_c_interval, "c_interval", []) self.considerError(lastError, "c_hgvs_position") _locals["pos"] = _G_apply_75 @@ -322,25 +350,27 @@ def rule_c_hgvs_position(self): def rule_g_hgvs_position(self): _locals = {"self": self} self.locals["g_hgvs_position"] = _locals - self._trace("", (2194, 2199), self.input.position) + self._trace("", (2193, 2198), self.input.position) _G_apply_78, lastError = self._apply(self.rule_accn, "accn", []) self.considerError(lastError, "g_hgvs_position") _locals["ac"] = _G_apply_78 - self._trace("", (2202, 2216), self.input.position) - _G_apply_79, lastError = self._apply(self.rule_opt_gene_expr, "opt_gene_expr", []) + self._trace("", (2201, 2215), self.input.position) + _G_apply_79, lastError = self._apply( + self.rule_opt_gene_expr, "opt_gene_expr", [] + ) self.considerError(lastError, "g_hgvs_position") _locals["gene"] = _G_apply_79 - self._trace("", (2221, 2225), self.input.position) + self._trace("", (2220, 2224), self.input.position) _G_exactly_80, lastError = self.exactly(":") self.considerError(lastError, "g_hgvs_position") - self._trace("", (2225, 2229), self.input.position) + self._trace("", (2224, 2228), self.input.position) _G_exactly_81, lastError = self.exactly("g") self.considerError(lastError, "g_hgvs_position") _locals["type"] = _G_exactly_81 - self._trace("", (2234, 2238), self.input.position) + self._trace("", (2233, 2237), self.input.position) _G_exactly_82, lastError = self.exactly(".") self.considerError(lastError, "g_hgvs_position") - self._trace("", (2238, 2249), self.input.position) + self._trace("", (2237, 2248), self.input.position) _G_apply_83, lastError = self._apply(self.rule_g_interval, "g_interval", []) self.considerError(lastError, "g_hgvs_position") _locals["pos"] = _G_apply_83 @@ -351,25 +381,27 @@ def rule_g_hgvs_position(self): def rule_m_hgvs_position(self): _locals = {"self": self} self.locals["m_hgvs_position"] = _locals - self._trace("", (2343, 2348), self.input.position) + self._trace("", (2342, 2347), self.input.position) _G_apply_85, lastError = self._apply(self.rule_accn, "accn", []) self.considerError(lastError, "m_hgvs_position") _locals["ac"] = _G_apply_85 - self._trace("", (2351, 2365), self.input.position) - _G_apply_86, lastError = self._apply(self.rule_opt_gene_expr, "opt_gene_expr", []) + self._trace("", (2350, 2364), self.input.position) + _G_apply_86, lastError = self._apply( + self.rule_opt_gene_expr, "opt_gene_expr", [] + ) self.considerError(lastError, "m_hgvs_position") _locals["gene"] = _G_apply_86 - self._trace("", (2370, 2374), self.input.position) + self._trace("", (2369, 2373), self.input.position) _G_exactly_87, lastError = self.exactly(":") self.considerError(lastError, "m_hgvs_position") - self._trace("", (2374, 2378), self.input.position) + self._trace("", (2373, 2377), self.input.position) _G_exactly_88, lastError = self.exactly("m") self.considerError(lastError, "m_hgvs_position") _locals["type"] = _G_exactly_88 - self._trace("", (2383, 2387), self.input.position) + self._trace("", (2382, 2386), self.input.position) _G_exactly_89, lastError = self.exactly(".") self.considerError(lastError, "m_hgvs_position") - self._trace("", (2387, 2398), self.input.position) + self._trace("", (2386, 2397), self.input.position) _G_apply_90, lastError = self._apply(self.rule_m_interval, "m_interval", []) self.considerError(lastError, "m_hgvs_position") _locals["pos"] = _G_apply_90 @@ -380,25 +412,27 @@ def rule_m_hgvs_position(self): def rule_n_hgvs_position(self): _locals = {"self": self} self.locals["n_hgvs_position"] = _locals - self._trace("", (2492, 2497), self.input.position) + self._trace("", (2491, 2496), self.input.position) _G_apply_92, lastError = self._apply(self.rule_accn, "accn", []) self.considerError(lastError, "n_hgvs_position") _locals["ac"] = _G_apply_92 - self._trace("", (2500, 2514), self.input.position) - _G_apply_93, lastError = self._apply(self.rule_opt_gene_expr, "opt_gene_expr", []) + self._trace("", (2499, 2513), self.input.position) + _G_apply_93, lastError = self._apply( + self.rule_opt_gene_expr, "opt_gene_expr", [] + ) self.considerError(lastError, "n_hgvs_position") _locals["gene"] = _G_apply_93 - self._trace("", (2519, 2523), self.input.position) + self._trace("", (2518, 2522), self.input.position) _G_exactly_94, lastError = self.exactly(":") self.considerError(lastError, "n_hgvs_position") - self._trace("", (2523, 2527), self.input.position) + self._trace("", (2522, 2526), self.input.position) _G_exactly_95, lastError = self.exactly("n") self.considerError(lastError, "n_hgvs_position") _locals["type"] = _G_exactly_95 - self._trace("", (2532, 2536), self.input.position) + self._trace("", (2531, 2535), self.input.position) _G_exactly_96, lastError = self.exactly(".") self.considerError(lastError, "n_hgvs_position") - self._trace("", (2536, 2547), self.input.position) + self._trace("", (2535, 2546), self.input.position) _G_apply_97, lastError = self._apply(self.rule_n_interval, "n_interval", []) self.considerError(lastError, "n_hgvs_position") _locals["pos"] = _G_apply_97 @@ -409,226 +443,278 @@ def rule_n_hgvs_position(self): def rule_p_hgvs_position(self): _locals = {"self": self} self.locals["p_hgvs_position"] = _locals - self._trace("", (2641, 2646), self.input.position) + self._trace("", (2640, 2645), self.input.position) _G_apply_99, lastError = self._apply(self.rule_accn, "accn", []) self.considerError(lastError, "p_hgvs_position") _locals["ac"] = _G_apply_99 - self._trace("", (2649, 2663), self.input.position) - _G_apply_100, lastError = self._apply(self.rule_opt_gene_expr, "opt_gene_expr", []) + self._trace("", (2648, 2662), self.input.position) + _G_apply_100, lastError = self._apply( + self.rule_opt_gene_expr, "opt_gene_expr", [] + ) self.considerError(lastError, "p_hgvs_position") _locals["gene"] = _G_apply_100 - self._trace("", (2668, 2672), self.input.position) + self._trace("", (2667, 2671), self.input.position) _G_exactly_101, lastError = self.exactly(":") self.considerError(lastError, "p_hgvs_position") - self._trace("", (2672, 2676), self.input.position) + self._trace("", (2671, 2675), self.input.position) _G_exactly_102, lastError = self.exactly("p") self.considerError(lastError, "p_hgvs_position") _locals["type"] = _G_exactly_102 - self._trace("", (2681, 2685), self.input.position) + self._trace("", (2680, 2684), self.input.position) _G_exactly_103, lastError = self.exactly(".") self.considerError(lastError, "p_hgvs_position") - self._trace("", (2685, 2696), self.input.position) - _G_apply_104, lastError = self._apply(self.rule_p_interval, "p_interval", []) + self._trace("", (2684, 2695), self.input.position) + _G_apply_104, lastError = self._apply( + self.rule_p_interval, "p_interval", [] + ) self.considerError(lastError, "p_hgvs_position") _locals["pos"] = _G_apply_104 - _G_python_105, lastError = eval(self._G_expr_76, self.globals, _locals), None + _G_python_105, lastError = ( + eval(self._G_expr_76, self.globals, _locals), + None, + ) self.considerError(lastError, "p_hgvs_position") return (_G_python_105, self.currentError) def rule_r_hgvs_position(self): _locals = {"self": self} self.locals["r_hgvs_position"] = _locals - self._trace("", (2790, 2795), self.input.position) + self._trace("", (2789, 2794), self.input.position) _G_apply_106, lastError = self._apply(self.rule_accn, "accn", []) self.considerError(lastError, "r_hgvs_position") _locals["ac"] = _G_apply_106 - self._trace("", (2798, 2812), self.input.position) - _G_apply_107, lastError = self._apply(self.rule_opt_gene_expr, "opt_gene_expr", []) + self._trace("", (2797, 2811), self.input.position) + _G_apply_107, lastError = self._apply( + self.rule_opt_gene_expr, "opt_gene_expr", [] + ) self.considerError(lastError, "r_hgvs_position") _locals["gene"] = _G_apply_107 - self._trace("", (2817, 2821), self.input.position) + self._trace("", (2816, 2820), self.input.position) _G_exactly_108, lastError = self.exactly(":") self.considerError(lastError, "r_hgvs_position") - self._trace("", (2821, 2825), self.input.position) + self._trace("", (2820, 2824), self.input.position) _G_exactly_109, lastError = self.exactly("r") self.considerError(lastError, "r_hgvs_position") _locals["type"] = _G_exactly_109 - self._trace("", (2830, 2834), self.input.position) + self._trace("", (2829, 2833), self.input.position) _G_exactly_110, lastError = self.exactly(".") self.considerError(lastError, "r_hgvs_position") - self._trace("", (2834, 2845), self.input.position) - _G_apply_111, lastError = self._apply(self.rule_r_interval, "r_interval", []) + self._trace("", (2833, 2844), self.input.position) + _G_apply_111, lastError = self._apply( + self.rule_r_interval, "r_interval", [] + ) self.considerError(lastError, "r_hgvs_position") _locals["pos"] = _G_apply_111 - _G_python_112, lastError = eval(self._G_expr_76, self.globals, _locals), None + _G_python_112, lastError = ( + eval(self._G_expr_76, self.globals, _locals), + None, + ) self.considerError(lastError, "r_hgvs_position") return (_G_python_112, self.currentError) def rule_c_typed_posedit(self): _locals = {"self": self} self.locals["c_typed_posedit"] = _locals - self._trace("", (3249, 3253), self.input.position) + self._trace("", (3248, 3252), self.input.position) _G_exactly_113, lastError = self.exactly("c") self.considerError(lastError, "c_typed_posedit") _locals["type"] = _G_exactly_113 - self._trace("", (3258, 3262), self.input.position) + self._trace("", (3257, 3261), self.input.position) _G_exactly_114, lastError = self.exactly(".") self.considerError(lastError, "c_typed_posedit") - self._trace("", (3262, 3272), self.input.position) + self._trace("", (3261, 3271), self.input.position) _G_apply_115, lastError = self._apply(self.rule_c_posedit, "c_posedit", []) self.considerError(lastError, "c_typed_posedit") _locals["posedit"] = _G_apply_115 - _G_python_117, lastError = eval(self._G_expr_116, self.globals, _locals), None + _G_python_117, lastError = ( + eval(self._G_expr_116, self.globals, _locals), + None, + ) self.considerError(lastError, "c_typed_posedit") return (_G_python_117, self.currentError) def rule_g_typed_posedit(self): _locals = {"self": self} self.locals["g_typed_posedit"] = _locals - self._trace("", (3357, 3361), self.input.position) + self._trace("", (3356, 3360), self.input.position) _G_exactly_118, lastError = self.exactly("g") self.considerError(lastError, "g_typed_posedit") _locals["type"] = _G_exactly_118 - self._trace("", (3366, 3370), self.input.position) + self._trace("", (3365, 3369), self.input.position) _G_exactly_119, lastError = self.exactly(".") self.considerError(lastError, "g_typed_posedit") - self._trace("", (3370, 3380), self.input.position) + self._trace("", (3369, 3379), self.input.position) _G_apply_120, lastError = self._apply(self.rule_g_posedit, "g_posedit", []) self.considerError(lastError, "g_typed_posedit") _locals["posedit"] = _G_apply_120 - _G_python_121, lastError = eval(self._G_expr_116, self.globals, _locals), None + _G_python_121, lastError = ( + eval(self._G_expr_116, self.globals, _locals), + None, + ) self.considerError(lastError, "g_typed_posedit") return (_G_python_121, self.currentError) def rule_m_typed_posedit(self): _locals = {"self": self} self.locals["m_typed_posedit"] = _locals - self._trace("", (3465, 3469), self.input.position) + self._trace("", (3464, 3468), self.input.position) _G_exactly_122, lastError = self.exactly("m") self.considerError(lastError, "m_typed_posedit") _locals["type"] = _G_exactly_122 - self._trace("", (3474, 3478), self.input.position) + self._trace("", (3473, 3477), self.input.position) _G_exactly_123, lastError = self.exactly(".") self.considerError(lastError, "m_typed_posedit") - self._trace("", (3478, 3488), self.input.position) + self._trace("", (3477, 3487), self.input.position) _G_apply_124, lastError = self._apply(self.rule_m_posedit, "m_posedit", []) self.considerError(lastError, "m_typed_posedit") _locals["posedit"] = _G_apply_124 - _G_python_125, lastError = eval(self._G_expr_116, self.globals, _locals), None + _G_python_125, lastError = ( + eval(self._G_expr_116, self.globals, _locals), + None, + ) self.considerError(lastError, "m_typed_posedit") return (_G_python_125, self.currentError) def rule_n_typed_posedit(self): _locals = {"self": self} self.locals["n_typed_posedit"] = _locals - self._trace("", (3573, 3577), self.input.position) + self._trace("", (3572, 3576), self.input.position) _G_exactly_126, lastError = self.exactly("n") self.considerError(lastError, "n_typed_posedit") _locals["type"] = _G_exactly_126 - self._trace("", (3582, 3586), self.input.position) + self._trace("", (3581, 3585), self.input.position) _G_exactly_127, lastError = self.exactly(".") self.considerError(lastError, "n_typed_posedit") - self._trace("", (3586, 3596), self.input.position) + self._trace("", (3585, 3595), self.input.position) _G_apply_128, lastError = self._apply(self.rule_n_posedit, "n_posedit", []) self.considerError(lastError, "n_typed_posedit") _locals["posedit"] = _G_apply_128 - _G_python_129, lastError = eval(self._G_expr_116, self.globals, _locals), None + _G_python_129, lastError = ( + eval(self._G_expr_116, self.globals, _locals), + None, + ) self.considerError(lastError, "n_typed_posedit") return (_G_python_129, self.currentError) def rule_p_typed_posedit(self): _locals = {"self": self} self.locals["p_typed_posedit"] = _locals - self._trace("", (3681, 3685), self.input.position) + self._trace("", (3680, 3684), self.input.position) _G_exactly_130, lastError = self.exactly("p") self.considerError(lastError, "p_typed_posedit") _locals["type"] = _G_exactly_130 - self._trace("", (3690, 3694), self.input.position) + self._trace("", (3689, 3693), self.input.position) _G_exactly_131, lastError = self.exactly(".") self.considerError(lastError, "p_typed_posedit") - self._trace("", (3694, 3704), self.input.position) + self._trace("", (3693, 3703), self.input.position) _G_apply_132, lastError = self._apply(self.rule_p_posedit, "p_posedit", []) self.considerError(lastError, "p_typed_posedit") _locals["posedit"] = _G_apply_132 - _G_python_133, lastError = eval(self._G_expr_116, self.globals, _locals), None + _G_python_133, lastError = ( + eval(self._G_expr_116, self.globals, _locals), + None, + ) self.considerError(lastError, "p_typed_posedit") return (_G_python_133, self.currentError) def rule_r_typed_posedit(self): _locals = {"self": self} self.locals["r_typed_posedit"] = _locals - self._trace("", (3789, 3793), self.input.position) + self._trace("", (3788, 3792), self.input.position) _G_exactly_134, lastError = self.exactly("r") self.considerError(lastError, "r_typed_posedit") _locals["type"] = _G_exactly_134 - self._trace("", (3798, 3802), self.input.position) + self._trace("", (3797, 3801), self.input.position) _G_exactly_135, lastError = self.exactly(".") self.considerError(lastError, "r_typed_posedit") - self._trace("", (3802, 3812), self.input.position) + self._trace("", (3801, 3811), self.input.position) _G_apply_136, lastError = self._apply(self.rule_r_posedit, "r_posedit", []) self.considerError(lastError, "r_typed_posedit") _locals["posedit"] = _G_apply_136 - _G_python_137, lastError = eval(self._G_expr_116, self.globals, _locals), None + _G_python_137, lastError = ( + eval(self._G_expr_116, self.globals, _locals), + None, + ) self.considerError(lastError, "r_typed_posedit") return (_G_python_137, self.currentError) def rule_c_posedit(self): _locals = {"self": self} self.locals["c_posedit"] = _locals - self._trace("", (4010, 4021), self.input.position) - _G_apply_138, lastError = self._apply(self.rule_c_interval, "c_interval", []) + self._trace("", (4009, 4020), self.input.position) + _G_apply_138, lastError = self._apply( + self.rule_c_interval, "c_interval", [] + ) self.considerError(lastError, "c_posedit") _locals["pos"] = _G_apply_138 - self._trace("", (4025, 4034), self.input.position) + self._trace("", (4024, 4033), self.input.position) _G_apply_139, lastError = self._apply(self.rule_dna_edit, "dna_edit", []) self.considerError(lastError, "c_posedit") _locals["edit"] = _G_apply_139 - _G_python_141, lastError = eval(self._G_expr_140, self.globals, _locals), None + _G_python_141, lastError = ( + eval(self._G_expr_140, self.globals, _locals), + None, + ) self.considerError(lastError, "c_posedit") return (_G_python_141, self.currentError) def rule_g_posedit(self): _locals = {"self": self} self.locals["g_posedit"] = _locals - self._trace("", (4094, 4105), self.input.position) - _G_apply_142, lastError = self._apply(self.rule_g_interval, "g_interval", []) + self._trace("", (4093, 4104), self.input.position) + _G_apply_142, lastError = self._apply( + self.rule_g_interval, "g_interval", [] + ) self.considerError(lastError, "g_posedit") _locals["pos"] = _G_apply_142 - self._trace("", (4109, 4118), self.input.position) + self._trace("", (4108, 4117), self.input.position) _G_apply_143, lastError = self._apply(self.rule_dna_edit, "dna_edit", []) self.considerError(lastError, "g_posedit") _locals["edit"] = _G_apply_143 - _G_python_144, lastError = eval(self._G_expr_140, self.globals, _locals), None + _G_python_144, lastError = ( + eval(self._G_expr_140, self.globals, _locals), + None, + ) self.considerError(lastError, "g_posedit") return (_G_python_144, self.currentError) def rule_m_posedit(self): _locals = {"self": self} self.locals["m_posedit"] = _locals - self._trace("", (4178, 4189), self.input.position) - _G_apply_145, lastError = self._apply(self.rule_m_interval, "m_interval", []) + self._trace("", (4177, 4188), self.input.position) + _G_apply_145, lastError = self._apply( + self.rule_m_interval, "m_interval", [] + ) self.considerError(lastError, "m_posedit") _locals["pos"] = _G_apply_145 - self._trace("", (4193, 4202), self.input.position) + self._trace("", (4192, 4201), self.input.position) _G_apply_146, lastError = self._apply(self.rule_dna_edit, "dna_edit", []) self.considerError(lastError, "m_posedit") _locals["edit"] = _G_apply_146 - _G_python_147, lastError = eval(self._G_expr_140, self.globals, _locals), None + _G_python_147, lastError = ( + eval(self._G_expr_140, self.globals, _locals), + None, + ) self.considerError(lastError, "m_posedit") return (_G_python_147, self.currentError) def rule_n_posedit(self): _locals = {"self": self} self.locals["n_posedit"] = _locals - self._trace("", (4262, 4273), self.input.position) - _G_apply_148, lastError = self._apply(self.rule_n_interval, "n_interval", []) + self._trace("", (4261, 4272), self.input.position) + _G_apply_148, lastError = self._apply( + self.rule_n_interval, "n_interval", [] + ) self.considerError(lastError, "n_posedit") _locals["pos"] = _G_apply_148 - self._trace("", (4277, 4286), self.input.position) + self._trace("", (4276, 4285), self.input.position) _G_apply_149, lastError = self._apply(self.rule_dna_edit, "dna_edit", []) self.considerError(lastError, "n_posedit") _locals["edit"] = _G_apply_149 - _G_python_150, lastError = eval(self._G_expr_140, self.globals, _locals), None + _G_python_150, lastError = ( + eval(self._G_expr_140, self.globals, _locals), + None, + ) self.considerError(lastError, "n_posedit") return (_G_python_150, self.currentError) @@ -637,34 +723,48 @@ def rule_r_posedit(self): self.locals["r_posedit"] = _locals def _G_or_151(): - self._trace("", (4348, 4358), self.input.position) - _G_apply_152, lastError = self._apply(self.rule_r_interval, "r_interval", []) + self._trace("", (4347, 4357), self.input.position) + _G_apply_152, lastError = self._apply( + self.rule_r_interval, "r_interval", [] + ) self.considerError(lastError, None) _locals["pos"] = _G_apply_152 - self._trace("", (4362, 4371), self.input.position) - _G_apply_153, lastError = self._apply(self.rule_rna_edit, "rna_edit", []) + self._trace("", (4361, 4370), self.input.position) + _G_apply_153, lastError = self._apply( + self.rule_rna_edit, "rna_edit", [] + ) self.considerError(lastError, None) _locals["edit"] = _G_apply_153 - _G_python_154, lastError = eval(self._G_expr_140, self.globals, _locals), None + _G_python_154, lastError = ( + eval(self._G_expr_140, self.globals, _locals), + None, + ) self.considerError(lastError, None) return (_G_python_154, self.currentError) def _G_or_155(): - self._trace("", (4427, 4430), self.input.position) + self._trace("", (4426, 4429), self.input.position) _G_exactly_156, lastError = self.exactly("(") self.considerError(lastError, None) - self._trace("", (4430, 4441), self.input.position) - _G_apply_157, lastError = self._apply(self.rule_r_interval, "r_interval", []) + self._trace("", (4429, 4440), self.input.position) + _G_apply_157, lastError = self._apply( + self.rule_r_interval, "r_interval", [] + ) self.considerError(lastError, None) _locals["pos"] = _G_apply_157 - self._trace("", (4445, 4454), self.input.position) - _G_apply_158, lastError = self._apply(self.rule_rna_edit, "rna_edit", []) + self._trace("", (4444, 4453), self.input.position) + _G_apply_158, lastError = self._apply( + self.rule_rna_edit, "rna_edit", [] + ) self.considerError(lastError, None) _locals["edit"] = _G_apply_158 - self._trace("", (4459, 4463), self.input.position) + self._trace("", (4458, 4462), self.input.position) _G_exactly_159, lastError = self.exactly(")") self.considerError(lastError, None) - _G_python_161, lastError = eval(self._G_expr_160, self.globals, _locals), None + _G_python_161, lastError = ( + eval(self._G_expr_160, self.globals, _locals), + None, + ) self.considerError(lastError, None) return (_G_python_161, self.currentError) @@ -677,39 +777,53 @@ def rule_p_posedit(self): self.locals["p_posedit"] = _locals def _G_or_163(): - self._trace("", (4540, 4550), self.input.position) - _G_apply_164, lastError = self._apply(self.rule_p_interval, "p_interval", []) + self._trace("", (4539, 4549), self.input.position) + _G_apply_164, lastError = self._apply( + self.rule_p_interval, "p_interval", [] + ) self.considerError(lastError, None) _locals["pos"] = _G_apply_164 - self._trace("", (4554, 4563), self.input.position) - _G_apply_165, lastError = self._apply(self.rule_pro_edit, "pro_edit", []) + self._trace("", (4553, 4562), self.input.position) + _G_apply_165, lastError = self._apply( + self.rule_pro_edit, "pro_edit", [] + ) self.considerError(lastError, None) _locals["edit"] = _G_apply_165 - _G_python_166, lastError = eval(self._G_expr_140, self.globals, _locals), None + _G_python_166, lastError = ( + eval(self._G_expr_140, self.globals, _locals), + None, + ) self.considerError(lastError, None) return (_G_python_166, self.currentError) def _G_or_167(): - self._trace("", (4619, 4622), self.input.position) + self._trace("", (4618, 4621), self.input.position) _G_exactly_168, lastError = self.exactly("(") self.considerError(lastError, None) - self._trace("", (4622, 4633), self.input.position) - _G_apply_169, lastError = self._apply(self.rule_p_interval, "p_interval", []) + self._trace("", (4621, 4632), self.input.position) + _G_apply_169, lastError = self._apply( + self.rule_p_interval, "p_interval", [] + ) self.considerError(lastError, None) _locals["pos"] = _G_apply_169 - self._trace("", (4637, 4646), self.input.position) - _G_apply_170, lastError = self._apply(self.rule_pro_edit, "pro_edit", []) + self._trace("", (4636, 4645), self.input.position) + _G_apply_170, lastError = self._apply( + self.rule_pro_edit, "pro_edit", [] + ) self.considerError(lastError, None) _locals["edit"] = _G_apply_170 - self._trace("", (4651, 4655), self.input.position) + self._trace("", (4650, 4654), self.input.position) _G_exactly_171, lastError = self.exactly(")") self.considerError(lastError, None) - _G_python_172, lastError = eval(self._G_expr_160, self.globals, _locals), None + _G_python_172, lastError = ( + eval(self._G_expr_160, self.globals, _locals), + None, + ) self.considerError(lastError, None) return (_G_python_172, self.currentError) def _G_or_173(): - self._trace("", (4720, 4738), self.input.position) + self._trace("", (4719, 4737), self.input.position) _G_apply_174, lastError = self._apply( self.rule_p_posedit_special, "p_posedit_special", [] ) @@ -725,52 +839,64 @@ def rule_p_posedit_special(self): self.locals["p_posedit_special"] = _locals def _G_or_176(): - self._trace("", (4758, 4769), self.input.position) + self._trace("", (4757, 4767), self.input.position) _G_exactly_177, lastError = self.exactly("=") self.considerError(lastError, None) _locals["x"] = _G_exactly_177 - _G_python_179, lastError = eval(self._G_expr_178, self.globals, _locals), None + _G_python_179, lastError = ( + eval(self._G_expr_178, self.globals, _locals), + None, + ) self.considerError(lastError, None) return (_G_python_179, self.currentError) def _G_or_180(): - self._trace("", (4831, 4835), self.input.position) + self._trace("", (4829, 4833), self.input.position) _G_exactly_181, lastError = self.exactly("(") self.considerError(lastError, None) - self._trace("", (4835, 4839), self.input.position) + self._trace("", (4833, 4837), self.input.position) _G_exactly_182, lastError = self.exactly("=") self.considerError(lastError, None) _locals["x"] = _G_exactly_182 - self._trace("", (4841, 4845), self.input.position) + self._trace("", (4839, 4843), self.input.position) _G_exactly_183, lastError = self.exactly(")") self.considerError(lastError, None) - _G_python_185, lastError = eval(self._G_expr_184, self.globals, _locals), None + _G_python_185, lastError = ( + eval(self._G_expr_184, self.globals, _locals), + None, + ) self.considerError(lastError, None) return (_G_python_185, self.currentError) def _G_or_186(): - self._trace("", (4904, 4908), self.input.position) + self._trace("", (4902, 4906), self.input.position) _G_exactly_187, lastError = self.exactly("0") self.considerError(lastError, None) _locals["x"] = _G_exactly_187 - self._trace("", (4910, 4914), self.input.position) + self._trace("", (4908, 4912), self.input.position) _G_exactly_188, lastError = self.exactly("?") self.considerError(lastError, None) - _G_python_189, lastError = eval(self._G_expr_184, self.globals, _locals), None + _G_python_189, lastError = ( + eval(self._G_expr_184, self.globals, _locals), + None, + ) self.considerError(lastError, None) return (_G_python_189, self.currentError) def _G_or_190(): - self._trace("", (4973, 4977), self.input.position) + self._trace("", (4971, 4975), self.input.position) _G_exactly_191, lastError = self.exactly("0") self.considerError(lastError, None) _locals["x"] = _G_exactly_191 - _G_python_192, lastError = eval(self._G_expr_178, self.globals, _locals), None + _G_python_192, lastError = ( + eval(self._G_expr_178, self.globals, _locals), + None, + ) self.considerError(lastError, None) return (_G_python_192, self.currentError) def _G_or_193(): - self._trace("", (5039, 5043), self.input.position) + self._trace("", (5037, 5041), self.input.position) _G_exactly_194, lastError = self.exactly("?") self.considerError(lastError, None) _locals["x"] = _G_exactly_194 @@ -778,7 +904,9 @@ def _G_or_193(): self.considerError(lastError, None) return (_G_python_195, self.currentError) - _G_or_196, lastError = self._or([_G_or_176, _G_or_180, _G_or_186, _G_or_190, _G_or_193]) + _G_or_196, lastError = self._or( + [_G_or_176, _G_or_180, _G_or_186, _G_or_190, _G_or_193] + ) self.considerError(lastError, "p_posedit_special") return (_G_or_196, self.currentError) @@ -787,23 +915,30 @@ def rule_dna_edit_mu(self): self.locals["dna_edit_mu"] = _locals def _G_or_197(): - self._trace("", (5394, 5403), self.input.position) - _G_apply_198, lastError = self._apply(self.rule_dna_edit, "dna_edit", []) + self._trace("", (5392, 5401), self.input.position) + _G_apply_198, lastError = self._apply( + self.rule_dna_edit, "dna_edit", [] + ) self.considerError(lastError, None) return (_G_apply_198, self.currentError) def _G_or_199(): - self._trace("", (5405, 5409), self.input.position) + self._trace("", (5403, 5407), self.input.position) _G_exactly_200, lastError = self.exactly("(") self.considerError(lastError, None) - self._trace("", (5409, 5418), self.input.position) - _G_apply_201, lastError = self._apply(self.rule_dna_edit, "dna_edit", []) + self._trace("", (5407, 5416), self.input.position) + _G_apply_201, lastError = self._apply( + self.rule_dna_edit, "dna_edit", [] + ) self.considerError(lastError, None) _locals["edit"] = _G_apply_201 - self._trace("", (5423, 5427), self.input.position) + self._trace("", (5421, 5425), self.input.position) _G_exactly_202, lastError = self.exactly(")") self.considerError(lastError, None) - _G_python_204, lastError = eval(self._G_expr_203, self.globals, _locals), None + _G_python_204, lastError = ( + eval(self._G_expr_203, self.globals, _locals), + None, + ) self.considerError(lastError, None) return (_G_python_204, self.currentError) @@ -816,56 +951,64 @@ def rule_dna_edit(self): self.locals["dna_edit"] = _locals def _G_or_206(): - self._trace("", (5465, 5475), self.input.position) - _G_apply_207, lastError = self._apply(self.rule_dna_ident, "dna_ident", []) + self._trace("", (5463, 5473), self.input.position) + _G_apply_207, lastError = self._apply( + self.rule_dna_ident, "dna_ident", [] + ) self.considerError(lastError, None) return (_G_apply_207, self.currentError) def _G_or_208(): - self._trace("", (5477, 5487), self.input.position) - _G_apply_209, lastError = self._apply(self.rule_dna_subst, "dna_subst", []) + self._trace("", (5475, 5485), self.input.position) + _G_apply_209, lastError = self._apply( + self.rule_dna_subst, "dna_subst", [] + ) self.considerError(lastError, None) return (_G_apply_209, self.currentError) def _G_or_210(): - self._trace("", (5489, 5500), self.input.position) - _G_apply_211, lastError = self._apply(self.rule_dna_delins, "dna_delins", []) + self._trace("", (5487, 5498), self.input.position) + _G_apply_211, lastError = self._apply( + self.rule_dna_delins, "dna_delins", [] + ) self.considerError(lastError, None) return (_G_apply_211, self.currentError) def _G_or_212(): - self._trace("", (5502, 5510), self.input.position) + self._trace("", (5500, 5508), self.input.position) _G_apply_213, lastError = self._apply(self.rule_dna_ins, "dna_ins", []) self.considerError(lastError, None) return (_G_apply_213, self.currentError) def _G_or_214(): - self._trace("", (5512, 5520), self.input.position) + self._trace("", (5510, 5518), self.input.position) _G_apply_215, lastError = self._apply(self.rule_dna_del, "dna_del", []) self.considerError(lastError, None) return (_G_apply_215, self.currentError) def _G_or_216(): - self._trace("", (5522, 5530), self.input.position) + self._trace("", (5520, 5528), self.input.position) _G_apply_217, lastError = self._apply(self.rule_dna_dup, "dna_dup", []) self.considerError(lastError, None) return (_G_apply_217, self.currentError) def _G_or_218(): - self._trace("", (5532, 5540), self.input.position) + self._trace("", (5530, 5538), self.input.position) _G_apply_219, lastError = self._apply(self.rule_dna_inv, "dna_inv", []) self.considerError(lastError, None) return (_G_apply_219, self.currentError) def _G_or_220(): - self._trace("", (5542, 5550), self.input.position) + self._trace("", (5540, 5548), self.input.position) _G_apply_221, lastError = self._apply(self.rule_dna_con, "dna_con", []) self.considerError(lastError, None) return (_G_apply_221, self.currentError) def _G_or_222(): - self._trace("", (5552, 5561), self.input.position) - _G_apply_223, lastError = self._apply(self.rule_dna_copy, "dna_copy", []) + self._trace("", (5550, 5559), self.input.position) + _G_apply_223, lastError = self._apply( + self.rule_dna_copy, "dna_copy", [] + ) self.considerError(lastError, None) return (_G_apply_223, self.currentError) @@ -891,7 +1034,7 @@ def rule_dna_ident(self): def _G_consumedby_225(): def _G_many_226(): - self._trace("", (5576, 5579), self.input.position) + self._trace("", (5574, 5577), self.input.position) _G_apply_227, lastError = self._apply(self.rule_dna, "dna", []) self.considerError(lastError, None) return (_G_apply_227, self.currentError) @@ -903,41 +1046,47 @@ def _G_many_226(): _G_consumedby_229, lastError = self.consumedby(_G_consumedby_225) self.considerError(lastError, "dna_ident") _locals["ref"] = _G_consumedby_229 - self._trace("", (5585, 5589), self.input.position) + self._trace("", (5583, 5587), self.input.position) _G_exactly_230, lastError = self.exactly("=") self.considerError(lastError, "dna_ident") - _G_python_232, lastError = eval(self._G_expr_231, self.globals, _locals), None + _G_python_232, lastError = ( + eval(self._G_expr_231, self.globals, _locals), + None, + ) self.considerError(lastError, "dna_ident") return (_G_python_232, self.currentError) def rule_dna_subst(self): _locals = {"self": self} self.locals["dna_subst"] = _locals - self._trace("", (5651, 5655), self.input.position) + self._trace("", (5649, 5653), self.input.position) _G_apply_233, lastError = self._apply(self.rule_dna, "dna", []) self.considerError(lastError, "dna_subst") _locals["ref"] = _G_apply_233 - self._trace("", (5659, 5663), self.input.position) + self._trace("", (5657, 5661), self.input.position) _G_exactly_234, lastError = self.exactly(">") self.considerError(lastError, "dna_subst") - self._trace("", (5663, 5667), self.input.position) + self._trace("", (5661, 5665), self.input.position) _G_apply_235, lastError = self._apply(self.rule_dna, "dna", []) self.considerError(lastError, "dna_subst") _locals["alt"] = _G_apply_235 - _G_python_237, lastError = eval(self._G_expr_236, self.globals, _locals), None + _G_python_237, lastError = ( + eval(self._G_expr_236, self.globals, _locals), + None, + ) self.considerError(lastError, "dna_subst") return (_G_python_237, self.currentError) def rule_dna_delins(self): _locals = {"self": self} self.locals["dna_delins"] = _locals - self._trace("", (5728, 5734), self.input.position) + self._trace("", (5726, 5732), self.input.position) _G_exactly_238, lastError = self.exactly("del") self.considerError(lastError, "dna_delins") def _G_or_239(): def _G_consumedby_240(): - self._trace("", (5737, 5740), self.input.position) + self._trace("", (5735, 5738), self.input.position) _G_apply_241, lastError = self._apply(self.rule_num, "num", []) self.considerError(lastError, None) return (_G_apply_241, self.currentError) @@ -949,7 +1098,7 @@ def _G_consumedby_240(): def _G_or_243(): def _G_consumedby_244(): def _G_many_245(): - self._trace("", (5743, 5746), self.input.position) + self._trace("", (5741, 5744), self.input.position) _G_apply_246, lastError = self._apply(self.rule_dna, "dna", []) self.considerError(lastError, None) return (_G_apply_246, self.currentError) @@ -965,13 +1114,13 @@ def _G_many_245(): _G_or_249, lastError = self._or([_G_or_239, _G_or_243]) self.considerError(lastError, "dna_delins") _locals["ref"] = _G_or_249 - self._trace("", (5753, 5759), self.input.position) + self._trace("", (5751, 5757), self.input.position) _G_exactly_250, lastError = self.exactly("ins") self.considerError(lastError, "dna_delins") def _G_consumedby_251(): def _G_many1_252(): - self._trace("", (5761, 5764), self.input.position) + self._trace("", (5759, 5762), self.input.position) _G_apply_253, lastError = self._apply(self.rule_dna, "dna", []) self.considerError(lastError, None) return (_G_apply_253, self.currentError) @@ -983,20 +1132,23 @@ def _G_many1_252(): _G_consumedby_255, lastError = self.consumedby(_G_consumedby_251) self.considerError(lastError, "dna_delins") _locals["alt"] = _G_consumedby_255 - _G_python_256, lastError = eval(self._G_expr_236, self.globals, _locals), None + _G_python_256, lastError = ( + eval(self._G_expr_236, self.globals, _locals), + None, + ) self.considerError(lastError, "dna_delins") return (_G_python_256, self.currentError) def rule_dna_del(self): _locals = {"self": self} self.locals["dna_del"] = _locals - self._trace("", (5823, 5829), self.input.position) + self._trace("", (5821, 5827), self.input.position) _G_exactly_257, lastError = self.exactly("del") self.considerError(lastError, "dna_del") def _G_or_258(): def _G_consumedby_259(): - self._trace("", (5832, 5835), self.input.position) + self._trace("", (5830, 5833), self.input.position) _G_apply_260, lastError = self._apply(self.rule_num, "num", []) self.considerError(lastError, None) return (_G_apply_260, self.currentError) @@ -1008,7 +1160,7 @@ def _G_consumedby_259(): def _G_or_262(): def _G_consumedby_263(): def _G_many_264(): - self._trace("", (5838, 5841), self.input.position) + self._trace("", (5836, 5839), self.input.position) _G_apply_265, lastError = self._apply(self.rule_dna, "dna", []) self.considerError(lastError, None) return (_G_apply_265, self.currentError) @@ -1024,20 +1176,23 @@ def _G_many_264(): _G_or_268, lastError = self._or([_G_or_258, _G_or_262]) self.considerError(lastError, "dna_del") _locals["ref"] = _G_or_268 - _G_python_270, lastError = eval(self._G_expr_269, self.globals, _locals), None + _G_python_270, lastError = ( + eval(self._G_expr_269, self.globals, _locals), + None, + ) self.considerError(lastError, "dna_del") return (_G_python_270, self.currentError) def rule_dna_ins(self): _locals = {"self": self} self.locals["dna_ins"] = _locals - self._trace("", (5901, 5907), self.input.position) + self._trace("", (5899, 5905), self.input.position) _G_exactly_271, lastError = self.exactly("ins") self.considerError(lastError, "dna_ins") def _G_consumedby_272(): def _G_many1_273(): - self._trace("", (5909, 5912), self.input.position) + self._trace("", (5907, 5910), self.input.position) _G_apply_274, lastError = self._apply(self.rule_dna, "dna", []) self.considerError(lastError, None) return (_G_apply_274, self.currentError) @@ -1049,20 +1204,23 @@ def _G_many1_273(): _G_consumedby_276, lastError = self.consumedby(_G_consumedby_272) self.considerError(lastError, "dna_ins") _locals["alt"] = _G_consumedby_276 - _G_python_278, lastError = eval(self._G_expr_277, self.globals, _locals), None + _G_python_278, lastError = ( + eval(self._G_expr_277, self.globals, _locals), + None, + ) self.considerError(lastError, "dna_ins") return (_G_python_278, self.currentError) def rule_dna_dup(self): _locals = {"self": self} self.locals["dna_dup"] = _locals - self._trace("", (5979, 5985), self.input.position) + self._trace("", (5977, 5983), self.input.position) _G_exactly_279, lastError = self.exactly("dup") self.considerError(lastError, "dna_dup") def _G_consumedby_280(): def _G_many_281(): - self._trace("", (5987, 5990), self.input.position) + self._trace("", (5985, 5988), self.input.position) _G_apply_282, lastError = self._apply(self.rule_dna, "dna", []) self.considerError(lastError, None) return (_G_apply_282, self.currentError) @@ -1074,20 +1232,23 @@ def _G_many_281(): _G_consumedby_284, lastError = self.consumedby(_G_consumedby_280) self.considerError(lastError, "dna_dup") _locals["ref"] = _G_consumedby_284 - _G_python_286, lastError = eval(self._G_expr_285, self.globals, _locals), None + _G_python_286, lastError = ( + eval(self._G_expr_285, self.globals, _locals), + None, + ) self.considerError(lastError, "dna_dup") return (_G_python_286, self.currentError) def rule_dna_inv(self): _locals = {"self": self} self.locals["dna_inv"] = _locals - self._trace("", (6043, 6049), self.input.position) + self._trace("", (6041, 6047), self.input.position) _G_exactly_287, lastError = self.exactly("inv") self.considerError(lastError, "dna_inv") def _G_or_288(): def _G_consumedby_289(): - self._trace("", (6052, 6055), self.input.position) + self._trace("", (6050, 6053), self.input.position) _G_apply_290, lastError = self._apply(self.rule_num, "num", []) self.considerError(lastError, None) return (_G_apply_290, self.currentError) @@ -1099,7 +1260,7 @@ def _G_consumedby_289(): def _G_or_292(): def _G_consumedby_293(): def _G_many_294(): - self._trace("", (6058, 6061), self.input.position) + self._trace("", (6056, 6059), self.input.position) _G_apply_295, lastError = self._apply(self.rule_dna, "dna", []) self.considerError(lastError, None) return (_G_apply_295, self.currentError) @@ -1115,35 +1276,46 @@ def _G_many_294(): _G_or_298, lastError = self._or([_G_or_288, _G_or_292]) self.considerError(lastError, "dna_inv") _locals["ref"] = _G_or_298 - _G_python_300, lastError = eval(self._G_expr_299, self.globals, _locals), None + _G_python_300, lastError = ( + eval(self._G_expr_299, self.globals, _locals), + None, + ) self.considerError(lastError, "dna_inv") return (_G_python_300, self.currentError) def rule_dna_con(self): _locals = {"self": self} self.locals["dna_con"] = _locals - self._trace("", (6108, 6114), self.input.position) + self._trace("", (6106, 6112), self.input.position) _G_exactly_301, lastError = self.exactly("con") self.considerError(lastError, "dna_con") - self._trace("", (6114, 6128), self.input.position) - _G_apply_302, lastError = self._apply(self.rule_hgvs_position, "hgvs_position", []) + self._trace("", (6112, 6126), self.input.position) + _G_apply_302, lastError = self._apply( + self.rule_hgvs_position, "hgvs_position", [] + ) self.considerError(lastError, "dna_con") _locals["pos"] = _G_apply_302 - _G_python_304, lastError = eval(self._G_expr_303, self.globals, _locals), None + _G_python_304, lastError = ( + eval(self._G_expr_303, self.globals, _locals), + None, + ) self.considerError(lastError, "dna_con") return (_G_python_304, self.currentError) def rule_dna_copy(self): _locals = {"self": self} self.locals["dna_copy"] = _locals - self._trace("", (6218, 6225), self.input.position) + self._trace("", (6216, 6223), self.input.position) _G_exactly_305, lastError = self.exactly("copy") self.considerError(lastError, "dna_copy") - self._trace("", (6225, 6229), self.input.position) + self._trace("", (6223, 6227), self.input.position) _G_apply_306, lastError = self._apply(self.rule_num, "num", []) self.considerError(lastError, "dna_copy") _locals["n"] = _G_apply_306 - _G_python_308, lastError = eval(self._G_expr_307, self.globals, _locals), None + _G_python_308, lastError = ( + eval(self._G_expr_307, self.globals, _locals), + None, + ) self.considerError(lastError, "dna_copy") return (_G_python_308, self.currentError) @@ -1152,23 +1324,30 @@ def rule_rna_edit_mu(self): self.locals["rna_edit_mu"] = _locals def _G_or_309(): - self._trace("", (6274, 6283), self.input.position) - _G_apply_310, lastError = self._apply(self.rule_rna_edit, "rna_edit", []) + self._trace("", (6272, 6281), self.input.position) + _G_apply_310, lastError = self._apply( + self.rule_rna_edit, "rna_edit", [] + ) self.considerError(lastError, None) return (_G_apply_310, self.currentError) def _G_or_311(): - self._trace("", (6285, 6289), self.input.position) + self._trace("", (6283, 6287), self.input.position) _G_exactly_312, lastError = self.exactly("(") self.considerError(lastError, None) - self._trace("", (6289, 6298), self.input.position) - _G_apply_313, lastError = self._apply(self.rule_rna_edit, "rna_edit", []) + self._trace("", (6287, 6296), self.input.position) + _G_apply_313, lastError = self._apply( + self.rule_rna_edit, "rna_edit", [] + ) self.considerError(lastError, None) _locals["edit"] = _G_apply_313 - self._trace("", (6303, 6307), self.input.position) + self._trace("", (6301, 6305), self.input.position) _G_exactly_314, lastError = self.exactly(")") self.considerError(lastError, None) - _G_python_315, lastError = eval(self._G_expr_203, self.globals, _locals), None + _G_python_315, lastError = ( + eval(self._G_expr_203, self.globals, _locals), + None, + ) self.considerError(lastError, None) return (_G_python_315, self.currentError) @@ -1181,49 +1360,55 @@ def rule_rna_edit(self): self.locals["rna_edit"] = _locals def _G_or_317(): - self._trace("", (6345, 6355), self.input.position) - _G_apply_318, lastError = self._apply(self.rule_rna_ident, "rna_ident", []) + self._trace("", (6343, 6353), self.input.position) + _G_apply_318, lastError = self._apply( + self.rule_rna_ident, "rna_ident", [] + ) self.considerError(lastError, None) return (_G_apply_318, self.currentError) def _G_or_319(): - self._trace("", (6357, 6367), self.input.position) - _G_apply_320, lastError = self._apply(self.rule_rna_subst, "rna_subst", []) + self._trace("", (6355, 6365), self.input.position) + _G_apply_320, lastError = self._apply( + self.rule_rna_subst, "rna_subst", [] + ) self.considerError(lastError, None) return (_G_apply_320, self.currentError) def _G_or_321(): - self._trace("", (6369, 6380), self.input.position) - _G_apply_322, lastError = self._apply(self.rule_rna_delins, "rna_delins", []) + self._trace("", (6367, 6378), self.input.position) + _G_apply_322, lastError = self._apply( + self.rule_rna_delins, "rna_delins", [] + ) self.considerError(lastError, None) return (_G_apply_322, self.currentError) def _G_or_323(): - self._trace("", (6382, 6390), self.input.position) + self._trace("", (6380, 6388), self.input.position) _G_apply_324, lastError = self._apply(self.rule_rna_ins, "rna_ins", []) self.considerError(lastError, None) return (_G_apply_324, self.currentError) def _G_or_325(): - self._trace("", (6392, 6400), self.input.position) + self._trace("", (6390, 6398), self.input.position) _G_apply_326, lastError = self._apply(self.rule_rna_del, "rna_del", []) self.considerError(lastError, None) return (_G_apply_326, self.currentError) def _G_or_327(): - self._trace("", (6402, 6410), self.input.position) + self._trace("", (6400, 6408), self.input.position) _G_apply_328, lastError = self._apply(self.rule_rna_dup, "rna_dup", []) self.considerError(lastError, None) return (_G_apply_328, self.currentError) def _G_or_329(): - self._trace("", (6412, 6420), self.input.position) + self._trace("", (6410, 6418), self.input.position) _G_apply_330, lastError = self._apply(self.rule_rna_inv, "rna_inv", []) self.considerError(lastError, None) return (_G_apply_330, self.currentError) def _G_or_331(): - self._trace("", (6422, 6430), self.input.position) + self._trace("", (6420, 6428), self.input.position) _G_apply_332, lastError = self._apply(self.rule_rna_con, "rna_con", []) self.considerError(lastError, None) return (_G_apply_332, self.currentError) @@ -1249,7 +1434,7 @@ def rule_rna_ident(self): def _G_consumedby_334(): def _G_many_335(): - self._trace("", (6445, 6448), self.input.position) + self._trace("", (6443, 6446), self.input.position) _G_apply_336, lastError = self._apply(self.rule_rna, "rna", []) self.considerError(lastError, None) return (_G_apply_336, self.currentError) @@ -1261,41 +1446,47 @@ def _G_many_335(): _G_consumedby_338, lastError = self.consumedby(_G_consumedby_334) self.considerError(lastError, "rna_ident") _locals["ref"] = _G_consumedby_338 - self._trace("", (6454, 6458), self.input.position) + self._trace("", (6452, 6456), self.input.position) _G_exactly_339, lastError = self.exactly("=") self.considerError(lastError, "rna_ident") - _G_python_340, lastError = eval(self._G_expr_231, self.globals, _locals), None + _G_python_340, lastError = ( + eval(self._G_expr_231, self.globals, _locals), + None, + ) self.considerError(lastError, "rna_ident") return (_G_python_340, self.currentError) def rule_rna_subst(self): _locals = {"self": self} self.locals["rna_subst"] = _locals - self._trace("", (6527, 6531), self.input.position) + self._trace("", (6525, 6529), self.input.position) _G_apply_341, lastError = self._apply(self.rule_rna, "rna", []) self.considerError(lastError, "rna_subst") _locals["ref"] = _G_apply_341 - self._trace("", (6535, 6539), self.input.position) + self._trace("", (6533, 6537), self.input.position) _G_exactly_342, lastError = self.exactly(">") self.considerError(lastError, "rna_subst") - self._trace("", (6539, 6543), self.input.position) + self._trace("", (6537, 6541), self.input.position) _G_apply_343, lastError = self._apply(self.rule_rna, "rna", []) self.considerError(lastError, "rna_subst") _locals["alt"] = _G_apply_343 - _G_python_344, lastError = eval(self._G_expr_236, self.globals, _locals), None + _G_python_344, lastError = ( + eval(self._G_expr_236, self.globals, _locals), + None, + ) self.considerError(lastError, "rna_subst") return (_G_python_344, self.currentError) def rule_rna_delins(self): _locals = {"self": self} self.locals["rna_delins"] = _locals - self._trace("", (6611, 6617), self.input.position) + self._trace("", (6609, 6615), self.input.position) _G_exactly_345, lastError = self.exactly("del") self.considerError(lastError, "rna_delins") def _G_or_346(): def _G_consumedby_347(): - self._trace("", (6620, 6623), self.input.position) + self._trace("", (6618, 6621), self.input.position) _G_apply_348, lastError = self._apply(self.rule_num, "num", []) self.considerError(lastError, None) return (_G_apply_348, self.currentError) @@ -1307,7 +1498,7 @@ def _G_consumedby_347(): def _G_or_350(): def _G_consumedby_351(): def _G_many_352(): - self._trace("", (6626, 6629), self.input.position) + self._trace("", (6624, 6627), self.input.position) _G_apply_353, lastError = self._apply(self.rule_rna, "rna", []) self.considerError(lastError, None) return (_G_apply_353, self.currentError) @@ -1323,13 +1514,13 @@ def _G_many_352(): _G_or_356, lastError = self._or([_G_or_346, _G_or_350]) self.considerError(lastError, "rna_delins") _locals["ref"] = _G_or_356 - self._trace("", (6636, 6642), self.input.position) + self._trace("", (6634, 6640), self.input.position) _G_exactly_357, lastError = self.exactly("ins") self.considerError(lastError, "rna_delins") def _G_consumedby_358(): def _G_many1_359(): - self._trace("", (6644, 6647), self.input.position) + self._trace("", (6642, 6645), self.input.position) _G_apply_360, lastError = self._apply(self.rule_rna, "rna", []) self.considerError(lastError, None) return (_G_apply_360, self.currentError) @@ -1341,20 +1532,23 @@ def _G_many1_359(): _G_consumedby_362, lastError = self.consumedby(_G_consumedby_358) self.considerError(lastError, "rna_delins") _locals["alt"] = _G_consumedby_362 - _G_python_363, lastError = eval(self._G_expr_236, self.globals, _locals), None + _G_python_363, lastError = ( + eval(self._G_expr_236, self.globals, _locals), + None, + ) self.considerError(lastError, "rna_delins") return (_G_python_363, self.currentError) def rule_rna_del(self): _locals = {"self": self} self.locals["rna_del"] = _locals - self._trace("", (6706, 6712), self.input.position) + self._trace("", (6704, 6710), self.input.position) _G_exactly_364, lastError = self.exactly("del") self.considerError(lastError, "rna_del") def _G_or_365(): def _G_consumedby_366(): - self._trace("", (6715, 6718), self.input.position) + self._trace("", (6713, 6716), self.input.position) _G_apply_367, lastError = self._apply(self.rule_num, "num", []) self.considerError(lastError, None) return (_G_apply_367, self.currentError) @@ -1366,7 +1560,7 @@ def _G_consumedby_366(): def _G_or_369(): def _G_consumedby_370(): def _G_many_371(): - self._trace("", (6721, 6724), self.input.position) + self._trace("", (6719, 6722), self.input.position) _G_apply_372, lastError = self._apply(self.rule_rna, "rna", []) self.considerError(lastError, None) return (_G_apply_372, self.currentError) @@ -1382,20 +1576,23 @@ def _G_many_371(): _G_or_375, lastError = self._or([_G_or_365, _G_or_369]) self.considerError(lastError, "rna_del") _locals["ref"] = _G_or_375 - _G_python_376, lastError = eval(self._G_expr_269, self.globals, _locals), None + _G_python_376, lastError = ( + eval(self._G_expr_269, self.globals, _locals), + None, + ) self.considerError(lastError, "rna_del") return (_G_python_376, self.currentError) def rule_rna_ins(self): _locals = {"self": self} self.locals["rna_ins"] = _locals - self._trace("", (6791, 6797), self.input.position) + self._trace("", (6789, 6795), self.input.position) _G_exactly_377, lastError = self.exactly("ins") self.considerError(lastError, "rna_ins") def _G_consumedby_378(): def _G_many1_379(): - self._trace("", (6799, 6802), self.input.position) + self._trace("", (6797, 6800), self.input.position) _G_apply_380, lastError = self._apply(self.rule_rna, "rna", []) self.considerError(lastError, None) return (_G_apply_380, self.currentError) @@ -1407,20 +1604,23 @@ def _G_many1_379(): _G_consumedby_382, lastError = self.consumedby(_G_consumedby_378) self.considerError(lastError, "rna_ins") _locals["alt"] = _G_consumedby_382 - _G_python_383, lastError = eval(self._G_expr_277, self.globals, _locals), None + _G_python_383, lastError = ( + eval(self._G_expr_277, self.globals, _locals), + None, + ) self.considerError(lastError, "rna_ins") return (_G_python_383, self.currentError) def rule_rna_dup(self): _locals = {"self": self} self.locals["rna_dup"] = _locals - self._trace("", (6876, 6882), self.input.position) + self._trace("", (6874, 6880), self.input.position) _G_exactly_384, lastError = self.exactly("dup") self.considerError(lastError, "rna_dup") def _G_consumedby_385(): def _G_many_386(): - self._trace("", (6884, 6887), self.input.position) + self._trace("", (6882, 6885), self.input.position) _G_apply_387, lastError = self._apply(self.rule_rna, "rna", []) self.considerError(lastError, None) return (_G_apply_387, self.currentError) @@ -1432,20 +1632,23 @@ def _G_many_386(): _G_consumedby_389, lastError = self.consumedby(_G_consumedby_385) self.considerError(lastError, "rna_dup") _locals["ref"] = _G_consumedby_389 - _G_python_390, lastError = eval(self._G_expr_285, self.globals, _locals), None + _G_python_390, lastError = ( + eval(self._G_expr_285, self.globals, _locals), + None, + ) self.considerError(lastError, "rna_dup") return (_G_python_390, self.currentError) def rule_rna_inv(self): _locals = {"self": self} self.locals["rna_inv"] = _locals - self._trace("", (6947, 6953), self.input.position) + self._trace("", (6945, 6951), self.input.position) _G_exactly_391, lastError = self.exactly("inv") self.considerError(lastError, "rna_inv") def _G_or_392(): def _G_consumedby_393(): - self._trace("", (6956, 6959), self.input.position) + self._trace("", (6954, 6957), self.input.position) _G_apply_394, lastError = self._apply(self.rule_num, "num", []) self.considerError(lastError, None) return (_G_apply_394, self.currentError) @@ -1457,7 +1660,7 @@ def _G_consumedby_393(): def _G_or_396(): def _G_consumedby_397(): def _G_many_398(): - self._trace("", (6962, 6965), self.input.position) + self._trace("", (6960, 6963), self.input.position) _G_apply_399, lastError = self._apply(self.rule_rna, "rna", []) self.considerError(lastError, None) return (_G_apply_399, self.currentError) @@ -1473,21 +1676,29 @@ def _G_many_398(): _G_or_402, lastError = self._or([_G_or_392, _G_or_396]) self.considerError(lastError, "rna_inv") _locals["ref"] = _G_or_402 - _G_python_403, lastError = eval(self._G_expr_299, self.globals, _locals), None + _G_python_403, lastError = ( + eval(self._G_expr_299, self.globals, _locals), + None, + ) self.considerError(lastError, "rna_inv") return (_G_python_403, self.currentError) def rule_rna_con(self): _locals = {"self": self} self.locals["rna_con"] = _locals - self._trace("", (7019, 7025), self.input.position) + self._trace("", (7017, 7023), self.input.position) _G_exactly_404, lastError = self.exactly("con") self.considerError(lastError, "rna_con") - self._trace("", (7025, 7039), self.input.position) - _G_apply_405, lastError = self._apply(self.rule_hgvs_position, "hgvs_position", []) + self._trace("", (7023, 7037), self.input.position) + _G_apply_405, lastError = self._apply( + self.rule_hgvs_position, "hgvs_position", [] + ) self.considerError(lastError, "rna_con") _locals["pos"] = _G_apply_405 - _G_python_406, lastError = eval(self._G_expr_303, self.globals, _locals), None + _G_python_406, lastError = ( + eval(self._G_expr_303, self.globals, _locals), + None, + ) self.considerError(lastError, "rna_con") return (_G_python_406, self.currentError) @@ -1496,23 +1707,30 @@ def rule_pro_edit_mu(self): self.locals["pro_edit_mu"] = _locals def _G_or_407(): - self._trace("", (7138, 7147), self.input.position) - _G_apply_408, lastError = self._apply(self.rule_pro_edit, "pro_edit", []) + self._trace("", (7136, 7145), self.input.position) + _G_apply_408, lastError = self._apply( + self.rule_pro_edit, "pro_edit", [] + ) self.considerError(lastError, None) return (_G_apply_408, self.currentError) def _G_or_409(): - self._trace("", (7149, 7153), self.input.position) + self._trace("", (7147, 7151), self.input.position) _G_exactly_410, lastError = self.exactly("(") self.considerError(lastError, None) - self._trace("", (7153, 7162), self.input.position) - _G_apply_411, lastError = self._apply(self.rule_pro_edit, "pro_edit", []) + self._trace("", (7151, 7160), self.input.position) + _G_apply_411, lastError = self._apply( + self.rule_pro_edit, "pro_edit", [] + ) self.considerError(lastError, None) _locals["edit"] = _G_apply_411 - self._trace("", (7167, 7171), self.input.position) + self._trace("", (7165, 7169), self.input.position) _G_exactly_412, lastError = self.exactly(")") self.considerError(lastError, None) - _G_python_413, lastError = eval(self._G_expr_203, self.globals, _locals), None + _G_python_413, lastError = ( + eval(self._G_expr_203, self.globals, _locals), + None, + ) self.considerError(lastError, None) return (_G_python_413, self.currentError) @@ -1525,50 +1743,56 @@ def rule_pro_edit(self): self.locals["pro_edit"] = _locals def _G_or_415(): - self._trace("", (7209, 7216), self.input.position) + self._trace("", (7207, 7214), self.input.position) _G_apply_416, lastError = self._apply(self.rule_pro_fs, "pro_fs", []) self.considerError(lastError, None) return (_G_apply_416, self.currentError) def _G_or_417(): - self._trace("", (7218, 7226), self.input.position) + self._trace("", (7216, 7224), self.input.position) _G_apply_418, lastError = self._apply(self.rule_pro_ext, "pro_ext", []) self.considerError(lastError, None) return (_G_apply_418, self.currentError) def _G_or_419(): - self._trace("", (7228, 7238), self.input.position) - _G_apply_420, lastError = self._apply(self.rule_pro_subst, "pro_subst", []) + self._trace("", (7226, 7236), self.input.position) + _G_apply_420, lastError = self._apply( + self.rule_pro_subst, "pro_subst", [] + ) self.considerError(lastError, None) return (_G_apply_420, self.currentError) def _G_or_421(): - self._trace("", (7240, 7251), self.input.position) - _G_apply_422, lastError = self._apply(self.rule_pro_delins, "pro_delins", []) + self._trace("", (7238, 7249), self.input.position) + _G_apply_422, lastError = self._apply( + self.rule_pro_delins, "pro_delins", [] + ) self.considerError(lastError, None) return (_G_apply_422, self.currentError) def _G_or_423(): - self._trace("", (7253, 7261), self.input.position) + self._trace("", (7251, 7259), self.input.position) _G_apply_424, lastError = self._apply(self.rule_pro_ins, "pro_ins", []) self.considerError(lastError, None) return (_G_apply_424, self.currentError) def _G_or_425(): - self._trace("", (7263, 7271), self.input.position) + self._trace("", (7261, 7269), self.input.position) _G_apply_426, lastError = self._apply(self.rule_pro_del, "pro_del", []) self.considerError(lastError, None) return (_G_apply_426, self.currentError) def _G_or_427(): - self._trace("", (7273, 7281), self.input.position) + self._trace("", (7271, 7279), self.input.position) _G_apply_428, lastError = self._apply(self.rule_pro_dup, "pro_dup", []) self.considerError(lastError, None) return (_G_apply_428, self.currentError) def _G_or_429(): - self._trace("", (7283, 7293), self.input.position) - _G_apply_430, lastError = self._apply(self.rule_pro_ident, "pro_ident", []) + self._trace("", (7281, 7291), self.input.position) + _G_apply_430, lastError = self._apply( + self.rule_pro_ident, "pro_ident", [] + ) self.considerError(lastError, None) return (_G_apply_430, self.currentError) @@ -1592,13 +1816,13 @@ def rule_pro_subst(self): self.locals["pro_subst"] = _locals def _G_or_432(): - self._trace("", (7308, 7313), self.input.position) + self._trace("", (7306, 7311), self.input.position) _G_apply_433, lastError = self._apply(self.rule_aat13, "aat13", []) self.considerError(lastError, None) return (_G_apply_433, self.currentError) def _G_or_434(): - self._trace("", (7314, 7317), self.input.position) + self._trace("", (7312, 7315), self.input.position) _G_exactly_435, lastError = self.exactly("?") self.considerError(lastError, None) return (_G_exactly_435, self.currentError) @@ -1606,55 +1830,70 @@ def _G_or_434(): _G_or_436, lastError = self._or([_G_or_432, _G_or_434]) self.considerError(lastError, "pro_subst") _locals["alt"] = _G_or_436 - _G_python_438, lastError = eval(self._G_expr_437, self.globals, _locals), None + _G_python_438, lastError = ( + eval(self._G_expr_437, self.globals, _locals), + None, + ) self.considerError(lastError, "pro_subst") return (_G_python_438, self.currentError) def rule_pro_delins(self): _locals = {"self": self} self.locals["pro_delins"] = _locals - self._trace("", (7386, 7395), self.input.position) + self._trace("", (7384, 7393), self.input.position) _G_exactly_439, lastError = self.exactly("delins") self.considerError(lastError, "pro_delins") - self._trace("", (7395, 7405), self.input.position) + self._trace("", (7393, 7403), self.input.position) _G_apply_440, lastError = self._apply(self.rule_aat13_seq, "aat13_seq", []) self.considerError(lastError, "pro_delins") _locals["alt"] = _G_apply_440 - _G_python_442, lastError = eval(self._G_expr_441, self.globals, _locals), None + _G_python_442, lastError = ( + eval(self._G_expr_441, self.globals, _locals), + None, + ) self.considerError(lastError, "pro_delins") return (_G_python_442, self.currentError) def rule_pro_del(self): _locals = {"self": self} self.locals["pro_del"] = _locals - self._trace("", (7469, 7475), self.input.position) + self._trace("", (7467, 7473), self.input.position) _G_exactly_443, lastError = self.exactly("del") self.considerError(lastError, "pro_del") - _G_python_445, lastError = eval(self._G_expr_444, self.globals, _locals), None + _G_python_445, lastError = ( + eval(self._G_expr_444, self.globals, _locals), + None, + ) self.considerError(lastError, "pro_del") return (_G_python_445, self.currentError) def rule_pro_ins(self): _locals = {"self": self} self.locals["pro_ins"] = _locals - self._trace("", (7553, 7559), self.input.position) + self._trace("", (7551, 7557), self.input.position) _G_exactly_446, lastError = self.exactly("ins") self.considerError(lastError, "pro_ins") - self._trace("", (7559, 7569), self.input.position) + self._trace("", (7557, 7567), self.input.position) _G_apply_447, lastError = self._apply(self.rule_aat13_seq, "aat13_seq", []) self.considerError(lastError, "pro_ins") _locals["alt"] = _G_apply_447 - _G_python_449, lastError = eval(self._G_expr_448, self.globals, _locals), None + _G_python_449, lastError = ( + eval(self._G_expr_448, self.globals, _locals), + None, + ) self.considerError(lastError, "pro_ins") return (_G_python_449, self.currentError) def rule_pro_dup(self): _locals = {"self": self} self.locals["pro_dup"] = _locals - self._trace("", (7638, 7644), self.input.position) + self._trace("", (7636, 7642), self.input.position) _G_exactly_450, lastError = self.exactly("dup") self.considerError(lastError, "pro_dup") - _G_python_452, lastError = eval(self._G_expr_451, self.globals, _locals), None + _G_python_452, lastError = ( + eval(self._G_expr_451, self.globals, _locals), + None, + ) self.considerError(lastError, "pro_dup") return (_G_python_452, self.currentError) @@ -1663,7 +1902,7 @@ def rule_pro_fs(self): self.locals["pro_fs"] = _locals def _G_or_453(): - self._trace("", (7710, 7715), self.input.position) + self._trace("", (7708, 7713), self.input.position) _G_apply_454, lastError = self._apply(self.rule_aat13, "aat13", []) self.considerError(lastError, None) return (_G_apply_454, self.currentError) @@ -1676,11 +1915,14 @@ def _G_or_455(): _G_or_457, lastError = self._or([_G_or_453, _G_or_455]) self.considerError(lastError, "pro_fs") _locals["alt"] = _G_or_457 - self._trace("", (7730, 7733), self.input.position) + self._trace("", (7728, 7731), self.input.position) _G_apply_458, lastError = self._apply(self.rule_fs, "fs", []) self.considerError(lastError, "pro_fs") _locals["length"] = _G_apply_458 - _G_python_460, lastError = eval(self._G_expr_459, self.globals, _locals), None + _G_python_460, lastError = ( + eval(self._G_expr_459, self.globals, _locals), + None, + ) self.considerError(lastError, "pro_fs") return (_G_python_460, self.currentError) @@ -1689,7 +1931,7 @@ def rule_pro_ext(self): self.locals["pro_ext"] = _locals def _G_optional_461(): - self._trace("", (7803, 7809), self.input.position) + self._trace("", (7801, 7807), self.input.position) _G_apply_462, lastError = self._apply(self.rule_aat13, "aat13", []) self.considerError(lastError, None) return (_G_apply_462, self.currentError) @@ -1700,22 +1942,28 @@ def _G_optional_463(): _G_or_464, lastError = self._or([_G_optional_461, _G_optional_463]) self.considerError(lastError, "pro_ext") _locals["alt"] = _G_or_464 - self._trace("", (7814, 7818), self.input.position) + self._trace("", (7812, 7816), self.input.position) _G_apply_465, lastError = self._apply(self.rule_ext, "ext", []) self.considerError(lastError, "pro_ext") _locals["aaterm"] = _G_apply_465[0] _locals["length"] = _G_apply_465[1] - _G_python_467, lastError = eval(self._G_expr_466, self.globals, _locals), None + _G_python_467, lastError = ( + eval(self._G_expr_466, self.globals, _locals), + None, + ) self.considerError(lastError, "pro_ext") return (_G_python_467, self.currentError) def rule_pro_ident(self): _locals = {"self": self} self.locals["pro_ident"] = _locals - self._trace("", (7914, 7918), self.input.position) + self._trace("", (7912, 7916), self.input.position) _G_exactly_468, lastError = self.exactly("=") self.considerError(lastError, "pro_ident") - _G_python_470, lastError = eval(self._G_expr_469, self.globals, _locals), None + _G_python_470, lastError = ( + eval(self._G_expr_469, self.globals, _locals), + None, + ) self.considerError(lastError, "pro_ident") return (_G_python_470, self.currentError) @@ -1724,7 +1972,7 @@ def rule_c_interval(self): self.locals["c_interval"] = _locals def _G_or_471(): - self._trace("", (8240, 8255), self.input.position) + self._trace("", (8238, 8253), self.input.position) _G_apply_472, lastError = self._apply( self.rule_def_c_interval, "def_c_interval", [] ) @@ -1732,19 +1980,22 @@ def _G_or_471(): return (_G_apply_472, self.currentError) def _G_or_473(): - self._trace("", (8257, 8261), self.input.position) + self._trace("", (8255, 8259), self.input.position) _G_exactly_474, lastError = self.exactly("(") self.considerError(lastError, None) - self._trace("", (8261, 8276), self.input.position) + self._trace("", (8259, 8274), self.input.position) _G_apply_475, lastError = self._apply( self.rule_def_c_interval, "def_c_interval", [] ) self.considerError(lastError, None) _locals["iv"] = _G_apply_475 - self._trace("", (8279, 8283), self.input.position) + self._trace("", (8277, 8281), self.input.position) _G_exactly_476, lastError = self.exactly(")") self.considerError(lastError, None) - _G_python_478, lastError = eval(self._G_expr_477, self.globals, _locals), None + _G_python_478, lastError = ( + eval(self._G_expr_477, self.globals, _locals), + None, + ) self.considerError(lastError, None) return (_G_python_478, self.currentError) @@ -1757,1611 +2008,1887 @@ def rule_g_interval(self): self.locals["g_interval"] = _locals def _G_or_480(): - self._trace("", (8319, 8334), self.input.position) + self._trace("", (8317, 8338), self.input.position) _G_apply_481, lastError = self._apply( - self.rule_def_g_interval, "def_g_interval", [] + self.rule_uncertain_g_interval, "uncertain_g_interval", [] ) self.considerError(lastError, None) + _locals["iv"] = _G_apply_481 return (_G_apply_481, self.currentError) def _G_or_482(): - self._trace("", (8336, 8340), self.input.position) - _G_exactly_483, lastError = self.exactly("(") - self.considerError(lastError, None) - self._trace("", (8340, 8355), self.input.position) - _G_apply_484, lastError = self._apply( + self._trace("", (8343, 8359), self.input.position) + _G_apply_483, lastError = self._apply( self.rule_def_g_interval, "def_g_interval", [] ) self.considerError(lastError, None) - _locals["iv"] = _G_apply_484 - self._trace("", (8358, 8362), self.input.position) - _G_exactly_485, lastError = self.exactly(")") - self.considerError(lastError, None) - _G_python_486, lastError = eval(self._G_expr_477, self.globals, _locals), None - self.considerError(lastError, None) - return (_G_python_486, self.currentError) + return (_G_apply_483, self.currentError) - _G_or_487, lastError = self._or([_G_or_480, _G_or_482]) + _G_or_484, lastError = self._or([_G_or_480, _G_or_482]) self.considerError(lastError, "g_interval") - return (_G_or_487, self.currentError) + return (_G_or_484, self.currentError) def rule_m_interval(self): _locals = {"self": self} self.locals["m_interval"] = _locals - def _G_or_488(): - self._trace("", (8398, 8413), self.input.position) - _G_apply_489, lastError = self._apply( + def _G_or_485(): + self._trace("", (8372, 8387), self.input.position) + _G_apply_486, lastError = self._apply( self.rule_def_m_interval, "def_m_interval", [] ) self.considerError(lastError, None) - return (_G_apply_489, self.currentError) + return (_G_apply_486, self.currentError) - def _G_or_490(): - self._trace("", (8415, 8419), self.input.position) - _G_exactly_491, lastError = self.exactly("(") + def _G_or_487(): + self._trace("", (8389, 8393), self.input.position) + _G_exactly_488, lastError = self.exactly("(") self.considerError(lastError, None) - self._trace("", (8419, 8434), self.input.position) - _G_apply_492, lastError = self._apply( + self._trace("", (8393, 8408), self.input.position) + _G_apply_489, lastError = self._apply( self.rule_def_m_interval, "def_m_interval", [] ) self.considerError(lastError, None) - _locals["iv"] = _G_apply_492 - self._trace("", (8437, 8441), self.input.position) - _G_exactly_493, lastError = self.exactly(")") + _locals["iv"] = _G_apply_489 + self._trace("", (8411, 8415), self.input.position) + _G_exactly_490, lastError = self.exactly(")") self.considerError(lastError, None) - _G_python_494, lastError = eval(self._G_expr_477, self.globals, _locals), None + _G_python_491, lastError = ( + eval(self._G_expr_477, self.globals, _locals), + None, + ) self.considerError(lastError, None) - return (_G_python_494, self.currentError) + return (_G_python_491, self.currentError) - _G_or_495, lastError = self._or([_G_or_488, _G_or_490]) + _G_or_492, lastError = self._or([_G_or_485, _G_or_487]) self.considerError(lastError, "m_interval") - return (_G_or_495, self.currentError) + return (_G_or_492, self.currentError) def rule_n_interval(self): _locals = {"self": self} self.locals["n_interval"] = _locals - def _G_or_496(): - self._trace("", (8477, 8492), self.input.position) - _G_apply_497, lastError = self._apply( + def _G_or_493(): + self._trace("", (8451, 8466), self.input.position) + _G_apply_494, lastError = self._apply( self.rule_def_n_interval, "def_n_interval", [] ) self.considerError(lastError, None) - return (_G_apply_497, self.currentError) + return (_G_apply_494, self.currentError) - def _G_or_498(): - self._trace("", (8494, 8498), self.input.position) - _G_exactly_499, lastError = self.exactly("(") + def _G_or_495(): + self._trace("", (8468, 8472), self.input.position) + _G_exactly_496, lastError = self.exactly("(") self.considerError(lastError, None) - self._trace("", (8498, 8513), self.input.position) - _G_apply_500, lastError = self._apply( + self._trace("", (8472, 8487), self.input.position) + _G_apply_497, lastError = self._apply( self.rule_def_n_interval, "def_n_interval", [] ) self.considerError(lastError, None) - _locals["iv"] = _G_apply_500 - self._trace("", (8516, 8520), self.input.position) - _G_exactly_501, lastError = self.exactly(")") + _locals["iv"] = _G_apply_497 + self._trace("", (8490, 8494), self.input.position) + _G_exactly_498, lastError = self.exactly(")") self.considerError(lastError, None) - _G_python_502, lastError = eval(self._G_expr_477, self.globals, _locals), None + _G_python_499, lastError = ( + eval(self._G_expr_477, self.globals, _locals), + None, + ) self.considerError(lastError, None) - return (_G_python_502, self.currentError) + return (_G_python_499, self.currentError) - _G_or_503, lastError = self._or([_G_or_496, _G_or_498]) + _G_or_500, lastError = self._or([_G_or_493, _G_or_495]) self.considerError(lastError, "n_interval") - return (_G_or_503, self.currentError) + return (_G_or_500, self.currentError) def rule_p_interval(self): _locals = {"self": self} self.locals["p_interval"] = _locals - def _G_or_504(): - self._trace("", (8556, 8571), self.input.position) - _G_apply_505, lastError = self._apply( + def _G_or_501(): + self._trace("", (8530, 8545), self.input.position) + _G_apply_502, lastError = self._apply( self.rule_def_p_interval, "def_p_interval", [] ) self.considerError(lastError, None) - return (_G_apply_505, self.currentError) + return (_G_apply_502, self.currentError) - def _G_or_506(): - self._trace("", (8573, 8577), self.input.position) - _G_exactly_507, lastError = self.exactly("(") + def _G_or_503(): + self._trace("", (8547, 8551), self.input.position) + _G_exactly_504, lastError = self.exactly("(") self.considerError(lastError, None) - self._trace("", (8577, 8592), self.input.position) - _G_apply_508, lastError = self._apply( + self._trace("", (8551, 8566), self.input.position) + _G_apply_505, lastError = self._apply( self.rule_def_p_interval, "def_p_interval", [] ) self.considerError(lastError, None) - _locals["iv"] = _G_apply_508 - self._trace("", (8595, 8599), self.input.position) - _G_exactly_509, lastError = self.exactly(")") + _locals["iv"] = _G_apply_505 + self._trace("", (8569, 8573), self.input.position) + _G_exactly_506, lastError = self.exactly(")") self.considerError(lastError, None) - _G_python_510, lastError = eval(self._G_expr_477, self.globals, _locals), None + _G_python_507, lastError = ( + eval(self._G_expr_477, self.globals, _locals), + None, + ) self.considerError(lastError, None) - return (_G_python_510, self.currentError) + return (_G_python_507, self.currentError) - _G_or_511, lastError = self._or([_G_or_504, _G_or_506]) + _G_or_508, lastError = self._or([_G_or_501, _G_or_503]) self.considerError(lastError, "p_interval") - return (_G_or_511, self.currentError) + return (_G_or_508, self.currentError) def rule_r_interval(self): _locals = {"self": self} self.locals["r_interval"] = _locals - def _G_or_512(): - self._trace("", (8635, 8650), self.input.position) - _G_apply_513, lastError = self._apply( + def _G_or_509(): + self._trace("", (8609, 8624), self.input.position) + _G_apply_510, lastError = self._apply( self.rule_def_r_interval, "def_r_interval", [] ) self.considerError(lastError, None) - return (_G_apply_513, self.currentError) + return (_G_apply_510, self.currentError) - def _G_or_514(): - self._trace("", (8652, 8656), self.input.position) - _G_exactly_515, lastError = self.exactly("(") + def _G_or_511(): + self._trace("", (8626, 8630), self.input.position) + _G_exactly_512, lastError = self.exactly("(") self.considerError(lastError, None) - self._trace("", (8656, 8671), self.input.position) - _G_apply_516, lastError = self._apply( + self._trace("", (8630, 8645), self.input.position) + _G_apply_513, lastError = self._apply( self.rule_def_r_interval, "def_r_interval", [] ) self.considerError(lastError, None) - _locals["iv"] = _G_apply_516 - self._trace("", (8674, 8678), self.input.position) - _G_exactly_517, lastError = self.exactly(")") + _locals["iv"] = _G_apply_513 + self._trace("", (8648, 8652), self.input.position) + _G_exactly_514, lastError = self.exactly(")") self.considerError(lastError, None) - _G_python_518, lastError = eval(self._G_expr_477, self.globals, _locals), None + _G_python_515, lastError = ( + eval(self._G_expr_477, self.globals, _locals), + None, + ) self.considerError(lastError, None) - return (_G_python_518, self.currentError) + return (_G_python_515, self.currentError) - _G_or_519, lastError = self._or([_G_or_512, _G_or_514]) + _G_or_516, lastError = self._or([_G_or_509, _G_or_511]) self.considerError(lastError, "r_interval") - return (_G_or_519, self.currentError) + return (_G_or_516, self.currentError) def rule_def_g_interval(self): _locals = {"self": self} self.locals["def_g_interval"] = _locals - def _G_or_520(): - self._trace("", (8742, 8747), self.input.position) - _G_apply_521, lastError = self._apply(self.rule_g_pos, "g_pos", []) + def _G_or_517(): + self._trace("", (8716, 8721), self.input.position) + _G_apply_518, lastError = self._apply(self.rule_g_pos, "g_pos", []) self.considerError(lastError, None) - _locals["start"] = _G_apply_521 - self._trace("", (8753, 8757), self.input.position) - _G_exactly_522, lastError = self.exactly("_") + _locals["start"] = _G_apply_518 + self._trace("", (8727, 8731), self.input.position) + _G_exactly_519, lastError = self.exactly("_") self.considerError(lastError, None) - self._trace("", (8757, 8763), self.input.position) - _G_apply_523, lastError = self._apply(self.rule_g_pos, "g_pos", []) + self._trace("", (8731, 8737), self.input.position) + _G_apply_520, lastError = self._apply(self.rule_g_pos, "g_pos", []) self.considerError(lastError, None) - _locals["end"] = _G_apply_523 - _G_python_525, lastError = eval(self._G_expr_524, self.globals, _locals), None + _locals["end"] = _G_apply_520 + _G_python_522, lastError = ( + eval(self._G_expr_521, self.globals, _locals), + None, + ) self.considerError(lastError, None) - return (_G_python_525, self.currentError) + return (_G_python_522, self.currentError) - def _G_or_526(): - self._trace("", (8809, 8814), self.input.position) - _G_apply_527, lastError = self._apply(self.rule_g_pos, "g_pos", []) + def _G_or_523(): + self._trace("", (8783, 8788), self.input.position) + _G_apply_524, lastError = self._apply(self.rule_g_pos, "g_pos", []) self.considerError(lastError, None) - _locals["start"] = _G_apply_527 - _G_python_529, lastError = eval(self._G_expr_528, self.globals, _locals), None + _locals["start"] = _G_apply_524 + _G_python_526, lastError = ( + eval(self._G_expr_525, self.globals, _locals), + None, + ) self.considerError(lastError, None) - return (_G_python_529, self.currentError) + return (_G_python_526, self.currentError) - _G_or_530, lastError = self._or([_G_or_520, _G_or_526]) + _G_or_527, lastError = self._or([_G_or_517, _G_or_523]) self.considerError(lastError, "def_g_interval") - return (_G_or_530, self.currentError) + return (_G_or_527, self.currentError) def rule_def_m_interval(self): _locals = {"self": self} self.locals["def_m_interval"] = _locals - def _G_or_531(): - self._trace("", (8894, 8899), self.input.position) - _G_apply_532, lastError = self._apply(self.rule_m_pos, "m_pos", []) + def _G_or_528(): + self._trace("", (8852, 8857), self.input.position) + _G_apply_529, lastError = self._apply(self.rule_m_pos, "m_pos", []) self.considerError(lastError, None) - _locals["start"] = _G_apply_532 - self._trace("", (8905, 8909), self.input.position) - _G_exactly_533, lastError = self.exactly("_") + _locals["start"] = _G_apply_529 + self._trace("", (8863, 8867), self.input.position) + _G_exactly_530, lastError = self.exactly("_") self.considerError(lastError, None) - self._trace("", (8909, 8915), self.input.position) - _G_apply_534, lastError = self._apply(self.rule_m_pos, "m_pos", []) + self._trace("", (8867, 8873), self.input.position) + _G_apply_531, lastError = self._apply(self.rule_m_pos, "m_pos", []) self.considerError(lastError, None) - _locals["end"] = _G_apply_534 - _G_python_535, lastError = eval(self._G_expr_524, self.globals, _locals), None + _locals["end"] = _G_apply_531 + _G_python_532, lastError = ( + eval(self._G_expr_521, self.globals, _locals), + None, + ) self.considerError(lastError, None) - return (_G_python_535, self.currentError) + return (_G_python_532, self.currentError) - def _G_or_536(): - self._trace("", (8961, 8966), self.input.position) - _G_apply_537, lastError = self._apply(self.rule_m_pos, "m_pos", []) + def _G_or_533(): + self._trace("", (8919, 8924), self.input.position) + _G_apply_534, lastError = self._apply(self.rule_m_pos, "m_pos", []) self.considerError(lastError, None) - _locals["start"] = _G_apply_537 - _G_python_538, lastError = eval(self._G_expr_528, self.globals, _locals), None + _locals["start"] = _G_apply_534 + _G_python_535, lastError = ( + eval(self._G_expr_525, self.globals, _locals), + None, + ) self.considerError(lastError, None) - return (_G_python_538, self.currentError) + return (_G_python_535, self.currentError) - _G_or_539, lastError = self._or([_G_or_531, _G_or_536]) + _G_or_536, lastError = self._or([_G_or_528, _G_or_533]) self.considerError(lastError, "def_m_interval") - return (_G_or_539, self.currentError) + return (_G_or_536, self.currentError) def rule_def_p_interval(self): _locals = {"self": self} self.locals["def_p_interval"] = _locals - def _G_or_540(): - self._trace("", (9046, 9051), self.input.position) - _G_apply_541, lastError = self._apply(self.rule_p_pos, "p_pos", []) + def _G_or_537(): + self._trace("", (8988, 8993), self.input.position) + _G_apply_538, lastError = self._apply(self.rule_p_pos, "p_pos", []) self.considerError(lastError, None) - _locals["start"] = _G_apply_541 - self._trace("", (9057, 9061), self.input.position) - _G_exactly_542, lastError = self.exactly("_") + _locals["start"] = _G_apply_538 + self._trace("", (8999, 9003), self.input.position) + _G_exactly_539, lastError = self.exactly("_") self.considerError(lastError, None) - self._trace("", (9061, 9067), self.input.position) - _G_apply_543, lastError = self._apply(self.rule_p_pos, "p_pos", []) + self._trace("", (9003, 9009), self.input.position) + _G_apply_540, lastError = self._apply(self.rule_p_pos, "p_pos", []) self.considerError(lastError, None) - _locals["end"] = _G_apply_543 - _G_python_544, lastError = eval(self._G_expr_524, self.globals, _locals), None + _locals["end"] = _G_apply_540 + _G_python_541, lastError = ( + eval(self._G_expr_521, self.globals, _locals), + None, + ) self.considerError(lastError, None) - return (_G_python_544, self.currentError) + return (_G_python_541, self.currentError) - def _G_or_545(): - self._trace("", (9113, 9118), self.input.position) - _G_apply_546, lastError = self._apply(self.rule_p_pos, "p_pos", []) + def _G_or_542(): + self._trace("", (9055, 9060), self.input.position) + _G_apply_543, lastError = self._apply(self.rule_p_pos, "p_pos", []) self.considerError(lastError, None) - _locals["start"] = _G_apply_546 - _G_python_547, lastError = eval(self._G_expr_528, self.globals, _locals), None + _locals["start"] = _G_apply_543 + _G_python_544, lastError = ( + eval(self._G_expr_525, self.globals, _locals), + None, + ) self.considerError(lastError, None) - return (_G_python_547, self.currentError) + return (_G_python_544, self.currentError) - _G_or_548, lastError = self._or([_G_or_540, _G_or_545]) + _G_or_545, lastError = self._or([_G_or_537, _G_or_542]) self.considerError(lastError, "def_p_interval") - return (_G_or_548, self.currentError) + return (_G_or_545, self.currentError) def rule_def_r_interval(self): _locals = {"self": self} self.locals["def_r_interval"] = _locals - def _G_or_549(): - self._trace("", (9198, 9203), self.input.position) - _G_apply_550, lastError = self._apply(self.rule_r_pos, "r_pos", []) + def _G_or_546(): + self._trace("", (9124, 9129), self.input.position) + _G_apply_547, lastError = self._apply(self.rule_r_pos, "r_pos", []) self.considerError(lastError, None) - _locals["start"] = _G_apply_550 - self._trace("", (9209, 9213), self.input.position) - _G_exactly_551, lastError = self.exactly("_") + _locals["start"] = _G_apply_547 + self._trace("", (9135, 9139), self.input.position) + _G_exactly_548, lastError = self.exactly("_") self.considerError(lastError, None) - self._trace("", (9213, 9219), self.input.position) - _G_apply_552, lastError = self._apply(self.rule_r_pos, "r_pos", []) + self._trace("", (9139, 9145), self.input.position) + _G_apply_549, lastError = self._apply(self.rule_r_pos, "r_pos", []) self.considerError(lastError, None) - _locals["end"] = _G_apply_552 - _G_python_553, lastError = eval(self._G_expr_524, self.globals, _locals), None + _locals["end"] = _G_apply_549 + _G_python_550, lastError = ( + eval(self._G_expr_521, self.globals, _locals), + None, + ) self.considerError(lastError, None) - return (_G_python_553, self.currentError) + return (_G_python_550, self.currentError) - def _G_or_554(): - self._trace("", (9265, 9270), self.input.position) - _G_apply_555, lastError = self._apply(self.rule_r_pos, "r_pos", []) + def _G_or_551(): + self._trace("", (9191, 9196), self.input.position) + _G_apply_552, lastError = self._apply(self.rule_r_pos, "r_pos", []) self.considerError(lastError, None) - _locals["start"] = _G_apply_555 - _G_python_556, lastError = eval(self._G_expr_528, self.globals, _locals), None + _locals["start"] = _G_apply_552 + _G_python_553, lastError = ( + eval(self._G_expr_525, self.globals, _locals), + None, + ) self.considerError(lastError, None) - return (_G_python_556, self.currentError) + return (_G_python_553, self.currentError) - _G_or_557, lastError = self._or([_G_or_549, _G_or_554]) + _G_or_554, lastError = self._or([_G_or_546, _G_or_551]) self.considerError(lastError, "def_r_interval") - return (_G_or_557, self.currentError) + return (_G_or_554, self.currentError) def rule_def_c_interval(self): _locals = {"self": self} self.locals["def_c_interval"] = _locals - def _G_or_558(): - self._trace("", (9350, 9355), self.input.position) - _G_apply_559, lastError = self._apply(self.rule_c_pos, "c_pos", []) + def _G_or_555(): + self._trace("", (9260, 9265), self.input.position) + _G_apply_556, lastError = self._apply(self.rule_c_pos, "c_pos", []) self.considerError(lastError, None) - _locals["start"] = _G_apply_559 - self._trace("", (9361, 9365), self.input.position) - _G_exactly_560, lastError = self.exactly("_") + _locals["start"] = _G_apply_556 + self._trace("", (9271, 9275), self.input.position) + _G_exactly_557, lastError = self.exactly("_") self.considerError(lastError, None) - self._trace("", (9365, 9371), self.input.position) - _G_apply_561, lastError = self._apply(self.rule_c_pos, "c_pos", []) + self._trace("", (9275, 9281), self.input.position) + _G_apply_558, lastError = self._apply(self.rule_c_pos, "c_pos", []) self.considerError(lastError, None) - _locals["end"] = _G_apply_561 - _G_python_563, lastError = eval(self._G_expr_562, self.globals, _locals), None + _locals["end"] = _G_apply_558 + _G_python_560, lastError = ( + eval(self._G_expr_559, self.globals, _locals), + None, + ) self.considerError(lastError, None) - return (_G_python_563, self.currentError) + return (_G_python_560, self.currentError) - def _G_or_564(): - self._trace("", (9427, 9432), self.input.position) - _G_apply_565, lastError = self._apply(self.rule_c_pos, "c_pos", []) + def _G_or_561(): + self._trace("", (9337, 9342), self.input.position) + _G_apply_562, lastError = self._apply(self.rule_c_pos, "c_pos", []) self.considerError(lastError, None) - _locals["start"] = _G_apply_565 - _G_python_567, lastError = eval(self._G_expr_566, self.globals, _locals), None + _locals["start"] = _G_apply_562 + _G_python_564, lastError = ( + eval(self._G_expr_563, self.globals, _locals), + None, + ) self.considerError(lastError, None) - return (_G_python_567, self.currentError) + return (_G_python_564, self.currentError) - _G_or_568, lastError = self._or([_G_or_558, _G_or_564]) + _G_or_565, lastError = self._or([_G_or_555, _G_or_561]) self.considerError(lastError, "def_c_interval") - return (_G_or_568, self.currentError) + return (_G_or_565, self.currentError) def rule_def_n_interval(self): _locals = {"self": self} self.locals["def_n_interval"] = _locals - def _G_or_569(): - self._trace("", (9522, 9527), self.input.position) - _G_apply_570, lastError = self._apply(self.rule_n_pos, "n_pos", []) + def _G_or_566(): + self._trace("", (9432, 9437), self.input.position) + _G_apply_567, lastError = self._apply(self.rule_n_pos, "n_pos", []) + self.considerError(lastError, None) + _locals["start"] = _G_apply_567 + self._trace("", (9443, 9447), self.input.position) + _G_exactly_568, lastError = self.exactly("_") self.considerError(lastError, None) - _locals["start"] = _G_apply_570 - self._trace("", (9533, 9537), self.input.position) - _G_exactly_571, lastError = self.exactly("_") + self._trace("", (9447, 9453), self.input.position) + _G_apply_569, lastError = self._apply(self.rule_n_pos, "n_pos", []) self.considerError(lastError, None) - self._trace("", (9537, 9543), self.input.position) + _locals["end"] = _G_apply_569 + _G_python_570, lastError = ( + eval(self._G_expr_559, self.globals, _locals), + None, + ) + self.considerError(lastError, None) + return (_G_python_570, self.currentError) + + def _G_or_571(): + self._trace("", (9509, 9514), self.input.position) _G_apply_572, lastError = self._apply(self.rule_n_pos, "n_pos", []) self.considerError(lastError, None) - _locals["end"] = _G_apply_572 - _G_python_573, lastError = eval(self._G_expr_562, self.globals, _locals), None + _locals["start"] = _G_apply_572 + _G_python_573, lastError = ( + eval(self._G_expr_563, self.globals, _locals), + None, + ) self.considerError(lastError, None) return (_G_python_573, self.currentError) - def _G_or_574(): - self._trace("", (9599, 9604), self.input.position) - _G_apply_575, lastError = self._apply(self.rule_n_pos, "n_pos", []) + _G_or_574, lastError = self._or([_G_or_566, _G_or_571]) + self.considerError(lastError, "def_n_interval") + return (_G_or_574, self.currentError) + + def rule_uncertain_g_interval(self): + _locals = {"self": self} + self.locals["uncertain_g_interval"] = _locals + + def _G_or_575(): + self._trace("", (9629, 9633), self.input.position) + _G_exactly_576, lastError = self.exactly("(") + self.considerError(lastError, None) + self._trace("", (9633, 9648), self.input.position) + _G_apply_577, lastError = self._apply( + self.rule_def_g_interval, "def_g_interval", [] + ) + self.considerError(lastError, None) + _locals["ivl_start"] = _G_apply_577 + self._trace("", (9658, 9662), self.input.position) + _G_exactly_578, lastError = self.exactly(")") + self.considerError(lastError, None) + self._trace("", (9662, 9666), self.input.position) + _G_exactly_579, lastError = self.exactly("_") + self.considerError(lastError, None) + self._trace("", (9666, 9670), self.input.position) + _G_exactly_580, lastError = self.exactly("(") + self.considerError(lastError, None) + self._trace("", (9670, 9685), self.input.position) + _G_apply_581, lastError = self._apply( + self.rule_def_g_interval, "def_g_interval", [] + ) self.considerError(lastError, None) - _locals["start"] = _G_apply_575 - _G_python_576, lastError = eval(self._G_expr_566, self.globals, _locals), None + _locals["ivl_end"] = _G_apply_581 + self._trace("", (9693, 9697), self.input.position) + _G_exactly_582, lastError = self.exactly(")") self.considerError(lastError, None) - return (_G_python_576, self.currentError) + _G_python_584, lastError = ( + eval(self._G_expr_583, self.globals, _locals), + None, + ) + self.considerError(lastError, None) + return (_G_python_584, self.currentError) - _G_or_577, lastError = self._or([_G_or_569, _G_or_574]) - self.considerError(lastError, "def_n_interval") - return (_G_or_577, self.currentError) + def _G_or_585(): + self._trace("", (9813, 9828), self.input.position) + _G_apply_586, lastError = self._apply( + self.rule_def_g_interval, "def_g_interval", [] + ) + self.considerError(lastError, None) + _locals["ivl_start"] = _G_apply_586 + self._trace("", (9838, 9842), self.input.position) + _G_exactly_587, lastError = self.exactly("_") + self.considerError(lastError, None) + self._trace("", (9842, 9846), self.input.position) + _G_exactly_588, lastError = self.exactly("(") + self.considerError(lastError, None) + self._trace("", (9846, 9861), self.input.position) + _G_apply_589, lastError = self._apply( + self.rule_def_g_interval, "def_g_interval", [] + ) + self.considerError(lastError, None) + _locals["ivl_end"] = _G_apply_589 + self._trace("", (9869, 9873), self.input.position) + _G_exactly_590, lastError = self.exactly(")") + self.considerError(lastError, None) + _G_python_592, lastError = ( + eval(self._G_expr_591, self.globals, _locals), + None, + ) + self.considerError(lastError, None) + return (_G_python_592, self.currentError) + + def _G_or_593(): + self._trace("", (9972, 9976), self.input.position) + _G_exactly_594, lastError = self.exactly("(") + self.considerError(lastError, None) + self._trace("", (9976, 9991), self.input.position) + _G_apply_595, lastError = self._apply( + self.rule_def_g_interval, "def_g_interval", [] + ) + self.considerError(lastError, None) + _locals["ivl_start"] = _G_apply_595 + self._trace("", (10001, 10005), self.input.position) + _G_exactly_596, lastError = self.exactly(")") + self.considerError(lastError, None) + self._trace("", (10005, 10009), self.input.position) + _G_exactly_597, lastError = self.exactly("_") + self.considerError(lastError, None) + self._trace("", (10009, 10024), self.input.position) + _G_apply_598, lastError = self._apply( + self.rule_def_g_interval, "def_g_interval", [] + ) + self.considerError(lastError, None) + _locals["ivl_end"] = _G_apply_598 + _G_python_600, lastError = ( + eval(self._G_expr_599, self.globals, _locals), + None, + ) + self.considerError(lastError, None) + return (_G_python_600, self.currentError) + + def _G_or_601(): + self._trace("", (10134, 10137), self.input.position) + _G_exactly_602, lastError = self.exactly("(") + self.considerError(lastError, None) + self._trace("", (10137, 10152), self.input.position) + _G_apply_603, lastError = self._apply( + self.rule_def_g_interval, "def_g_interval", [] + ) + self.considerError(lastError, None) + _locals["iv"] = _G_apply_603 + self._trace("", (10155, 10159), self.input.position) + _G_exactly_604, lastError = self.exactly(")") + self.considerError(lastError, None) + _G_python_605, lastError = ( + eval(self._G_expr_477, self.globals, _locals), + None, + ) + self.considerError(lastError, None) + return (_G_python_605, self.currentError) + + _G_or_606, lastError = self._or( + [_G_or_575, _G_or_585, _G_or_593, _G_or_601] + ) + self.considerError(lastError, "uncertain_g_interval") + return (_G_or_606, self.currentError) def rule_c_pos(self): _locals = {"self": self} self.locals["c_pos"] = _locals - self._trace("", (9696, 9706), self.input.position) - _G_apply_578, lastError = self._apply(self.rule_def_c_pos, "def_c_pos", []) + self._trace("", (10206, 10216), self.input.position) + _G_apply_607, lastError = self._apply(self.rule_def_c_pos, "def_c_pos", []) self.considerError(lastError, "c_pos") - return (_G_apply_578, self.currentError) + return (_G_apply_607, self.currentError) def rule_g_pos(self): _locals = {"self": self} self.locals["g_pos"] = _locals - self._trace("", (9763, 9773), self.input.position) - _G_apply_579, lastError = self._apply(self.rule_def_g_pos, "def_g_pos", []) + self._trace("", (10273, 10283), self.input.position) + _G_apply_608, lastError = self._apply(self.rule_def_g_pos, "def_g_pos", []) self.considerError(lastError, "g_pos") - return (_G_apply_579, self.currentError) + return (_G_apply_608, self.currentError) def rule_m_pos(self): _locals = {"self": self} self.locals["m_pos"] = _locals - self._trace("", (9830, 9840), self.input.position) - _G_apply_580, lastError = self._apply(self.rule_def_m_pos, "def_m_pos", []) + self._trace("", (10340, 10350), self.input.position) + _G_apply_609, lastError = self._apply(self.rule_def_m_pos, "def_m_pos", []) self.considerError(lastError, "m_pos") - return (_G_apply_580, self.currentError) + return (_G_apply_609, self.currentError) def rule_n_pos(self): _locals = {"self": self} self.locals["n_pos"] = _locals - self._trace("", (9897, 9907), self.input.position) - _G_apply_581, lastError = self._apply(self.rule_def_n_pos, "def_n_pos", []) + self._trace("", (10407, 10417), self.input.position) + _G_apply_610, lastError = self._apply(self.rule_def_n_pos, "def_n_pos", []) self.considerError(lastError, "n_pos") - return (_G_apply_581, self.currentError) + return (_G_apply_610, self.currentError) def rule_p_pos(self): _locals = {"self": self} self.locals["p_pos"] = _locals - self._trace("", (9964, 9974), self.input.position) - _G_apply_582, lastError = self._apply(self.rule_def_p_pos, "def_p_pos", []) + self._trace("", (10474, 10484), self.input.position) + _G_apply_611, lastError = self._apply(self.rule_def_p_pos, "def_p_pos", []) self.considerError(lastError, "p_pos") - return (_G_apply_582, self.currentError) + return (_G_apply_611, self.currentError) def rule_r_pos(self): _locals = {"self": self} self.locals["r_pos"] = _locals - self._trace("", (10031, 10041), self.input.position) - _G_apply_583, lastError = self._apply(self.rule_def_r_pos, "def_r_pos", []) + self._trace("", (10541, 10551), self.input.position) + _G_apply_612, lastError = self._apply(self.rule_def_r_pos, "def_r_pos", []) self.considerError(lastError, "r_pos") - return (_G_apply_583, self.currentError) + return (_G_apply_612, self.currentError) def rule_def_c_pos(self): _locals = {"self": self} self.locals["def_c_pos"] = _locals - def _G_or_584(): - self._trace("", (10124, 10129), self.input.position) - _G_apply_585, lastError = self._apply(self.rule_base, "base", []) + def _G_or_613(): + self._trace("", (10634, 10639), self.input.position) + _G_apply_614, lastError = self._apply(self.rule_base, "base", []) self.considerError(lastError, None) - _locals["b"] = _G_apply_585 - self._trace("", (10131, 10138), self.input.position) - _G_apply_586, lastError = self._apply(self.rule_offset, "offset", []) + _locals["b"] = _G_apply_614 + self._trace("", (10641, 10648), self.input.position) + _G_apply_615, lastError = self._apply(self.rule_offset, "offset", []) self.considerError(lastError, None) - _locals["o"] = _G_apply_586 - _G_python_588, lastError = eval(self._G_expr_587, self.globals, _locals), None + _locals["o"] = _G_apply_615 + _G_python_617, lastError = ( + eval(self._G_expr_616, self.globals, _locals), + None, + ) self.considerError(lastError, None) - return (_G_python_588, self.currentError) + return (_G_python_617, self.currentError) - def _G_or_589(): - self._trace("", (10223, 10227), self.input.position) - _G_exactly_590, lastError = self.exactly("*") + def _G_or_618(): + self._trace("", (10733, 10737), self.input.position) + _G_exactly_619, lastError = self.exactly("*") self.considerError(lastError, None) - self._trace("", (10227, 10231), self.input.position) - _G_apply_591, lastError = self._apply(self.rule_num, "num", []) + self._trace("", (10737, 10741), self.input.position) + _G_apply_620, lastError = self._apply(self.rule_num, "num", []) self.considerError(lastError, None) - _locals["b"] = _G_apply_591 - self._trace("", (10233, 10240), self.input.position) - _G_apply_592, lastError = self._apply(self.rule_offset, "offset", []) + _locals["b"] = _G_apply_620 + self._trace("", (10743, 10750), self.input.position) + _G_apply_621, lastError = self._apply(self.rule_offset, "offset", []) self.considerError(lastError, None) - _locals["o"] = _G_apply_592 - _G_python_594, lastError = eval(self._G_expr_593, self.globals, _locals), None + _locals["o"] = _G_apply_621 + _G_python_623, lastError = ( + eval(self._G_expr_622, self.globals, _locals), + None, + ) self.considerError(lastError, None) - return (_G_python_594, self.currentError) + return (_G_python_623, self.currentError) - _G_or_595, lastError = self._or([_G_or_584, _G_or_589]) + _G_or_624, lastError = self._or([_G_or_613, _G_or_618]) self.considerError(lastError, "def_c_pos") - return (_G_or_595, self.currentError) + return (_G_or_624, self.currentError) def rule_def_g_pos(self): _locals = {"self": self} self.locals["def_g_pos"] = _locals - def _G_or_596(): - self._trace("", (10328, 10331), self.input.position) - _G_apply_597, lastError = self._apply(self.rule_num, "num", []) + def _G_or_625(): + self._trace("", (10838, 10841), self.input.position) + _G_apply_626, lastError = self._apply(self.rule_num, "num", []) self.considerError(lastError, None) - return (_G_apply_597, self.currentError) + return (_G_apply_626, self.currentError) - def _G_or_598(): - self._trace("", (10332, 10335), self.input.position) - _G_exactly_599, lastError = self.exactly("?") + def _G_or_627(): + self._trace("", (10842, 10845), self.input.position) + _G_exactly_628, lastError = self.exactly("?") self.considerError(lastError, None) - _G_python_600, lastError = (None), None + _G_python_629, lastError = (None), None self.considerError(lastError, None) - return (_G_python_600, self.currentError) + return (_G_python_629, self.currentError) - _G_or_601, lastError = self._or([_G_or_596, _G_or_598]) + _G_or_630, lastError = self._or([_G_or_625, _G_or_627]) self.considerError(lastError, "def_g_pos") - _locals["pos"] = _G_or_601 - _G_python_603, lastError = eval(self._G_expr_602, self.globals, _locals), None + _locals["pos"] = _G_or_630 + _G_python_632, lastError = ( + eval(self._G_expr_631, self.globals, _locals), + None, + ) self.considerError(lastError, "def_g_pos") - return (_G_python_603, self.currentError) + return (_G_python_632, self.currentError) def rule_def_m_pos(self): _locals = {"self": self} self.locals["def_m_pos"] = _locals - def _G_or_604(): - self._trace("", (10397, 10400), self.input.position) - _G_apply_605, lastError = self._apply(self.rule_num, "num", []) + def _G_or_633(): + self._trace("", (10907, 10910), self.input.position) + _G_apply_634, lastError = self._apply(self.rule_num, "num", []) self.considerError(lastError, None) - return (_G_apply_605, self.currentError) + return (_G_apply_634, self.currentError) - def _G_or_606(): - self._trace("", (10401, 10404), self.input.position) - _G_exactly_607, lastError = self.exactly("?") + def _G_or_635(): + self._trace("", (10911, 10914), self.input.position) + _G_exactly_636, lastError = self.exactly("?") self.considerError(lastError, None) - _G_python_608, lastError = (None), None + _G_python_637, lastError = (None), None self.considerError(lastError, None) - return (_G_python_608, self.currentError) + return (_G_python_637, self.currentError) - _G_or_609, lastError = self._or([_G_or_604, _G_or_606]) + _G_or_638, lastError = self._or([_G_or_633, _G_or_635]) self.considerError(lastError, "def_m_pos") - _locals["pos"] = _G_or_609 - _G_python_610, lastError = eval(self._G_expr_602, self.globals, _locals), None + _locals["pos"] = _G_or_638 + _G_python_639, lastError = ( + eval(self._G_expr_631, self.globals, _locals), + None, + ) self.considerError(lastError, "def_m_pos") - return (_G_python_610, self.currentError) + return (_G_python_639, self.currentError) def rule_def_n_pos(self): _locals = {"self": self} self.locals["def_n_pos"] = _locals - self._trace("", (10464, 10469), self.input.position) - _G_apply_611, lastError = self._apply(self.rule_base, "base", []) + self._trace("", (10974, 10979), self.input.position) + _G_apply_640, lastError = self._apply(self.rule_base, "base", []) self.considerError(lastError, "def_n_pos") - _locals["b"] = _G_apply_611 - self._trace("", (10471, 10478), self.input.position) - _G_apply_612, lastError = self._apply(self.rule_offset, "offset", []) + _locals["b"] = _G_apply_640 + self._trace("", (10981, 10988), self.input.position) + _G_apply_641, lastError = self._apply(self.rule_offset, "offset", []) self.considerError(lastError, "def_n_pos") - _locals["o"] = _G_apply_612 - _G_python_614, lastError = eval(self._G_expr_613, self.globals, _locals), None + _locals["o"] = _G_apply_641 + _G_python_643, lastError = ( + eval(self._G_expr_642, self.globals, _locals), + None, + ) self.considerError(lastError, "def_n_pos") - return (_G_python_614, self.currentError) + return (_G_python_643, self.currentError) def rule_def_p_pos(self): _locals = {"self": self} self.locals["def_p_pos"] = _locals - def _G_or_615(): - self._trace("", (10568, 10574), self.input.position) - _G_apply_616, lastError = self._apply(self.rule_term13, "term13", []) + def _G_or_644(): + self._trace("", (11078, 11084), self.input.position) + _G_apply_645, lastError = self._apply(self.rule_term13, "term13", []) self.considerError(lastError, None) - return (_G_apply_616, self.currentError) + return (_G_apply_645, self.currentError) - def _G_or_617(): - self._trace("", (10575, 10579), self.input.position) - _G_apply_618, lastError = self._apply(self.rule_aa13, "aa13", []) + def _G_or_646(): + self._trace("", (11085, 11089), self.input.position) + _G_apply_647, lastError = self._apply(self.rule_aa13, "aa13", []) self.considerError(lastError, None) - return (_G_apply_618, self.currentError) + return (_G_apply_647, self.currentError) - _G_or_619, lastError = self._or([_G_or_615, _G_or_617]) + _G_or_648, lastError = self._or([_G_or_644, _G_or_646]) self.considerError(lastError, "def_p_pos") - _locals["aa"] = _G_or_619 - self._trace("", (10583, 10587), self.input.position) - _G_apply_620, lastError = self._apply(self.rule_num, "num", []) + _locals["aa"] = _G_or_648 + self._trace("", (11093, 11097), self.input.position) + _G_apply_649, lastError = self._apply(self.rule_num, "num", []) self.considerError(lastError, "def_p_pos") - _locals["pos"] = _G_apply_620 - _G_python_622, lastError = eval(self._G_expr_621, self.globals, _locals), None + _locals["pos"] = _G_apply_649 + _G_python_651, lastError = ( + eval(self._G_expr_650, self.globals, _locals), + None, + ) self.considerError(lastError, "def_p_pos") - return (_G_python_622, self.currentError) + return (_G_python_651, self.currentError) def rule_def_r_pos(self): _locals = {"self": self} self.locals["def_r_pos"] = _locals - self._trace("", (10669, 10674), self.input.position) - _G_apply_623, lastError = self._apply(self.rule_base, "base", []) + self._trace("", (11179, 11184), self.input.position) + _G_apply_652, lastError = self._apply(self.rule_base, "base", []) self.considerError(lastError, "def_r_pos") - _locals["b"] = _G_apply_623 - self._trace("", (10676, 10683), self.input.position) - _G_apply_624, lastError = self._apply(self.rule_offset, "offset", []) + _locals["b"] = _G_apply_652 + self._trace("", (11186, 11193), self.input.position) + _G_apply_653, lastError = self._apply(self.rule_offset, "offset", []) self.considerError(lastError, "def_r_pos") - _locals["o"] = _G_apply_624 - _G_python_625, lastError = eval(self._G_expr_613, self.globals, _locals), None + _locals["o"] = _G_apply_653 + _G_python_654, lastError = ( + eval(self._G_expr_642, self.globals, _locals), + None, + ) self.considerError(lastError, "def_r_pos") - return (_G_python_625, self.currentError) + return (_G_python_654, self.currentError) def rule_fs(self): _locals = {"self": self} self.locals["fs"] = _locals - self._trace("", (11087, 11092), self.input.position) - _G_exactly_626, lastError = self.exactly("fs") + self._trace("", (11597, 11602), self.input.position) + _G_exactly_655, lastError = self.exactly("fs") self.considerError(lastError, "fs") - def _G_or_627(): - self._trace("", (11094, 11101), self.input.position) - _G_apply_628, lastError = self._apply(self.rule_aa13_fs, "aa13_fs", []) + def _G_or_656(): + self._trace("", (11604, 11611), self.input.position) + _G_apply_657, lastError = self._apply(self.rule_aa13_fs, "aa13_fs", []) self.considerError(lastError, None) - return (_G_apply_628, self.currentError) + return (_G_apply_657, self.currentError) - def _G_or_629(): - _G_python_630, lastError = (None), None + def _G_or_658(): + _G_python_659, lastError = (None), None self.considerError(lastError, None) - return (_G_python_630, self.currentError) + return (_G_python_659, self.currentError) - _G_or_631, lastError = self._or([_G_or_627, _G_or_629]) + _G_or_660, lastError = self._or([_G_or_656, _G_or_658]) self.considerError(lastError, "fs") - _locals["n"] = _G_or_631 - _G_python_633, lastError = eval(self._G_expr_632, self.globals, _locals), None + _locals["n"] = _G_or_660 + _G_python_662, lastError = ( + eval(self._G_expr_661, self.globals, _locals), + None, + ) self.considerError(lastError, "fs") - return (_G_python_633, self.currentError) + return (_G_python_662, self.currentError) def rule_ext(self): _locals = {"self": self} self.locals["ext"] = _locals - self._trace("", (11125, 11131), self.input.position) - _G_exactly_634, lastError = self.exactly("ext") + self._trace("", (11635, 11641), self.input.position) + _G_exactly_663, lastError = self.exactly("ext") self.considerError(lastError, "ext") - def _G_or_635(): - self._trace("", (11133, 11141), self.input.position) - _G_apply_636, lastError = self._apply(self.rule_aa13_ext, "aa13_ext", []) + def _G_or_664(): + self._trace("", (11643, 11651), self.input.position) + _G_apply_665, lastError = self._apply( + self.rule_aa13_ext, "aa13_ext", [] + ) self.considerError(lastError, None) - return (_G_apply_636, self.currentError) + return (_G_apply_665, self.currentError) - def _G_or_637(): - _G_python_638, lastError = ((None, None)), None + def _G_or_666(): + _G_python_667, lastError = ((None, None)), None self.considerError(lastError, None) - return (_G_python_638, self.currentError) + return (_G_python_667, self.currentError) - _G_or_639, lastError = self._or([_G_or_635, _G_or_637]) + _G_or_668, lastError = self._or([_G_or_664, _G_or_666]) self.considerError(lastError, "ext") - _locals["aat"] = _G_or_639[0] - _locals["n"] = _G_or_639[1] - _G_python_641, lastError = eval(self._G_expr_640, self.globals, _locals), None + _locals["aat"] = _G_or_668[0] + _locals["n"] = _G_or_668[1] + _G_python_670, lastError = ( + eval(self._G_expr_669, self.globals, _locals), + None, + ) self.considerError(lastError, "ext") - return (_G_python_641, self.currentError) + return (_G_python_670, self.currentError) def rule_aa13_fs(self): _locals = {"self": self} self.locals["aa13_fs"] = _locals - self._trace("", (11191, 11198), self.input.position) - _G_apply_642, lastError = self._apply(self.rule_term13, "term13", []) + self._trace("", (11701, 11708), self.input.position) + _G_apply_671, lastError = self._apply(self.rule_term13, "term13", []) self.considerError(lastError, "aa13_fs") - self._trace("", (11198, 11211), self.input.position) - _G_apply_643, lastError = self._apply(self.rule_fsext_offset, "fsext_offset", []) + self._trace("", (11708, 11721), self.input.position) + _G_apply_672, lastError = self._apply( + self.rule_fsext_offset, "fsext_offset", [] + ) self.considerError(lastError, "aa13_fs") - _locals["n"] = _G_apply_643 - _G_python_644, lastError = eval(self._G_expr_632, self.globals, _locals), None + _locals["n"] = _G_apply_672 + _G_python_673, lastError = ( + eval(self._G_expr_661, self.globals, _locals), + None, + ) self.considerError(lastError, "aa13_fs") - return (_G_python_644, self.currentError) + return (_G_python_673, self.currentError) def rule_aa13_ext(self): _locals = {"self": self} self.locals["aa13_ext"] = _locals - def _G_or_645(): - self._trace("", (11229, 11236), self.input.position) - _G_apply_646, lastError = self._apply(self.rule_term13, "term13", []) + def _G_or_674(): + self._trace("", (11739, 11746), self.input.position) + _G_apply_675, lastError = self._apply(self.rule_term13, "term13", []) self.considerError(lastError, None) - _locals["aat"] = _G_apply_646 - self._trace("", (11240, 11253), self.input.position) - _G_apply_647, lastError = self._apply(self.rule_fsext_offset, "fsext_offset", []) + _locals["aat"] = _G_apply_675 + self._trace("", (11750, 11763), self.input.position) + _G_apply_676, lastError = self._apply( + self.rule_fsext_offset, "fsext_offset", [] + ) self.considerError(lastError, None) - _locals["n"] = _G_apply_647 - _G_python_648, lastError = eval(self._G_expr_640, self.globals, _locals), None + _locals["n"] = _G_apply_676 + _G_python_677, lastError = ( + eval(self._G_expr_669, self.globals, _locals), + None, + ) self.considerError(lastError, None) - return (_G_python_648, self.currentError) + return (_G_python_677, self.currentError) - def _G_or_649(): - def _G_or_650(): - self._trace("", (11280, 11284), self.input.position) - _G_apply_651, lastError = self._apply(self.rule_aa13, "aa13", []) + def _G_or_678(): + def _G_or_679(): + self._trace("", (11790, 11794), self.input.position) + _G_apply_680, lastError = self._apply(self.rule_aa13, "aa13", []) self.considerError(lastError, None) - return (_G_apply_651, self.currentError) + return (_G_apply_680, self.currentError) - def _G_or_652(): - _G_python_653, lastError = (None), None + def _G_or_681(): + _G_python_682, lastError = (None), None self.considerError(lastError, None) - return (_G_python_653, self.currentError) + return (_G_python_682, self.currentError) - _G_or_654, lastError = self._or([_G_or_650, _G_or_652]) + _G_or_683, lastError = self._or([_G_or_679, _G_or_681]) self.considerError(lastError, None) - _locals["aat"] = _G_or_654 - self._trace("", (11301, 11306), self.input.position) - _G_apply_655, lastError = self._apply(self.rule_nnum, "nnum", []) + _locals["aat"] = _G_or_683 + self._trace("", (11811, 11816), self.input.position) + _G_apply_684, lastError = self._apply(self.rule_nnum, "nnum", []) self.considerError(lastError, None) - _locals["n"] = _G_apply_655 - _G_python_656, lastError = eval(self._G_expr_640, self.globals, _locals), None + _locals["n"] = _G_apply_684 + _G_python_685, lastError = ( + eval(self._G_expr_669, self.globals, _locals), + None, + ) self.considerError(lastError, None) - return (_G_python_656, self.currentError) + return (_G_python_685, self.currentError) - _G_or_657, lastError = self._or([_G_or_645, _G_or_649]) + _G_or_686, lastError = self._or([_G_or_674, _G_or_678]) self.considerError(lastError, "aa13_ext") - return (_G_or_657, self.currentError) + return (_G_or_686, self.currentError) def rule_fsext_offset(self): _locals = {"self": self} self.locals["fsext_offset"] = _locals - def _G_or_658(): - self._trace("", (11335, 11339), self.input.position) - _G_apply_659, lastError = self._apply(self.rule_num, "num", []) + def _G_or_687(): + self._trace("", (11845, 11849), self.input.position) + _G_apply_688, lastError = self._apply(self.rule_num, "num", []) self.considerError(lastError, None) - return (_G_apply_659, self.currentError) + return (_G_apply_688, self.currentError) - def _G_or_660(): - self._trace("", (11340, 11343), self.input.position) - _G_exactly_661, lastError = self.exactly("?") + def _G_or_689(): + self._trace("", (11850, 11853), self.input.position) + _G_exactly_690, lastError = self.exactly("?") self.considerError(lastError, None) - return (_G_exactly_661, self.currentError) + return (_G_exactly_690, self.currentError) - def _G_or_662(): - _G_python_663, lastError = (None), None + def _G_or_691(): + _G_python_692, lastError = (None), None self.considerError(lastError, None) - return (_G_python_663, self.currentError) + return (_G_python_692, self.currentError) - _G_or_664, lastError = self._or([_G_or_658, _G_or_660, _G_or_662]) + _G_or_693, lastError = self._or([_G_or_687, _G_or_689, _G_or_691]) self.considerError(lastError, "fsext_offset") - return (_G_or_664, self.currentError) + return (_G_or_693, self.currentError) def rule_dna_seq(self): _locals = {"self": self} self.locals["dna_seq"] = _locals - def _G_consumedby_665(): - def _G_many1_666(): - self._trace("", (11388, 11391), self.input.position) - _G_apply_667, lastError = self._apply(self.rule_dna, "dna", []) + def _G_consumedby_694(): + def _G_many1_695(): + self._trace("", (11898, 11901), self.input.position) + _G_apply_696, lastError = self._apply(self.rule_dna, "dna", []) self.considerError(lastError, None) - return (_G_apply_667, self.currentError) + return (_G_apply_696, self.currentError) - _G_many1_668, lastError = self.many(_G_many1_666, _G_many1_666()) + _G_many1_697, lastError = self.many(_G_many1_695, _G_many1_695()) self.considerError(lastError, None) - return (_G_many1_668, self.currentError) + return (_G_many1_697, self.currentError) - _G_consumedby_669, lastError = self.consumedby(_G_consumedby_665) + _G_consumedby_698, lastError = self.consumedby(_G_consumedby_694) self.considerError(lastError, "dna_seq") - return (_G_consumedby_669, self.currentError) + return (_G_consumedby_698, self.currentError) def rule_rna_seq(self): _locals = {"self": self} self.locals["rna_seq"] = _locals - def _G_consumedby_670(): - def _G_many1_671(): - self._trace("", (11405, 11408), self.input.position) - _G_apply_672, lastError = self._apply(self.rule_rna, "rna", []) + def _G_consumedby_699(): + def _G_many1_700(): + self._trace("", (11915, 11918), self.input.position) + _G_apply_701, lastError = self._apply(self.rule_rna, "rna", []) self.considerError(lastError, None) - return (_G_apply_672, self.currentError) + return (_G_apply_701, self.currentError) - _G_many1_673, lastError = self.many(_G_many1_671, _G_many1_671()) + _G_many1_702, lastError = self.many(_G_many1_700, _G_many1_700()) self.considerError(lastError, None) - return (_G_many1_673, self.currentError) + return (_G_many1_702, self.currentError) - _G_consumedby_674, lastError = self.consumedby(_G_consumedby_670) + _G_consumedby_703, lastError = self.consumedby(_G_consumedby_699) self.considerError(lastError, "rna_seq") - return (_G_consumedby_674, self.currentError) + return (_G_consumedby_703, self.currentError) def rule_aat13_seq(self): _locals = {"self": self} self.locals["aat13_seq"] = _locals - def _G_or_675(): - def _G_consumedby_676(): - self._trace("", (11424, 11432), self.input.position) - _G_apply_677, lastError = self._apply(self.rule_aat3_seq, "aat3_seq", []) + def _G_or_704(): + def _G_consumedby_705(): + self._trace("", (11934, 11942), self.input.position) + _G_apply_706, lastError = self._apply( + self.rule_aat3_seq, "aat3_seq", [] + ) self.considerError(lastError, None) - return (_G_apply_677, self.currentError) + return (_G_apply_706, self.currentError) - _G_consumedby_678, lastError = self.consumedby(_G_consumedby_676) + _G_consumedby_707, lastError = self.consumedby(_G_consumedby_705) self.considerError(lastError, None) - return (_G_consumedby_678, self.currentError) + return (_G_consumedby_707, self.currentError) - def _G_or_679(): - def _G_consumedby_680(): - self._trace("", (11437, 11445), self.input.position) - _G_apply_681, lastError = self._apply(self.rule_aat1_seq, "aat1_seq", []) + def _G_or_708(): + def _G_consumedby_709(): + self._trace("", (11947, 11955), self.input.position) + _G_apply_710, lastError = self._apply( + self.rule_aat1_seq, "aat1_seq", [] + ) self.considerError(lastError, None) - return (_G_apply_681, self.currentError) + return (_G_apply_710, self.currentError) - _G_consumedby_682, lastError = self.consumedby(_G_consumedby_680) + _G_consumedby_711, lastError = self.consumedby(_G_consumedby_709) self.considerError(lastError, None) - return (_G_consumedby_682, self.currentError) + return (_G_consumedby_711, self.currentError) - _G_or_683, lastError = self._or([_G_or_675, _G_or_679]) + _G_or_712, lastError = self._or([_G_or_704, _G_or_708]) self.considerError(lastError, "aat13_seq") - return (_G_or_683, self.currentError) + return (_G_or_712, self.currentError) def rule_aat1_seq(self): _locals = {"self": self} self.locals["aat1_seq"] = _locals - def _G_or_684(): - def _G_consumedby_685(): - self._trace("", (11459, 11464), self.input.position) - _G_apply_686, lastError = self._apply(self.rule_term1, "term1", []) + def _G_or_713(): + def _G_consumedby_714(): + self._trace("", (11969, 11974), self.input.position) + _G_apply_715, lastError = self._apply(self.rule_term1, "term1", []) self.considerError(lastError, None) - return (_G_apply_686, self.currentError) + return (_G_apply_715, self.currentError) - _G_consumedby_687, lastError = self.consumedby(_G_consumedby_685) + _G_consumedby_716, lastError = self.consumedby(_G_consumedby_714) self.considerError(lastError, None) - return (_G_consumedby_687, self.currentError) + return (_G_consumedby_716, self.currentError) - def _G_or_688(): - def _G_consumedby_689(): - def _G_many1_690(): - self._trace("", (11469, 11472), self.input.position) - _G_apply_691, lastError = self._apply(self.rule_aa1, "aa1", []) + def _G_or_717(): + def _G_consumedby_718(): + def _G_many1_719(): + self._trace("", (11979, 11982), self.input.position) + _G_apply_720, lastError = self._apply(self.rule_aa1, "aa1", []) self.considerError(lastError, None) - return (_G_apply_691, self.currentError) + return (_G_apply_720, self.currentError) - _G_many1_692, lastError = self.many(_G_many1_690, _G_many1_690()) + _G_many1_721, lastError = self.many(_G_many1_719, _G_many1_719()) self.considerError(lastError, None) - def _G_optional_693(): - self._trace("", (11473, 11479), self.input.position) - _G_apply_694, lastError = self._apply(self.rule_term1, "term1", []) + def _G_optional_722(): + self._trace("", (11983, 11989), self.input.position) + _G_apply_723, lastError = self._apply( + self.rule_term1, "term1", [] + ) self.considerError(lastError, None) - return (_G_apply_694, self.currentError) + return (_G_apply_723, self.currentError) - def _G_optional_695(): + def _G_optional_724(): return (None, self.input.nullError()) - _G_or_696, lastError = self._or([_G_optional_693, _G_optional_695]) + _G_or_725, lastError = self._or([_G_optional_722, _G_optional_724]) self.considerError(lastError, None) - return (_G_or_696, self.currentError) + return (_G_or_725, self.currentError) - _G_consumedby_697, lastError = self.consumedby(_G_consumedby_689) + _G_consumedby_726, lastError = self.consumedby(_G_consumedby_718) self.considerError(lastError, None) - return (_G_consumedby_697, self.currentError) + return (_G_consumedby_726, self.currentError) - _G_or_698, lastError = self._or([_G_or_684, _G_or_688]) + _G_or_727, lastError = self._or([_G_or_713, _G_or_717]) self.considerError(lastError, "aat1_seq") - return (_G_or_698, self.currentError) + return (_G_or_727, self.currentError) def rule_aat3_seq(self): _locals = {"self": self} self.locals["aat3_seq"] = _locals - def _G_or_699(): - def _G_consumedby_700(): - self._trace("", (11494, 11499), self.input.position) - _G_apply_701, lastError = self._apply(self.rule_term3, "term3", []) + def _G_or_728(): + def _G_consumedby_729(): + self._trace("", (12004, 12009), self.input.position) + _G_apply_730, lastError = self._apply(self.rule_term3, "term3", []) self.considerError(lastError, None) - return (_G_apply_701, self.currentError) + return (_G_apply_730, self.currentError) - _G_consumedby_702, lastError = self.consumedby(_G_consumedby_700) + _G_consumedby_731, lastError = self.consumedby(_G_consumedby_729) self.considerError(lastError, None) - return (_G_consumedby_702, self.currentError) + return (_G_consumedby_731, self.currentError) - def _G_or_703(): - def _G_consumedby_704(): - def _G_many1_705(): - self._trace("", (11504, 11507), self.input.position) - _G_apply_706, lastError = self._apply(self.rule_aa3, "aa3", []) + def _G_or_732(): + def _G_consumedby_733(): + def _G_many1_734(): + self._trace("", (12014, 12017), self.input.position) + _G_apply_735, lastError = self._apply(self.rule_aa3, "aa3", []) self.considerError(lastError, None) - return (_G_apply_706, self.currentError) + return (_G_apply_735, self.currentError) - _G_many1_707, lastError = self.many(_G_many1_705, _G_many1_705()) + _G_many1_736, lastError = self.many(_G_many1_734, _G_many1_734()) self.considerError(lastError, None) - def _G_optional_708(): - self._trace("", (11508, 11514), self.input.position) - _G_apply_709, lastError = self._apply(self.rule_term3, "term3", []) + def _G_optional_737(): + self._trace("", (12018, 12024), self.input.position) + _G_apply_738, lastError = self._apply( + self.rule_term3, "term3", [] + ) self.considerError(lastError, None) - return (_G_apply_709, self.currentError) + return (_G_apply_738, self.currentError) - def _G_optional_710(): + def _G_optional_739(): return (None, self.input.nullError()) - _G_or_711, lastError = self._or([_G_optional_708, _G_optional_710]) + _G_or_740, lastError = self._or([_G_optional_737, _G_optional_739]) self.considerError(lastError, None) - return (_G_or_711, self.currentError) + return (_G_or_740, self.currentError) - _G_consumedby_712, lastError = self.consumedby(_G_consumedby_704) + _G_consumedby_741, lastError = self.consumedby(_G_consumedby_733) self.considerError(lastError, None) - return (_G_consumedby_712, self.currentError) + return (_G_consumedby_741, self.currentError) - _G_or_713, lastError = self._or([_G_or_699, _G_or_703]) + _G_or_742, lastError = self._or([_G_or_728, _G_or_732]) self.considerError(lastError, "aat3_seq") - return (_G_or_713, self.currentError) + return (_G_or_742, self.currentError) def rule_aa13_seq(self): _locals = {"self": self} self.locals["aa13_seq"] = _locals - def _G_or_714(): - def _G_consumedby_715(): - self._trace("", (11529, 11536), self.input.position) - _G_apply_716, lastError = self._apply(self.rule_aa3_seq, "aa3_seq", []) + def _G_or_743(): + def _G_consumedby_744(): + self._trace("", (12039, 12046), self.input.position) + _G_apply_745, lastError = self._apply( + self.rule_aa3_seq, "aa3_seq", [] + ) self.considerError(lastError, None) - return (_G_apply_716, self.currentError) + return (_G_apply_745, self.currentError) - _G_consumedby_717, lastError = self.consumedby(_G_consumedby_715) + _G_consumedby_746, lastError = self.consumedby(_G_consumedby_744) self.considerError(lastError, None) - return (_G_consumedby_717, self.currentError) + return (_G_consumedby_746, self.currentError) - def _G_or_718(): - def _G_consumedby_719(): - self._trace("", (11541, 11548), self.input.position) - _G_apply_720, lastError = self._apply(self.rule_aa1_seq, "aa1_seq", []) + def _G_or_747(): + def _G_consumedby_748(): + self._trace("", (12051, 12058), self.input.position) + _G_apply_749, lastError = self._apply( + self.rule_aa1_seq, "aa1_seq", [] + ) self.considerError(lastError, None) - return (_G_apply_720, self.currentError) + return (_G_apply_749, self.currentError) - _G_consumedby_721, lastError = self.consumedby(_G_consumedby_719) + _G_consumedby_750, lastError = self.consumedby(_G_consumedby_748) self.considerError(lastError, None) - return (_G_consumedby_721, self.currentError) + return (_G_consumedby_750, self.currentError) - _G_or_722, lastError = self._or([_G_or_714, _G_or_718]) + _G_or_751, lastError = self._or([_G_or_743, _G_or_747]) self.considerError(lastError, "aa13_seq") - return (_G_or_722, self.currentError) + return (_G_or_751, self.currentError) def rule_aa1_seq(self): _locals = {"self": self} self.locals["aa1_seq"] = _locals - def _G_consumedby_723(): - def _G_many1_724(): - self._trace("", (11561, 11564), self.input.position) - _G_apply_725, lastError = self._apply(self.rule_aa1, "aa1", []) + def _G_consumedby_752(): + def _G_many1_753(): + self._trace("", (12071, 12074), self.input.position) + _G_apply_754, lastError = self._apply(self.rule_aa1, "aa1", []) self.considerError(lastError, None) - return (_G_apply_725, self.currentError) + return (_G_apply_754, self.currentError) - _G_many1_726, lastError = self.many(_G_many1_724, _G_many1_724()) + _G_many1_755, lastError = self.many(_G_many1_753, _G_many1_753()) self.considerError(lastError, None) - return (_G_many1_726, self.currentError) + return (_G_many1_755, self.currentError) - _G_consumedby_727, lastError = self.consumedby(_G_consumedby_723) + _G_consumedby_756, lastError = self.consumedby(_G_consumedby_752) self.considerError(lastError, "aa1_seq") - return (_G_consumedby_727, self.currentError) + return (_G_consumedby_756, self.currentError) def rule_aa3_seq(self): _locals = {"self": self} self.locals["aa3_seq"] = _locals - def _G_consumedby_728(): - def _G_many1_729(): - self._trace("", (11578, 11581), self.input.position) - _G_apply_730, lastError = self._apply(self.rule_aa3, "aa3", []) + def _G_consumedby_757(): + def _G_many1_758(): + self._trace("", (12088, 12091), self.input.position) + _G_apply_759, lastError = self._apply(self.rule_aa3, "aa3", []) self.considerError(lastError, None) - return (_G_apply_730, self.currentError) + return (_G_apply_759, self.currentError) - _G_many1_731, lastError = self.many(_G_many1_729, _G_many1_729()) + _G_many1_760, lastError = self.many(_G_many1_758, _G_many1_758()) self.considerError(lastError, None) - return (_G_many1_731, self.currentError) + return (_G_many1_760, self.currentError) - _G_consumedby_732, lastError = self.consumedby(_G_consumedby_728) + _G_consumedby_761, lastError = self.consumedby(_G_consumedby_757) self.considerError(lastError, "aa3_seq") - return (_G_consumedby_732, self.currentError) + return (_G_consumedby_761, self.currentError) def rule_aa1(self): _locals = {"self": self} self.locals["aa1"] = _locals - _G_apply_733, lastError = self._apply(self.rule_anything, "anything", []) + _G_apply_762, lastError = self._apply(self.rule_anything, "anything", []) self.considerError(lastError, "aa1") - _locals["x"] = _G_apply_733 + _locals["x"] = _G_apply_762 - def _G_pred_734(): - _G_python_736, lastError = eval(self._G_expr_735, self.globals, _locals), None + def _G_pred_763(): + _G_python_765, lastError = ( + eval(self._G_expr_764, self.globals, _locals), + None, + ) self.considerError(lastError, None) - return (_G_python_736, self.currentError) + return (_G_python_765, self.currentError) - _G_pred_737, lastError = self.pred(_G_pred_734) + _G_pred_766, lastError = self.pred(_G_pred_763) self.considerError(lastError, "aa1") - _G_python_739, lastError = eval(self._G_expr_738, self.globals, _locals), None + _G_python_768, lastError = ( + eval(self._G_expr_767, self.globals, _locals), + None, + ) self.considerError(lastError, "aa1") - return (_G_python_739, self.currentError) + return (_G_python_768, self.currentError) def rule_aa13(self): _locals = {"self": self} self.locals["aa13"] = _locals - def _G_or_740(): - self._trace("", (11662, 11666), self.input.position) - _G_apply_741, lastError = self._apply(self.rule_aa3, "aa3", []) + def _G_or_769(): + self._trace("", (12172, 12176), self.input.position) + _G_apply_770, lastError = self._apply(self.rule_aa3, "aa3", []) self.considerError(lastError, None) - return (_G_apply_741, self.currentError) + return (_G_apply_770, self.currentError) - def _G_or_742(): - self._trace("", (11668, 11672), self.input.position) - _G_apply_743, lastError = self._apply(self.rule_aa1, "aa1", []) + def _G_or_771(): + self._trace("", (12178, 12182), self.input.position) + _G_apply_772, lastError = self._apply(self.rule_aa1, "aa1", []) self.considerError(lastError, None) - return (_G_apply_743, self.currentError) + return (_G_apply_772, self.currentError) - _G_or_744, lastError = self._or([_G_or_740, _G_or_742]) + _G_or_773, lastError = self._or([_G_or_769, _G_or_771]) self.considerError(lastError, "aa13") - return (_G_or_744, self.currentError) + return (_G_or_773, self.currentError) def rule_aa3(self): _locals = {"self": self} self.locals["aa3"] = _locals - def _G_or_745(): - self._trace("", (11678, 11684), self.input.position) - _G_exactly_746, lastError = self.exactly("Ala") + def _G_or_774(): + self._trace("", (12188, 12194), self.input.position) + _G_exactly_775, lastError = self.exactly("Ala") self.considerError(lastError, None) - return (_G_exactly_746, self.currentError) + return (_G_exactly_775, self.currentError) - def _G_or_747(): - self._trace("", (11685, 11690), self.input.position) - _G_exactly_748, lastError = self.exactly("Cys") + def _G_or_776(): + self._trace("", (12195, 12200), self.input.position) + _G_exactly_777, lastError = self.exactly("Cys") self.considerError(lastError, None) - return (_G_exactly_748, self.currentError) + return (_G_exactly_777, self.currentError) - def _G_or_749(): - self._trace("", (11691, 11696), self.input.position) - _G_exactly_750, lastError = self.exactly("Asp") + def _G_or_778(): + self._trace("", (12201, 12206), self.input.position) + _G_exactly_779, lastError = self.exactly("Asp") self.considerError(lastError, None) - return (_G_exactly_750, self.currentError) + return (_G_exactly_779, self.currentError) - def _G_or_751(): - self._trace("", (11697, 11702), self.input.position) - _G_exactly_752, lastError = self.exactly("Glu") + def _G_or_780(): + self._trace("", (12207, 12212), self.input.position) + _G_exactly_781, lastError = self.exactly("Glu") self.considerError(lastError, None) - return (_G_exactly_752, self.currentError) + return (_G_exactly_781, self.currentError) - def _G_or_753(): - self._trace("", (11703, 11708), self.input.position) - _G_exactly_754, lastError = self.exactly("Phe") + def _G_or_782(): + self._trace("", (12213, 12218), self.input.position) + _G_exactly_783, lastError = self.exactly("Phe") self.considerError(lastError, None) - return (_G_exactly_754, self.currentError) + return (_G_exactly_783, self.currentError) - def _G_or_755(): - self._trace("", (11709, 11714), self.input.position) - _G_exactly_756, lastError = self.exactly("Gly") + def _G_or_784(): + self._trace("", (12219, 12224), self.input.position) + _G_exactly_785, lastError = self.exactly("Gly") self.considerError(lastError, None) - return (_G_exactly_756, self.currentError) + return (_G_exactly_785, self.currentError) - def _G_or_757(): - self._trace("", (11715, 11720), self.input.position) - _G_exactly_758, lastError = self.exactly("His") + def _G_or_786(): + self._trace("", (12225, 12230), self.input.position) + _G_exactly_787, lastError = self.exactly("His") self.considerError(lastError, None) - return (_G_exactly_758, self.currentError) + return (_G_exactly_787, self.currentError) - def _G_or_759(): - self._trace("", (11721, 11726), self.input.position) - _G_exactly_760, lastError = self.exactly("Ile") + def _G_or_788(): + self._trace("", (12231, 12236), self.input.position) + _G_exactly_789, lastError = self.exactly("Ile") self.considerError(lastError, None) - return (_G_exactly_760, self.currentError) + return (_G_exactly_789, self.currentError) - def _G_or_761(): - self._trace("", (11727, 11732), self.input.position) - _G_exactly_762, lastError = self.exactly("Lys") + def _G_or_790(): + self._trace("", (12237, 12242), self.input.position) + _G_exactly_791, lastError = self.exactly("Lys") self.considerError(lastError, None) - return (_G_exactly_762, self.currentError) + return (_G_exactly_791, self.currentError) - def _G_or_763(): - self._trace("", (11733, 11738), self.input.position) - _G_exactly_764, lastError = self.exactly("Leu") + def _G_or_792(): + self._trace("", (12243, 12248), self.input.position) + _G_exactly_793, lastError = self.exactly("Leu") self.considerError(lastError, None) - return (_G_exactly_764, self.currentError) + return (_G_exactly_793, self.currentError) - def _G_or_765(): - self._trace("", (11739, 11744), self.input.position) - _G_exactly_766, lastError = self.exactly("Met") + def _G_or_794(): + self._trace("", (12249, 12254), self.input.position) + _G_exactly_795, lastError = self.exactly("Met") self.considerError(lastError, None) - return (_G_exactly_766, self.currentError) + return (_G_exactly_795, self.currentError) - def _G_or_767(): - self._trace("", (11745, 11750), self.input.position) - _G_exactly_768, lastError = self.exactly("Asn") + def _G_or_796(): + self._trace("", (12255, 12260), self.input.position) + _G_exactly_797, lastError = self.exactly("Asn") self.considerError(lastError, None) - return (_G_exactly_768, self.currentError) + return (_G_exactly_797, self.currentError) - def _G_or_769(): - self._trace("", (11751, 11756), self.input.position) - _G_exactly_770, lastError = self.exactly("Pro") + def _G_or_798(): + self._trace("", (12261, 12266), self.input.position) + _G_exactly_799, lastError = self.exactly("Pro") self.considerError(lastError, None) - return (_G_exactly_770, self.currentError) + return (_G_exactly_799, self.currentError) - def _G_or_771(): - self._trace("", (11757, 11762), self.input.position) - _G_exactly_772, lastError = self.exactly("Gln") + def _G_or_800(): + self._trace("", (12267, 12272), self.input.position) + _G_exactly_801, lastError = self.exactly("Gln") self.considerError(lastError, None) - return (_G_exactly_772, self.currentError) + return (_G_exactly_801, self.currentError) - def _G_or_773(): - self._trace("", (11763, 11768), self.input.position) - _G_exactly_774, lastError = self.exactly("Arg") + def _G_or_802(): + self._trace("", (12273, 12278), self.input.position) + _G_exactly_803, lastError = self.exactly("Arg") self.considerError(lastError, None) - return (_G_exactly_774, self.currentError) + return (_G_exactly_803, self.currentError) - def _G_or_775(): - self._trace("", (11769, 11774), self.input.position) - _G_exactly_776, lastError = self.exactly("Ser") + def _G_or_804(): + self._trace("", (12279, 12284), self.input.position) + _G_exactly_805, lastError = self.exactly("Ser") self.considerError(lastError, None) - return (_G_exactly_776, self.currentError) + return (_G_exactly_805, self.currentError) - def _G_or_777(): - self._trace("", (11775, 11780), self.input.position) - _G_exactly_778, lastError = self.exactly("Thr") + def _G_or_806(): + self._trace("", (12285, 12290), self.input.position) + _G_exactly_807, lastError = self.exactly("Thr") self.considerError(lastError, None) - return (_G_exactly_778, self.currentError) + return (_G_exactly_807, self.currentError) - def _G_or_779(): - self._trace("", (11781, 11786), self.input.position) - _G_exactly_780, lastError = self.exactly("Val") + def _G_or_808(): + self._trace("", (12291, 12296), self.input.position) + _G_exactly_809, lastError = self.exactly("Val") self.considerError(lastError, None) - return (_G_exactly_780, self.currentError) + return (_G_exactly_809, self.currentError) - def _G_or_781(): - self._trace("", (11787, 11792), self.input.position) - _G_exactly_782, lastError = self.exactly("Trp") + def _G_or_810(): + self._trace("", (12297, 12302), self.input.position) + _G_exactly_811, lastError = self.exactly("Trp") self.considerError(lastError, None) - return (_G_exactly_782, self.currentError) + return (_G_exactly_811, self.currentError) - def _G_or_783(): - self._trace("", (11793, 11798), self.input.position) - _G_exactly_784, lastError = self.exactly("Tyr") + def _G_or_812(): + self._trace("", (12303, 12308), self.input.position) + _G_exactly_813, lastError = self.exactly("Tyr") self.considerError(lastError, None) - return (_G_exactly_784, self.currentError) + return (_G_exactly_813, self.currentError) - def _G_or_785(): - self._trace("", (11800, 11806), self.input.position) - _G_exactly_786, lastError = self.exactly("Asx") + def _G_or_814(): + self._trace("", (12310, 12316), self.input.position) + _G_exactly_815, lastError = self.exactly("Asx") self.considerError(lastError, None) - return (_G_exactly_786, self.currentError) + return (_G_exactly_815, self.currentError) - def _G_or_787(): - self._trace("", (11808, 11814), self.input.position) - _G_exactly_788, lastError = self.exactly("Glx") + def _G_or_816(): + self._trace("", (12318, 12324), self.input.position) + _G_exactly_817, lastError = self.exactly("Glx") self.considerError(lastError, None) - return (_G_exactly_788, self.currentError) + return (_G_exactly_817, self.currentError) - def _G_or_789(): - self._trace("", (11816, 11822), self.input.position) - _G_exactly_790, lastError = self.exactly("Xaa") + def _G_or_818(): + self._trace("", (12326, 12332), self.input.position) + _G_exactly_819, lastError = self.exactly("Xaa") self.considerError(lastError, None) - return (_G_exactly_790, self.currentError) + return (_G_exactly_819, self.currentError) - def _G_or_791(): - self._trace("", (11824, 11830), self.input.position) - _G_exactly_792, lastError = self.exactly("Sec") + def _G_or_820(): + self._trace("", (12334, 12340), self.input.position) + _G_exactly_821, lastError = self.exactly("Sec") self.considerError(lastError, None) - return (_G_exactly_792, self.currentError) + return (_G_exactly_821, self.currentError) - _G_or_793, lastError = self._or( + _G_or_822, lastError = self._or( [ - _G_or_745, - _G_or_747, - _G_or_749, - _G_or_751, - _G_or_753, - _G_or_755, - _G_or_757, - _G_or_759, - _G_or_761, - _G_or_763, - _G_or_765, - _G_or_767, - _G_or_769, - _G_or_771, - _G_or_773, - _G_or_775, - _G_or_777, - _G_or_779, - _G_or_781, - _G_or_783, - _G_or_785, - _G_or_787, - _G_or_789, - _G_or_791, + _G_or_774, + _G_or_776, + _G_or_778, + _G_or_780, + _G_or_782, + _G_or_784, + _G_or_786, + _G_or_788, + _G_or_790, + _G_or_792, + _G_or_794, + _G_or_796, + _G_or_798, + _G_or_800, + _G_or_802, + _G_or_804, + _G_or_806, + _G_or_808, + _G_or_810, + _G_or_812, + _G_or_814, + _G_or_816, + _G_or_818, + _G_or_820, ] ) self.considerError(lastError, "aa3") - return (_G_or_793, self.currentError) + return (_G_or_822, self.currentError) def rule_aat1(self): _locals = {"self": self} self.locals["aat1"] = _locals - def _G_or_794(): - self._trace("", (11837, 11843), self.input.position) - _G_apply_795, lastError = self._apply(self.rule_term1, "term1", []) + def _G_or_823(): + self._trace("", (12347, 12353), self.input.position) + _G_apply_824, lastError = self._apply(self.rule_term1, "term1", []) self.considerError(lastError, None) - return (_G_apply_795, self.currentError) + return (_G_apply_824, self.currentError) - def _G_or_796(): - self._trace("", (11845, 11849), self.input.position) - _G_apply_797, lastError = self._apply(self.rule_aa1, "aa1", []) + def _G_or_825(): + self._trace("", (12355, 12359), self.input.position) + _G_apply_826, lastError = self._apply(self.rule_aa1, "aa1", []) self.considerError(lastError, None) - return (_G_apply_797, self.currentError) + return (_G_apply_826, self.currentError) - _G_or_798, lastError = self._or([_G_or_794, _G_or_796]) + _G_or_827, lastError = self._or([_G_or_823, _G_or_825]) self.considerError(lastError, "aat1") - return (_G_or_798, self.currentError) + return (_G_or_827, self.currentError) def rule_aat13(self): _locals = {"self": self} self.locals["aat13"] = _locals - def _G_or_799(): - self._trace("", (11857, 11862), self.input.position) - _G_apply_800, lastError = self._apply(self.rule_aat3, "aat3", []) + def _G_or_828(): + self._trace("", (12367, 12372), self.input.position) + _G_apply_829, lastError = self._apply(self.rule_aat3, "aat3", []) self.considerError(lastError, None) - return (_G_apply_800, self.currentError) + return (_G_apply_829, self.currentError) - def _G_or_801(): - self._trace("", (11864, 11869), self.input.position) - _G_apply_802, lastError = self._apply(self.rule_aat1, "aat1", []) + def _G_or_830(): + self._trace("", (12374, 12379), self.input.position) + _G_apply_831, lastError = self._apply(self.rule_aat1, "aat1", []) self.considerError(lastError, None) - return (_G_apply_802, self.currentError) + return (_G_apply_831, self.currentError) - _G_or_803, lastError = self._or([_G_or_799, _G_or_801]) + _G_or_832, lastError = self._or([_G_or_828, _G_or_830]) self.considerError(lastError, "aat13") - return (_G_or_803, self.currentError) + return (_G_or_832, self.currentError) def rule_aat3(self): _locals = {"self": self} self.locals["aat3"] = _locals - def _G_or_804(): - self._trace("", (11876, 11882), self.input.position) - _G_apply_805, lastError = self._apply(self.rule_term3, "term3", []) + def _G_or_833(): + self._trace("", (12386, 12392), self.input.position) + _G_apply_834, lastError = self._apply(self.rule_term3, "term3", []) self.considerError(lastError, None) - return (_G_apply_805, self.currentError) + return (_G_apply_834, self.currentError) - def _G_or_806(): - self._trace("", (11884, 11888), self.input.position) - _G_apply_807, lastError = self._apply(self.rule_aa3, "aa3", []) + def _G_or_835(): + self._trace("", (12394, 12398), self.input.position) + _G_apply_836, lastError = self._apply(self.rule_aa3, "aa3", []) self.considerError(lastError, None) - return (_G_apply_807, self.currentError) + return (_G_apply_836, self.currentError) - _G_or_808, lastError = self._or([_G_or_804, _G_or_806]) + _G_or_837, lastError = self._or([_G_or_833, _G_or_835]) self.considerError(lastError, "aat3") - return (_G_or_808, self.currentError) + return (_G_or_837, self.currentError) def rule_dna(self): _locals = {"self": self} self.locals["dna"] = _locals - self._trace("", (11894, 11904), self.input.position) - _G_apply_809, lastError = self._apply(self.rule_dna_iupac, "dna_iupac", []) + self._trace("", (12404, 12414), self.input.position) + _G_apply_838, lastError = self._apply(self.rule_dna_iupac, "dna_iupac", []) self.considerError(lastError, "dna") - return (_G_apply_809, self.currentError) + return (_G_apply_838, self.currentError) def rule_dna_iupac(self): _locals = {"self": self} self.locals["dna_iupac"] = _locals - _G_apply_810, lastError = self._apply(self.rule_anything, "anything", []) + _G_apply_839, lastError = self._apply(self.rule_anything, "anything", []) self.considerError(lastError, "dna_iupac") - _locals["x"] = _G_apply_810 + _locals["x"] = _G_apply_839 - def _G_pred_811(): - _G_python_813, lastError = eval(self._G_expr_812, self.globals, _locals), None + def _G_pred_840(): + _G_python_842, lastError = ( + eval(self._G_expr_841, self.globals, _locals), + None, + ) self.considerError(lastError, None) - return (_G_python_813, self.currentError) + return (_G_python_842, self.currentError) - _G_pred_814, lastError = self.pred(_G_pred_811) + _G_pred_843, lastError = self.pred(_G_pred_840) self.considerError(lastError, "dna_iupac") - _G_python_815, lastError = eval(self._G_expr_738, self.globals, _locals), None + _G_python_844, lastError = ( + eval(self._G_expr_767, self.globals, _locals), + None, + ) self.considerError(lastError, "dna_iupac") - return (_G_python_815, self.currentError) + return (_G_python_844, self.currentError) def rule_na_iupac(self): _locals = {"self": self} self.locals["na_iupac"] = _locals - _G_apply_816, lastError = self._apply(self.rule_anything, "anything", []) + _G_apply_845, lastError = self._apply(self.rule_anything, "anything", []) self.considerError(lastError, "na_iupac") - _locals["x"] = _G_apply_816 + _locals["x"] = _G_apply_845 - def _G_pred_817(): - _G_python_819, lastError = eval(self._G_expr_818, self.globals, _locals), None + def _G_pred_846(): + _G_python_848, lastError = ( + eval(self._G_expr_847, self.globals, _locals), + None, + ) self.considerError(lastError, None) - return (_G_python_819, self.currentError) + return (_G_python_848, self.currentError) - _G_pred_820, lastError = self.pred(_G_pred_817) + _G_pred_849, lastError = self.pred(_G_pred_846) self.considerError(lastError, "na_iupac") - _G_python_821, lastError = eval(self._G_expr_738, self.globals, _locals), None + _G_python_850, lastError = ( + eval(self._G_expr_767, self.globals, _locals), + None, + ) self.considerError(lastError, "na_iupac") - return (_G_python_821, self.currentError) + return (_G_python_850, self.currentError) def rule_rna(self): _locals = {"self": self} self.locals["rna"] = _locals - self._trace("", (12033, 12043), self.input.position) - _G_apply_822, lastError = self._apply(self.rule_rna_iupac, "rna_iupac", []) + self._trace("", (12543, 12553), self.input.position) + _G_apply_851, lastError = self._apply(self.rule_rna_iupac, "rna_iupac", []) self.considerError(lastError, "rna") - return (_G_apply_822, self.currentError) + return (_G_apply_851, self.currentError) def rule_rna_iupac(self): _locals = {"self": self} self.locals["rna_iupac"] = _locals - _G_apply_823, lastError = self._apply(self.rule_anything, "anything", []) + _G_apply_852, lastError = self._apply(self.rule_anything, "anything", []) self.considerError(lastError, "rna_iupac") - _locals["x"] = _G_apply_823 + _locals["x"] = _G_apply_852 - def _G_pred_824(): - _G_python_826, lastError = eval(self._G_expr_825, self.globals, _locals), None + def _G_pred_853(): + _G_python_855, lastError = ( + eval(self._G_expr_854, self.globals, _locals), + None, + ) self.considerError(lastError, None) - return (_G_python_826, self.currentError) + return (_G_python_855, self.currentError) - _G_pred_827, lastError = self.pred(_G_pred_824) + _G_pred_856, lastError = self.pred(_G_pred_853) self.considerError(lastError, "rna_iupac") - _G_python_828, lastError = eval(self._G_expr_738, self.globals, _locals), None + _G_python_857, lastError = ( + eval(self._G_expr_767, self.globals, _locals), + None, + ) self.considerError(lastError, "rna_iupac") - return (_G_python_828, self.currentError) + return (_G_python_857, self.currentError) def rule_term1(self): _locals = {"self": self} self.locals["term1"] = _locals - _G_apply_829, lastError = self._apply(self.rule_anything, "anything", []) + _G_apply_858, lastError = self._apply(self.rule_anything, "anything", []) self.considerError(lastError, "term1") - _locals["x"] = _G_apply_829 + _locals["x"] = _G_apply_858 - def _G_pred_830(): - _G_python_832, lastError = eval(self._G_expr_831, self.globals, _locals), None + def _G_pred_859(): + _G_python_861, lastError = ( + eval(self._G_expr_860, self.globals, _locals), + None, + ) self.considerError(lastError, None) - return (_G_python_832, self.currentError) + return (_G_python_861, self.currentError) - _G_pred_833, lastError = self.pred(_G_pred_830) + _G_pred_862, lastError = self.pred(_G_pred_859) self.considerError(lastError, "term1") - _G_python_834, lastError = eval(self._G_expr_738, self.globals, _locals), None + _G_python_863, lastError = ( + eval(self._G_expr_767, self.globals, _locals), + None, + ) self.considerError(lastError, "term1") - return (_G_python_834, self.currentError) + return (_G_python_863, self.currentError) def rule_term13(self): _locals = {"self": self} self.locals["term13"] = _locals - def _G_or_835(): - self._trace("", (12142, 12148), self.input.position) - _G_apply_836, lastError = self._apply(self.rule_term3, "term3", []) + def _G_or_864(): + self._trace("", (12652, 12658), self.input.position) + _G_apply_865, lastError = self._apply(self.rule_term3, "term3", []) self.considerError(lastError, None) - return (_G_apply_836, self.currentError) + return (_G_apply_865, self.currentError) - def _G_or_837(): - self._trace("", (12150, 12156), self.input.position) - _G_apply_838, lastError = self._apply(self.rule_term1, "term1", []) + def _G_or_866(): + self._trace("", (12660, 12666), self.input.position) + _G_apply_867, lastError = self._apply(self.rule_term1, "term1", []) self.considerError(lastError, None) - return (_G_apply_838, self.currentError) + return (_G_apply_867, self.currentError) - _G_or_839, lastError = self._or([_G_or_835, _G_or_837]) + _G_or_868, lastError = self._or([_G_or_864, _G_or_866]) self.considerError(lastError, "term13") - return (_G_or_839, self.currentError) + return (_G_or_868, self.currentError) def rule_term3(self): _locals = {"self": self} self.locals["term3"] = _locals - self._trace("", (12164, 12170), self.input.position) - _G_exactly_840, lastError = self.exactly("Ter") + self._trace("", (12674, 12680), self.input.position) + _G_exactly_869, lastError = self.exactly("Ter") self.considerError(lastError, "term3") - return (_G_exactly_840, self.currentError) + return (_G_exactly_869, self.currentError) def rule_base(self): _locals = {"self": self} self.locals["base"] = _locals - self._trace("", (12254, 12259), self.input.position) - _G_apply_841, lastError = self._apply(self.rule_snum, "snum", []) + self._trace("", (12764, 12769), self.input.position) + _G_apply_870, lastError = self._apply(self.rule_snum, "snum", []) self.considerError(lastError, "base") - return (_G_apply_841, self.currentError) + return (_G_apply_870, self.currentError) def rule_nnum(self): _locals = {"self": self} self.locals["nnum"] = _locals - def _G_consumedby_842(): - self._trace("", (12268, 12271), self.input.position) - _G_exactly_843, lastError = self.exactly("-") + def _G_consumedby_871(): + self._trace("", (12778, 12781), self.input.position) + _G_exactly_872, lastError = self.exactly("-") self.considerError(lastError, None) - self._trace("", (12271, 12275), self.input.position) - _G_apply_844, lastError = self._apply(self.rule_num, "num", []) + self._trace("", (12781, 12785), self.input.position) + _G_apply_873, lastError = self._apply(self.rule_num, "num", []) self.considerError(lastError, None) - return (_G_apply_844, self.currentError) + return (_G_apply_873, self.currentError) - _G_consumedby_845, lastError = self.consumedby(_G_consumedby_842) + _G_consumedby_874, lastError = self.consumedby(_G_consumedby_871) self.considerError(lastError, "nnum") - _locals["x"] = _G_consumedby_845 - _G_python_847, lastError = eval(self._G_expr_846, self.globals, _locals), None + _locals["x"] = _G_consumedby_874 + _G_python_876, lastError = ( + eval(self._G_expr_875, self.globals, _locals), + None, + ) self.considerError(lastError, "nnum") - return (_G_python_847, self.currentError) + return (_G_python_876, self.currentError) def rule_num(self): _locals = {"self": self} self.locals["num"] = _locals - def _G_consumedby_848(): - def _G_many1_849(): - self._trace("", (12296, 12301), self.input.position) - _G_apply_850, lastError = self._apply(self.rule_digit, "digit", []) + def _G_consumedby_877(): + def _G_many1_878(): + self._trace("", (12806, 12811), self.input.position) + _G_apply_879, lastError = self._apply(self.rule_digit, "digit", []) self.considerError(lastError, None) - return (_G_apply_850, self.currentError) + return (_G_apply_879, self.currentError) - _G_many1_851, lastError = self.many(_G_many1_849, _G_many1_849()) + _G_many1_880, lastError = self.many(_G_many1_878, _G_many1_878()) self.considerError(lastError, None) - return (_G_many1_851, self.currentError) + return (_G_many1_880, self.currentError) - _G_consumedby_852, lastError = self.consumedby(_G_consumedby_848) + _G_consumedby_881, lastError = self.consumedby(_G_consumedby_877) self.considerError(lastError, "num") - _locals["x"] = _G_consumedby_852 - _G_python_853, lastError = eval(self._G_expr_846, self.globals, _locals), None + _locals["x"] = _G_consumedby_881 + _G_python_882, lastError = ( + eval(self._G_expr_875, self.globals, _locals), + None, + ) self.considerError(lastError, "num") - return (_G_python_853, self.currentError) + return (_G_python_882, self.currentError) def rule_offset(self): _locals = {"self": self} self.locals["offset"] = _locals - def _G_or_854(): - self._trace("", (12324, 12329), self.input.position) - _G_apply_855, lastError = self._apply(self.rule_snum, "snum", []) + def _G_or_883(): + self._trace("", (12834, 12839), self.input.position) + _G_apply_884, lastError = self._apply(self.rule_snum, "snum", []) self.considerError(lastError, None) - return (_G_apply_855, self.currentError) + return (_G_apply_884, self.currentError) - def _G_or_856(): - _G_python_857, lastError = (0), None + def _G_or_885(): + _G_python_886, lastError = (0), None self.considerError(lastError, None) - return (_G_python_857, self.currentError) + return (_G_python_886, self.currentError) - _G_or_858, lastError = self._or([_G_or_854, _G_or_856]) + _G_or_887, lastError = self._or([_G_or_883, _G_or_885]) self.considerError(lastError, "offset") - return (_G_or_858, self.currentError) + return (_G_or_887, self.currentError) def rule_pm(self): _locals = {"self": self} self.locals["pm"] = _locals - _G_apply_859, lastError = self._apply(self.rule_anything, "anything", []) + _G_apply_888, lastError = self._apply(self.rule_anything, "anything", []) self.considerError(lastError, "pm") - _locals["x"] = _G_apply_859 + _locals["x"] = _G_apply_888 - def _G_pred_860(): - _G_python_862, lastError = eval(self._G_expr_861, self.globals, _locals), None + def _G_pred_889(): + _G_python_891, lastError = ( + eval(self._G_expr_890, self.globals, _locals), + None, + ) self.considerError(lastError, None) - return (_G_python_862, self.currentError) + return (_G_python_891, self.currentError) - _G_pred_863, lastError = self.pred(_G_pred_860) + _G_pred_892, lastError = self.pred(_G_pred_889) self.considerError(lastError, "pm") - _G_python_864, lastError = eval(self._G_expr_738, self.globals, _locals), None + _G_python_893, lastError = ( + eval(self._G_expr_767, self.globals, _locals), + None, + ) self.considerError(lastError, "pm") - return (_G_python_864, self.currentError) + return (_G_python_893, self.currentError) def rule_snum(self): _locals = {"self": self} self.locals["snum"] = _locals - def _G_consumedby_865(): - def _G_optional_866(): - self._trace("", (12373, 12375), self.input.position) - _G_apply_867, lastError = self._apply(self.rule_pm, "pm", []) + def _G_consumedby_894(): + def _G_optional_895(): + self._trace("", (12883, 12885), self.input.position) + _G_apply_896, lastError = self._apply(self.rule_pm, "pm", []) self.considerError(lastError, None) - return (_G_apply_867, self.currentError) + return (_G_apply_896, self.currentError) - def _G_optional_868(): + def _G_optional_897(): return (None, self.input.nullError()) - _G_or_869, lastError = self._or([_G_optional_866, _G_optional_868]) + _G_or_898, lastError = self._or([_G_optional_895, _G_optional_897]) self.considerError(lastError, None) - self._trace("", (12376, 12380), self.input.position) - _G_apply_870, lastError = self._apply(self.rule_num, "num", []) + self._trace("", (12886, 12890), self.input.position) + _G_apply_899, lastError = self._apply(self.rule_num, "num", []) self.considerError(lastError, None) - return (_G_apply_870, self.currentError) + return (_G_apply_899, self.currentError) - _G_consumedby_871, lastError = self.consumedby(_G_consumedby_865) + _G_consumedby_900, lastError = self.consumedby(_G_consumedby_894) self.considerError(lastError, "snum") - _locals["x"] = _G_consumedby_871 - _G_python_872, lastError = eval(self._G_expr_846, self.globals, _locals), None + _locals["x"] = _G_consumedby_900 + _G_python_901, lastError = ( + eval(self._G_expr_875, self.globals, _locals), + None, + ) self.considerError(lastError, "snum") - return (_G_python_872, self.currentError) + return (_G_python_901, self.currentError) def rule_accn(self): _locals = {"self": self} self.locals["accn"] = _locals - def _G_consumedby_873(): - self._trace("", (12484, 12490), self.input.position) - _G_apply_874, lastError = self._apply(self.rule_letter, "letter", []) + def _G_consumedby_902(): + self._trace("", (12994, 13000), self.input.position) + _G_apply_903, lastError = self._apply(self.rule_letter, "letter", []) self.considerError(lastError, None) - def _G_optional_875(): - def _G_many1_876(): - def _G_or_877(): - self._trace("", (12493, 12506), self.input.position) - _G_apply_878, lastError = self._apply( + def _G_optional_904(): + def _G_many1_905(): + def _G_or_906(): + self._trace("", (13003, 13016), self.input.position) + _G_apply_907, lastError = self._apply( self.rule_letterOrDigit, "letterOrDigit", [] ) self.considerError(lastError, None) - return (_G_apply_878, self.currentError) + return (_G_apply_907, self.currentError) - def _G_or_879(): - def _G_or_880(): - self._trace("", (12510, 12513), self.input.position) - _G_exactly_881, lastError = self.exactly("-") + def _G_or_908(): + def _G_or_909(): + self._trace("", (13020, 13023), self.input.position) + _G_exactly_910, lastError = self.exactly("-") self.considerError(lastError, None) - return (_G_exactly_881, self.currentError) + return (_G_exactly_910, self.currentError) - def _G_or_882(): - self._trace("", (12514, 12517), self.input.position) - _G_exactly_883, lastError = self.exactly("_") + def _G_or_911(): + self._trace("", (13024, 13027), self.input.position) + _G_exactly_912, lastError = self.exactly("_") self.considerError(lastError, None) - return (_G_exactly_883, self.currentError) + return (_G_exactly_912, self.currentError) - _G_or_884, lastError = self._or([_G_or_880, _G_or_882]) + _G_or_913, lastError = self._or([_G_or_909, _G_or_911]) self.considerError(lastError, None) - def _G_lookahead_885(): - self._trace("", (12521, 12534), self.input.position) - _G_apply_886, lastError = self._apply( + def _G_lookahead_914(): + self._trace("", (13031, 13044), self.input.position) + _G_apply_915, lastError = self._apply( self.rule_letterOrDigit, "letterOrDigit", [] ) self.considerError(lastError, None) - return (_G_apply_886, self.currentError) + return (_G_apply_915, self.currentError) - _G_lookahead_887, lastError = self.lookahead(_G_lookahead_885) + _G_lookahead_916, lastError = self.lookahead( + _G_lookahead_914 + ) self.considerError(lastError, None) - return (_G_lookahead_887, self.currentError) + return (_G_lookahead_916, self.currentError) - _G_or_888, lastError = self._or([_G_or_877, _G_or_879]) + _G_or_917, lastError = self._or([_G_or_906, _G_or_908]) self.considerError(lastError, None) - return (_G_or_888, self.currentError) + return (_G_or_917, self.currentError) - _G_many1_889, lastError = self.many(_G_many1_876, _G_many1_876()) + _G_many1_918, lastError = self.many(_G_many1_905, _G_many1_905()) self.considerError(lastError, None) - return (_G_many1_889, self.currentError) + return (_G_many1_918, self.currentError) - def _G_optional_890(): + def _G_optional_919(): return (None, self.input.nullError()) - _G_or_891, lastError = self._or([_G_optional_875, _G_optional_890]) + _G_or_920, lastError = self._or([_G_optional_904, _G_optional_919]) self.considerError(lastError, None) - def _G_optional_892(): - self._trace("", (12540, 12543), self.input.position) - _G_exactly_893, lastError = self.exactly(".") + def _G_optional_921(): + self._trace("", (13050, 13053), self.input.position) + _G_exactly_922, lastError = self.exactly(".") self.considerError(lastError, None) - def _G_many1_894(): - self._trace("", (12543, 12549), self.input.position) - _G_apply_895, lastError = self._apply(self.rule_digit, "digit", []) + def _G_many1_923(): + self._trace("", (13053, 13059), self.input.position) + _G_apply_924, lastError = self._apply( + self.rule_digit, "digit", [] + ) self.considerError(lastError, None) - return (_G_apply_895, self.currentError) + return (_G_apply_924, self.currentError) - _G_many1_896, lastError = self.many(_G_many1_894, _G_many1_894()) + _G_many1_925, lastError = self.many(_G_many1_923, _G_many1_923()) self.considerError(lastError, None) - return (_G_many1_896, self.currentError) + return (_G_many1_925, self.currentError) - def _G_optional_897(): + def _G_optional_926(): return (None, self.input.nullError()) - _G_or_898, lastError = self._or([_G_optional_892, _G_optional_897]) + _G_or_927, lastError = self._or([_G_optional_921, _G_optional_926]) self.considerError(lastError, None) - return (_G_or_898, self.currentError) + return (_G_or_927, self.currentError) - _G_consumedby_899, lastError = self.consumedby(_G_consumedby_873) + _G_consumedby_928, lastError = self.consumedby(_G_consumedby_902) self.considerError(lastError, "accn") - return (_G_consumedby_899, self.currentError) + return (_G_consumedby_928, self.currentError) def rule_opt_gene_expr(self): _locals = {"self": self} self.locals["opt_gene_expr"] = _locals - def _G_or_900(): - self._trace("", (12571, 12581), self.input.position) - _G_apply_901, lastError = self._apply(self.rule_paren_gene, "paren_gene", []) + def _G_or_929(): + self._trace("", (13081, 13091), self.input.position) + _G_apply_930, lastError = self._apply( + self.rule_paren_gene, "paren_gene", [] + ) self.considerError(lastError, None) - return (_G_apply_901, self.currentError) + return (_G_apply_930, self.currentError) - def _G_or_902(): - _G_python_903, lastError = (None), None + def _G_or_931(): + _G_python_932, lastError = (None), None self.considerError(lastError, None) - return (_G_python_903, self.currentError) + return (_G_python_932, self.currentError) - _G_or_904, lastError = self._or([_G_or_900, _G_or_902]) + _G_or_933, lastError = self._or([_G_or_929, _G_or_931]) self.considerError(lastError, "opt_gene_expr") - _locals["gene"] = _G_or_904 - _G_python_906, lastError = eval(self._G_expr_905, self.globals, _locals), None + _locals["gene"] = _G_or_933 + _G_python_935, lastError = ( + eval(self._G_expr_934, self.globals, _locals), + None, + ) self.considerError(lastError, "opt_gene_expr") - return (_G_python_906, self.currentError) + return (_G_python_935, self.currentError) def rule_paren_gene(self): _locals = {"self": self} self.locals["paren_gene"] = _locals - self._trace("", (12617, 12621), self.input.position) - _G_exactly_907, lastError = self.exactly("(") + self._trace("", (13127, 13131), self.input.position) + _G_exactly_936, lastError = self.exactly("(") self.considerError(lastError, "paren_gene") - self._trace("", (12621, 12633), self.input.position) - _G_apply_908, lastError = self._apply(self.rule_gene_symbol, "gene_symbol", []) + self._trace("", (13131, 13143), self.input.position) + _G_apply_937, lastError = self._apply( + self.rule_gene_symbol, "gene_symbol", [] + ) self.considerError(lastError, "paren_gene") - _locals["symbol"] = _G_apply_908 - self._trace("", (12640, 12644), self.input.position) - _G_exactly_909, lastError = self.exactly(")") + _locals["symbol"] = _G_apply_937 + self._trace("", (13150, 13154), self.input.position) + _G_exactly_938, lastError = self.exactly(")") self.considerError(lastError, "paren_gene") - _G_python_911, lastError = eval(self._G_expr_910, self.globals, _locals), None + _G_python_940, lastError = ( + eval(self._G_expr_939, self.globals, _locals), + None, + ) self.considerError(lastError, "paren_gene") - return (_G_python_911, self.currentError) + return (_G_python_940, self.currentError) def rule_gene_symbol(self): _locals = {"self": self} self.locals["gene_symbol"] = _locals - def _G_consumedby_912(): - self._trace("", (12670, 12676), self.input.position) - _G_apply_913, lastError = self._apply(self.rule_letter, "letter", []) + def _G_consumedby_941(): + self._trace("", (13180, 13186), self.input.position) + _G_apply_942, lastError = self._apply(self.rule_letter, "letter", []) self.considerError(lastError, None) - def _G_many1_914(): - def _G_or_915(): - self._trace("", (12678, 12691), self.input.position) - _G_apply_916, lastError = self._apply( + def _G_many1_943(): + def _G_or_944(): + self._trace("", (13188, 13201), self.input.position) + _G_apply_945, lastError = self._apply( self.rule_letterOrDigit, "letterOrDigit", [] ) self.considerError(lastError, None) - return (_G_apply_916, self.currentError) + return (_G_apply_945, self.currentError) - def _G_or_917(): - def _G_or_918(): - self._trace("", (12695, 12698), self.input.position) - _G_exactly_919, lastError = self.exactly("-") + def _G_or_946(): + def _G_or_947(): + self._trace("", (13205, 13208), self.input.position) + _G_exactly_948, lastError = self.exactly("-") self.considerError(lastError, None) - return (_G_exactly_919, self.currentError) + return (_G_exactly_948, self.currentError) - def _G_or_920(): - self._trace("", (12699, 12702), self.input.position) - _G_exactly_921, lastError = self.exactly("_") + def _G_or_949(): + self._trace("", (13209, 13212), self.input.position) + _G_exactly_950, lastError = self.exactly("_") self.considerError(lastError, None) - return (_G_exactly_921, self.currentError) + return (_G_exactly_950, self.currentError) - _G_or_922, lastError = self._or([_G_or_918, _G_or_920]) + _G_or_951, lastError = self._or([_G_or_947, _G_or_949]) self.considerError(lastError, None) - def _G_lookahead_923(): - self._trace("", (12706, 12719), self.input.position) - _G_apply_924, lastError = self._apply( + def _G_lookahead_952(): + self._trace("", (13216, 13229), self.input.position) + _G_apply_953, lastError = self._apply( self.rule_letterOrDigit, "letterOrDigit", [] ) self.considerError(lastError, None) - return (_G_apply_924, self.currentError) + return (_G_apply_953, self.currentError) - _G_lookahead_925, lastError = self.lookahead(_G_lookahead_923) + _G_lookahead_954, lastError = self.lookahead(_G_lookahead_952) self.considerError(lastError, None) - return (_G_lookahead_925, self.currentError) + return (_G_lookahead_954, self.currentError) - _G_or_926, lastError = self._or([_G_or_915, _G_or_917]) + _G_or_955, lastError = self._or([_G_or_944, _G_or_946]) self.considerError(lastError, None) - return (_G_or_926, self.currentError) + return (_G_or_955, self.currentError) - _G_many1_927, lastError = self.many(_G_many1_914, _G_many1_914()) + _G_many1_956, lastError = self.many(_G_many1_943, _G_many1_943()) self.considerError(lastError, None) - return (_G_many1_927, self.currentError) + return (_G_many1_956, self.currentError) - _G_consumedby_928, lastError = self.consumedby(_G_consumedby_912) + _G_consumedby_957, lastError = self.consumedby(_G_consumedby_941) self.considerError(lastError, "gene_symbol") - return (_G_consumedby_928, self.currentError) + return (_G_consumedby_957, self.currentError) _G_expr_20 = compile( "hgvs.sequencevariant.SequenceVariant(ac=ac, gene=gene, type=type, posedit=posedit)", @@ -3374,11 +3901,17 @@ def _G_lookahead_923(): "eval", ) _G_expr_116 = compile( - "hgvs.sequencevariant.SequenceVariant(None,type,posedit)", "", "eval" + "hgvs.sequencevariant.SequenceVariant(None,type,posedit)", + "", + "eval", + ) + _G_expr_140 = compile( + "hgvs.posedit.PosEdit(pos=pos,edit=edit)", "", "eval" ) - _G_expr_140 = compile("hgvs.posedit.PosEdit(pos=pos,edit=edit)", "", "eval") _G_expr_160 = compile( - "hgvs.posedit.PosEdit(pos=pos,edit=edit, uncertain=True)", "", "eval" + "hgvs.posedit.PosEdit(pos=pos,edit=edit, uncertain=True)", + "", + "eval", ) _G_expr_178 = compile( "hgvs.posedit.PosEdit(pos=None,edit=x,uncertain=False)", "", "eval" @@ -3389,8 +3922,12 @@ def _G_lookahead_923(): _G_expr_203 = compile("edit._set_uncertain()", "", "eval") _G_expr_231 = compile("hgvs.edit.NARefAlt(ref=ref,alt=ref)", "", "eval") _G_expr_236 = compile("hgvs.edit.NARefAlt(ref=ref,alt=alt)", "", "eval") - _G_expr_269 = compile("hgvs.edit.NARefAlt(ref=ref,alt=None)", "", "eval") - _G_expr_277 = compile("hgvs.edit.NARefAlt(ref=None,alt=alt)", "", "eval") + _G_expr_269 = compile( + "hgvs.edit.NARefAlt(ref=ref,alt=None)", "", "eval" + ) + _G_expr_277 = compile( + "hgvs.edit.NARefAlt(ref=None,alt=alt)", "", "eval" + ) _G_expr_285 = compile("hgvs.edit.Dup(ref=ref)", "", "eval") _G_expr_299 = compile("hgvs.edit.Inv(ref=None)", "", "eval") _G_expr_303 = compile( @@ -3402,53 +3939,84 @@ def _G_lookahead_923(): _G_expr_437 = compile("hgvs.edit.AASub(ref='',alt=alt)", "", "eval") _G_expr_441 = compile("hgvs.edit.AARefAlt(ref='',alt=alt)", "", "eval") _G_expr_444 = compile("hgvs.edit.AARefAlt(ref='',alt=None)", "", "eval") - _G_expr_448 = compile("hgvs.edit.AARefAlt(ref=None,alt=alt)", "", "eval") + _G_expr_448 = compile( + "hgvs.edit.AARefAlt(ref=None,alt=alt)", "", "eval" + ) _G_expr_451 = compile("hgvs.edit.Dup(ref='')", "", "eval") - _G_expr_459 = compile("hgvs.edit.AAFs(ref='', alt=alt, length=length)", "", "eval") + _G_expr_459 = compile( + "hgvs.edit.AAFs(ref='', alt=alt, length=length)", "", "eval" + ) _G_expr_466 = compile( - "hgvs.edit.AAExt(ref='', alt=alt, aaterm=aaterm, length=length)", "", "eval" + "hgvs.edit.AAExt(ref='', alt=alt, aaterm=aaterm, length=length)", + "", + "eval", ) _G_expr_469 = compile("hgvs.edit.AARefAlt(ref='',alt='')", "", "eval") _G_expr_477 = compile("iv._set_uncertain()", "", "eval") - _G_expr_524 = compile("hgvs.location.Interval(start,end)", "", "eval") - _G_expr_528 = compile( - "hgvs.location.Interval(start,copy.deepcopy(start))", "", "eval" + _G_expr_521 = compile("hgvs.location.Interval(start,end)", "", "eval") + _G_expr_525 = compile("hgvs.location.Interval(start,None)", "", "eval") + _G_expr_559 = compile( + "hgvs.location.BaseOffsetInterval(start,end)", "", "eval" + ) + _G_expr_563 = compile( + "hgvs.location.BaseOffsetInterval(start,copy.deepcopy(start))", + "", + "eval", + ) + _G_expr_583 = compile( + "hgvs.location.Interval(start=ivl_start._set_uncertain(), end=ivl_end._set_uncertain())", + "", + "eval", + ) + _G_expr_591 = compile( + "hgvs.location.Interval(start=ivl_start, end=ivl_end._set_uncertain())", + "", + "eval", ) - _G_expr_562 = compile("hgvs.location.BaseOffsetInterval(start,end)", "", "eval") - _G_expr_566 = compile( - "hgvs.location.BaseOffsetInterval(start,copy.deepcopy(start))", "", "eval" + _G_expr_599 = compile( + "hgvs.location.Interval(start=ivl_start._set_uncertain(), end=ivl_end)", + "", + "eval", ) - _G_expr_587 = compile( + _G_expr_616 = compile( "hgvs.location.BaseOffsetPosition(b,o,datum=hgvs.enums.Datum.CDS_START)", "", "eval", ) - _G_expr_593 = compile( + _G_expr_622 = compile( "hgvs.location.BaseOffsetPosition(b,o,datum=hgvs.enums.Datum.CDS_END)", "", "eval", ) - _G_expr_602 = compile("hgvs.location.SimplePosition(pos)", "", "eval") - _G_expr_613 = compile( + _G_expr_631 = compile("hgvs.location.SimplePosition(pos)", "", "eval") + _G_expr_642 = compile( "hgvs.location.BaseOffsetPosition(b,o,datum=hgvs.enums.Datum.SEQ_START)", "", "eval", ) - _G_expr_621 = compile( - "hgvs.location.AAPosition(pos,bioutils.sequences.aa_to_aa1(aa))", "", "eval" + _G_expr_650 = compile( + "hgvs.location.AAPosition(pos,bioutils.sequences.aa_to_aa1(aa))", + "", + "eval", + ) + _G_expr_661 = compile("n", "", "eval") + _G_expr_669 = compile("(aat, n)", "", "eval") + _G_expr_764 = compile("x in 'ACDEFGHIKLMNPQRSTVWYBZXU'", "", "eval") + _G_expr_767 = compile("x", "", "eval") + _G_expr_841 = compile( + "x in 'ACGTRYMKWSBDHVNacgtrymkwsbdhvn'", "", "eval" + ) + _G_expr_847 = compile( + "x in 'ACGTURYMKWSBDHVNacgturymkwsbdhvn'", "", "eval" + ) + _G_expr_854 = compile( + "x in 'ACGURYMKWSBDHVNacgurymkwsbdhvn'", "", "eval" ) - _G_expr_632 = compile("n", "", "eval") - _G_expr_640 = compile("(aat, n)", "", "eval") - _G_expr_735 = compile("x in 'ACDEFGHIKLMNPQRSTVWYBZXU'", "", "eval") - _G_expr_738 = compile("x", "", "eval") - _G_expr_812 = compile("x in 'ACGTRYMKWSBDHVNacgtrymkwsbdhvn'", "", "eval") - _G_expr_818 = compile("x in 'ACGTURYMKWSBDHVNacgturymkwsbdhvn'", "", "eval") - _G_expr_825 = compile("x in 'ACGURYMKWSBDHVNacgurymkwsbdhvn'", "", "eval") - _G_expr_831 = compile("x in 'X*'", "", "eval") - _G_expr_846 = compile("int(x)", "", "eval") - _G_expr_861 = compile("x in '-+'", "", "eval") - _G_expr_905 = compile("gene", "", "eval") - _G_expr_910 = compile("symbol", "", "eval") + _G_expr_860 = compile("x in 'X*'", "", "eval") + _G_expr_875 = compile("int(x)", "", "eval") + _G_expr_890 = compile("x in '-+'", "", "eval") + _G_expr_934 = compile("gene", "", "eval") + _G_expr_939 = compile("symbol", "", "eval") if Grammar.globals is not None: Grammar.globals = Grammar.globals.copy() diff --git a/src/hgvs/location.py b/src/hgvs/location.py index 1be10915..c1f476bf 100644 --- a/src/hgvs/location.py +++ b/src/hgvs/location.py @@ -15,6 +15,7 @@ * :class:`Interval` -- an interval of Positions """ +import copy from functools import total_ordering import attr @@ -42,7 +43,10 @@ def format(self, conf): def __repr__(self): return "{0}({1})".format( self.__class__.__name__, - ", ".join((a.name + "=" + str(getattr(self, a.name))) for a in self.__attrs_attrs__), + ", ".join( + (a.name + "=" + str(getattr(self, a.name))) + for a in self.__attrs_attrs__ + ), ) @property @@ -61,19 +65,38 @@ def validate(self): return (ValidationLevel.VALID, None) def __sub__(lhs, rhs): - assert type(lhs) == type(rhs), "Cannot substract coordinates of different representations" + assert type(lhs) is 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 + assert type(lhs) is type(rhs), ( + "Cannot compare coordinates of different representations" + ) + + return lhs.base == rhs.base and lhs.uncertain == rhs.uncertain def __lt__(lhs, rhs): - assert type(lhs) == type(rhs), "Cannot compare coordinates of different representations" + assert type(lhs) is type(rhs), ( + "Cannot compare coordinates of different representations" + ) if lhs.uncertain or rhs.uncertain: - raise HGVSUnsupportedOperationError("Cannot compare coordinates of uncertain positions") + raise HGVSUnsupportedOperationError( + "Cannot compare coordinates of uncertain positions" + ) + + if lhs.base is None and rhs.base is None: + raise HGVSUnsupportedOperationError( + "Cannot compare two positions without bases" + ) + + # imprecise positions can be on both sides of an interval + # This is weird, but because an unknown breakpoint can be expressed on both sides + # with a ? character we need to support that both options are true + if lhs.base is None or rhs.base is None: + return True + return lhs.base < rhs.base @@ -133,7 +156,7 @@ def validate(self): ) return (ValidationLevel.VALID, None) - def __str__(self): + def _format_pos(self) -> str: self.validate() base_str = ( "?" @@ -143,9 +166,17 @@ def __str__(self): else str(self.base) ) offset_str = ( - "+?" if self.offset is None else "" if self.offset == 0 else "%+d" % self.offset + "+?" + if self.offset is None + else "" + if self.offset == 0 + else "%+d" % self.offset ) pos = base_str + offset_str + return pos + + def __str__(self): + pos = self._format_pos() return "(" + pos + ")" if self.uncertain else pos def format(self, conf): @@ -154,7 +185,10 @@ def format(self, conf): def __repr__(self): return "{0}({1})".format( self.__class__.__name__, - ", ".join((a.name + "=" + str(getattr(self, a.name))) for a in self.__attrs_attrs__), + ", ".join( + (a.name + "=" + str(getattr(self, a.name))) + for a in self.__attrs_attrs__ + ), ) def _set_uncertain(self): @@ -173,7 +207,9 @@ def is_intronic(self): return self.offset is None or self.offset != 0 def __sub__(lhs, rhs): - assert type(lhs) == type(rhs), "Cannot substract coordinates of different representations" + assert type(lhs) is type(rhs), ( + "Cannot substract coordinates of different representations" + ) if lhs.datum != rhs.datum: raise HGVSUnsupportedOperationError( "Interval length measured from different datums is ill-defined" @@ -188,15 +224,25 @@ def __sub__(lhs, rhs): return lhs.base - rhs.base - straddles_zero 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.datum == rhs.datum and lhs.base == rhs.base and lhs.offset == rhs.offset + assert type(lhs) is type(rhs), ( + "Cannot compare coordinates of different representations" + ) + + return ( + lhs.datum == rhs.datum + and lhs.base == rhs.base + and lhs.offset == rhs.offset + and lhs.uncertain == rhs.uncertain + ) def __lt__(lhs, rhs): - assert type(lhs) == type(rhs), "Cannot compare coordinates of different representations" + assert type(lhs) is type(rhs), ( + "Cannot compare coordinates of different representations" + ) if lhs.uncertain or rhs.uncertain: - raise HGVSUnsupportedOperationError("Cannot compare coordinates of uncertain positions") + raise HGVSUnsupportedOperationError( + "Cannot compare coordinates of uncertain positions" + ) if lhs.datum == rhs.datum: if lhs.base == rhs.base: return lhs.offset < rhs.offset @@ -256,7 +302,10 @@ def format(self, conf=None): def __repr__(self): return "{0}({1})".format( self.__class__.__name__, - ", ".join((a.name + "=" + str(getattr(self, a.name))) for a in self.__attrs_attrs__), + ", ".join( + (a.name + "=" + str(getattr(self, a.name))) + for a in self.__attrs_attrs__ + ), ) @property @@ -275,37 +324,59 @@ def is_uncertain(self): return self.uncertain or self.base is None or self.aa is None def __sub__(lhs, rhs): - assert type(lhs) == type(rhs), "Cannot substract coordinates of different representations" + assert type(lhs) is 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" + assert type(lhs) is type(rhs), ( + "Cannot compare coordinates of different representations" + ) if lhs.uncertain or rhs.uncertain: - raise HGVSUnsupportedOperationError("Cannot compare coordinates of uncertain positions") + raise HGVSUnsupportedOperationError( + "Cannot compare coordinates of uncertain positions" + ) return lhs.base == rhs.base and lhs.aa == rhs.aa def __lt__(lhs, rhs): - assert type(lhs) == type(rhs), "Cannot compare coordinates of different representations" + assert type(lhs) is type(rhs), ( + "Cannot compare coordinates of different representations" + ) if lhs.uncertain or rhs.uncertain: - raise HGVSUnsupportedOperationError("Cannot compare coordinates of uncertain positions") + raise HGVSUnsupportedOperationError( + "Cannot compare coordinates of uncertain positions" + ) return lhs.base < rhs.base def __gt__(lhs, rhs): - assert type(lhs) == type(rhs), "Cannot compare coordinates of different representations" + assert type(lhs) is type(rhs), ( + "Cannot compare coordinates of different representations" + ) if lhs.uncertain or rhs.uncertain: - raise HGVSUnsupportedOperationError("Cannot compare coordinates of uncertain positions") + raise HGVSUnsupportedOperationError( + "Cannot compare coordinates of uncertain positions" + ) return lhs.base > rhs.base def __le__(lhs, rhs): - assert type(lhs) == type(rhs), "Cannot compare coordinates of different representations" + assert type(lhs) is type(rhs), ( + "Cannot compare coordinates of different representations" + ) if lhs.uncertain or rhs.uncertain: - raise HGVSUnsupportedOperationError("Cannot compare coordinates of uncertain positions") + raise HGVSUnsupportedOperationError( + "Cannot compare coordinates of uncertain positions" + ) return lhs.base <= rhs.base def __ge__(lhs, rhs): - assert type(lhs) == type(rhs), "Cannot compare coordinates of different representations" + assert type(lhs) is type(rhs), ( + "Cannot compare coordinates of different representations" + ) if lhs.uncertain or rhs.uncertain: - raise HGVSUnsupportedOperationError("Cannot compare coordinates of uncertain positions") + raise HGVSUnsupportedOperationError( + "Cannot compare coordinates of uncertain positions" + ) return lhs.base >= rhs.base @@ -315,6 +386,10 @@ class Interval: end = attr.ib(default=None) uncertain = attr.ib(default=False) + def __attrs_post_init__(self): + if self.end is None: + self.end = copy.deepcopy(self.start) + def validate(self): if self.start: (res, msg) = self.start.validate() @@ -324,23 +399,30 @@ def validate(self): (res, msg) = self.end.validate() if res != ValidationLevel.VALID: return (res, msg) + # Check start less than or equal to end if not self.start or not self.end: return (ValidationLevel.VALID, None) + try: if self.start <= self.end: return (ValidationLevel.VALID, None) else: - return (ValidationLevel.ERROR, "base start position must be <= end position") + return ( + ValidationLevel.ERROR, + "base start position must be <= end position", + ) except HGVSUnsupportedOperationError as err: return (ValidationLevel.WARNING, str(err)) def format(self, conf=None): if self.start is None: return "" - if self.end is None or self.start == self.end: + if (self.end is None or self.start == self.end) and not self.uncertain: return self.start.format(conf) - iv = self.start.format(conf) + "_" + self.end.format(conf) + iv = self.start.format(conf) + if self.end != self.start: + iv = iv + "_" + self.end.format(conf) return "(" + iv + ")" if self.uncertain else iv __str__ = format @@ -348,7 +430,10 @@ def format(self, conf=None): def __repr__(self): return "{0}({1})".format( self.__class__.__name__, - ", ".join((a.name + "=" + str(getattr(self, a.name))) for a in self.__attrs_attrs__), + ", ".join( + (a.name + "=" + str(getattr(self, a.name))) + for a in self.__attrs_attrs__ + ), ) def _set_uncertain(self): @@ -368,11 +453,32 @@ def is_uncertain(self): @attr.s(slots=True, repr=False) class BaseOffsetInterval(Interval): """BaseOffsetInterval isa Interval of BaseOffsetPositions. The only - additional functionality over Interval is to ensure that the dutum + additional functionality over Interval is to ensure that the datum of end and start are compatible. """ + def format(self, conf=None): + if self.start is None: + return "" + if self.end is None or self.start == self.end: + return self.start.format(conf) + + s = self.start._format_pos() + if self.start.is_uncertain: + s_str = f"(?_{s})" + else: + s_str = s + e = self.end._format_pos() + if self.end.is_uncertain: + e_str = f"({e}_?)" + else: + e_str = e + iv = s_str + "_" + e_str + return "(" + iv + ")" if self.uncertain else iv + + __str__ = format + def __attrs_post_init__(self): # #330: In a post-ter interval like *87_91, the * binds only # to the start. This means that the start.datum is CDS_END, diff --git a/src/hgvs/posedit.py b/src/hgvs/posedit.py index a7618230..f4771809 100644 --- a/src/hgvs/posedit.py +++ b/src/hgvs/posedit.py @@ -7,6 +7,7 @@ from hgvs.enums import ValidationLevel from hgvs.exceptions import HGVSUnsupportedOperationError +from hgvs.location import Interval @attr.s(slots=True, repr=False) @@ -98,7 +99,11 @@ def validate(self): # Check del length if self.edit.type in ["del", "delins"]: ref_len = self.edit.ref_n - if ref_len is not None and ref_len != self.pos.end - self.pos.start + 1: + if (ref_len is not None and + not ( isinstance(self.pos.start, Interval) or + isinstance(self.pos.end, Interval) + ) and + ref_len != self.pos.end - self.pos.start + 1): return ( ValidationLevel.ERROR, "Length implied by coordinates must equal sequence deletion length", diff --git a/src/hgvs/validator.py b/src/hgvs/validator.py index bfaefece..d68254bc 100644 --- a/src/hgvs/validator.py +++ b/src/hgvs/validator.py @@ -146,9 +146,14 @@ def _ref_is_valid(self, var): else: var_ref_seq = getattr(var.posedit.edit, "ref", None) or None var_n = self.vm.c_to_n(var) if var.type == "c" else var - ref_checks.append( - (var_n.ac, var_n.posedit.pos.start.base, var_n.posedit.pos.end.base, var_ref_seq) - ) + if var_n.posedit.pos.start.uncertain or var_n.posedit.pos.end.uncertain: + ref_checks.append( + (var_n.ac, None, None, var_ref_seq) + ) + else: + ref_checks.append( + (var_n.ac, var_n.posedit.pos.start.base, var_n.posedit.pos.end.base, var_ref_seq) + ) for ac, var_ref_start, var_ref_end, var_ref_seq in ref_checks: if var_ref_start is None or var_ref_end is None or not var_ref_seq: diff --git a/src/hgvs/variantmapper.py b/src/hgvs/variantmapper.py index d73b98b7..ef7ed219 100644 --- a/src/hgvs/variantmapper.py +++ b/src/hgvs/variantmapper.py @@ -1,7 +1,5 @@ # -*- coding: utf-8 -*- -"""Projects variants between sequences using AlignmentMapper. - -""" +"""Projects variants between sequences using AlignmentMapper.""" import copy import logging @@ -21,6 +19,7 @@ from hgvs.decorators.lru_cache import lru_cache from hgvs.enums import PrevalidationLevel from hgvs.exceptions import HGVSInvalidVariantError, HGVSUnsupportedOperationError +from hgvs.location import Interval from hgvs.utils.reftranscriptdata import RefTranscriptData _logger = logging.getLogger(__name__) @@ -96,7 +95,9 @@ def __init__( # ############################################################################ # g⟷t - def g_to_t(self, var_g, tx_ac, alt_aln_method=hgvs.global_config.mapping.alt_aln_method): + def g_to_t( + self, var_g, tx_ac, alt_aln_method=hgvs.global_config.mapping.alt_aln_method + ): if not (var_g.type == "g"): raise HGVSInvalidVariantError("Expected a g. variant; got " + str(var_g)) if self._validator: @@ -115,9 +116,13 @@ def g_to_t(self, var_g, tx_ac, alt_aln_method=hgvs.global_config.mapping.alt_aln ) return var_out - def t_to_g(self, var_t, alt_ac, alt_aln_method=hgvs.global_config.mapping.alt_aln_method): + def t_to_g( + self, var_t, alt_ac, alt_aln_method=hgvs.global_config.mapping.alt_aln_method + ): if var_t.type not in "cn": - raise HGVSInvalidVariantError("Expected a c. or n. variant; got " + str(var_t)) + raise HGVSInvalidVariantError( + "Expected a c. or n. variant; got " + str(var_t) + ) if self._validator: self._validator.validate(var_t) var_t.fill_ref(self.hdp) @@ -133,7 +138,9 @@ def t_to_g(self, var_t, alt_ac, alt_aln_method=hgvs.global_config.mapping.alt_al # ############################################################################ # g⟷n - def g_to_n(self, var_g, tx_ac, alt_aln_method=hgvs.global_config.mapping.alt_aln_method): + def g_to_n( + self, var_g, tx_ac, alt_aln_method=hgvs.global_config.mapping.alt_aln_method + ): """Given a parsed g. variant, return a n. variant on the specified transcript using the specified alignment method (default is "splign" from NCBI). @@ -159,7 +166,9 @@ def g_to_n(self, var_g, tx_ac, alt_aln_method=hgvs.global_config.mapping.alt_aln and not hgvs.global_config.mapping.strict_bounds and not mapper.g_interval_is_inbounds(var_g.posedit.pos) ): - _logger.info("Renormalizing out-of-bounds minus strand variant on genomic sequence") + _logger.info( + "Renormalizing out-of-bounds minus strand variant on genomic sequence" + ) var_g = self.left_normalizer.normalize(var_g) var_g.fill_ref(self.hdp) @@ -195,7 +204,9 @@ def g_to_n(self, var_g, tx_ac, alt_aln_method=hgvs.global_config.mapping.alt_aln self._update_gene_symbol(var_n, var_g.gene) return var_n - def n_to_g(self, var_n, alt_ac, alt_aln_method=hgvs.global_config.mapping.alt_aln_method): + def n_to_g( + self, var_n, alt_ac, alt_aln_method=hgvs.global_config.mapping.alt_aln_method + ): """Given a parsed n. variant, return a g. variant on the specified transcript using the specified alignment method (default is "splign" from NCBI). @@ -240,7 +251,9 @@ def n_to_g(self, var_n, alt_ac, alt_aln_method=hgvs.global_config.mapping.alt_al # ############################################################################ # g⟷c - def g_to_c(self, var_g, tx_ac, alt_aln_method=hgvs.global_config.mapping.alt_aln_method): + def g_to_c( + self, var_g, tx_ac, alt_aln_method=hgvs.global_config.mapping.alt_aln_method + ): """Given a parsed g. variant, return a c. variant on the specified transcript using the specified alignment method (default is "splign" from NCBI). @@ -289,7 +302,9 @@ def g_to_c(self, var_g, tx_ac, alt_aln_method=hgvs.global_config.mapping.alt_aln self._update_gene_symbol(var_c, var_g.gene) return var_c - def c_to_g(self, var_c, alt_ac, alt_aln_method=hgvs.global_config.mapping.alt_aln_method): + def c_to_g( + self, var_c, alt_ac, alt_aln_method=hgvs.global_config.mapping.alt_aln_method + ): """Given a parsed c. variant, return a g. variant on the specified transcript using the specified alignment method (default is "splign" from NCBI). @@ -428,7 +443,9 @@ def c_to_p(self, var_c, pro_ac=None): """ if not (var_c.type == "c"): - raise HGVSInvalidVariantError("Expected a cDNA (c.) variant; got " + str(var_c)) + raise HGVSInvalidVariantError( + "Expected a cDNA (c.) variant; got " + str(var_c) + ) if self._validator: self._validator.validate(var_c) reference_data = RefTranscriptData(self.hdp, var_c.ac, pro_ac) @@ -459,17 +476,25 @@ def _replace_reference(self, var): """fetch reference sequence for variant and update (in-place) if necessary""" if var.type not in "cgmnr": - raise HGVSUnsupportedOperationError("Can only update references for type c, g, m, n, r") + raise HGVSUnsupportedOperationError( + "Can only update references for type c, g, m, n, r" + ) if var.posedit.edit.type in ("ins", "con"): # these types have no reference sequence (zero-width), so return as-is return var pos = var.posedit.pos - if (isinstance(pos.start, hgvs.location.BaseOffsetPosition) and pos.start.offset != 0) or ( - isinstance(pos.end, hgvs.location.BaseOffsetPosition) and pos.end.offset != 0 + if ( + isinstance(pos.start, hgvs.location.BaseOffsetPosition) + and pos.start.offset != 0 + ) or ( + isinstance(pos.end, hgvs.location.BaseOffsetPosition) + and pos.end.offset != 0 ): - _logger.info("Can't update reference sequence for intronic variant {}".format(var)) + _logger.info( + "Can't update reference sequence for intronic variant {}".format(var) + ) return var # For c. variants, we need coords on underlying sequences @@ -481,8 +506,28 @@ def _replace_reference(self, var): else: pos = var.posedit.pos - seq_start = pos.start.base - 1 - seq_end = pos.end.base + if pos.start.uncertain: + # pos can be either a BaseOffsetPosition or an Interval + if isinstance(pos.start, Interval): + seq_start = pos.start.end.base - 1 + else: + seq_start = pos.start.base - 1 + else: + if isinstance(pos.start, Interval): + seq_start = pos.start.start.base - 1 + else: + seq_start = pos.start.base - 1 + + if pos.end.uncertain: + if isinstance(pos.end, Interval): + seq_end = pos.end.start.base + else: + seq_end = pos.end.base + else: + if isinstance(pos.end, Interval): + seq_end = pos.end.end.base + else: + seq_end = pos.end.base # When strict_bounds is False and an error occurs, return # variant as-is @@ -500,7 +545,9 @@ def _replace_reference(self, var): edit = var.posedit.edit if edit.ref != seq: _logger.debug( - "Replaced reference sequence in {var} with {seq}".format(var=var, seq=seq) + "Replaced reference sequence in {var} with {seq}".format( + var=var, seq=seq + ) ) edit.ref = seq @@ -552,7 +599,9 @@ def _convert_edit_check_strand(strand, edit_in): ref = reverse_complement(edit_in.ref) edit_out = hgvs.edit.Inv(ref=ref) else: - raise NotImplementedError("Only NARefAlt/Dup/Inv types are currently implemented") + raise NotImplementedError( + "Only NARefAlt/Dup/Inv types are currently implemented" + ) return edit_out def _get_altered_sequence(self, strand, interval, var): @@ -574,12 +623,16 @@ def _get_altered_sequence(self, strand, interval, var): elif edit.type == "dup": seq.insert(pos_end, "".join(seq[pos_start:pos_end])) elif edit.type == "inv": - seq[pos_start:pos_end] = list(reverse_complement("".join(seq[pos_start:pos_end]))) + seq[pos_start:pos_end] = list( + reverse_complement("".join(seq[pos_start:pos_end])) + ) elif edit.type == "identity": pass else: raise HGVSUnsupportedOperationError( - "Getting altered sequence for {type} is unsupported".format(type=edit.type) + "Getting altered sequence for {type} is unsupported".format( + type=edit.type + ) ) seq = "".join(seq) diff --git a/tests/data/cache-py3.hdp b/tests/data/cache-py3.hdp index 97ad36b0..754542dd 100644 Binary files a/tests/data/cache-py3.hdp and b/tests/data/cache-py3.hdp differ diff --git a/tests/data/grammar_test.tsv b/tests/data/grammar_test.tsv index c1fb1f70..ea73614b 100644 --- a/tests/data/grammar_test.tsv +++ b/tests/data/grammar_test.tsv @@ -104,6 +104,15 @@ def_c_interval 1_10|1|1+2_10-2 True list def_c_pos 1|11+1|9-3|-1|*10 True list def_c_pos X|11_12|10* False list def_g_interval 2_10|2 True list +uncertain_g_interval (1_10)_(21_30) True one +uncertain_g_interval (?_10)_(21_?) True one +uncertain_g_interval (1_?)_(?_30) True one +uncertain_g_interval 1_(21_30) True one +uncertain_g_interval (1_10)_21 True one +uncertain_g_interval ?_(21_30) True one +uncertain_g_interval (1_10)_? True one +uncertain_g_interval 10_(21_?) True one +uncertain_g_interval (1_10)_(21_30)_(41_50) False one def_g_pos 2 True list def_g_pos ? True one def_g_pos A|2?|*1|-2 False list diff --git a/tests/test_hgvs_location.py b/tests/test_hgvs_location.py index 08db6f7b..5f7ec925 100644 --- a/tests/test_hgvs_location.py +++ b/tests/test_hgvs_location.py @@ -197,6 +197,43 @@ def test_length(self): ) self.assertEqual(ival._length(), 39) + def test_uncertain(self): + def sp(i): return hgvs.location.SimplePosition(i) + ival = hgvs.location.Interval( + hgvs.location.Interval(sp(10), sp(20), uncertain=True), + hgvs.location.Interval(sp(30), sp(40), uncertain=True) + ) + self.assertEqual("(10_20)_(30_40)", str(ival)) + + with self.assertRaises(AssertionError): + str(hgvs.location.Interval( + sp(10), + hgvs.location.Interval(sp(30), sp(40), uncertain=True) + )) + ival3 = hgvs.location.Interval( + hgvs.location.Interval(sp(10), sp(10), uncertain=True), + hgvs.location.Interval(sp(30), sp(40), uncertain=True) + ) + self.assertEqual("(10)_(30_40)", str(ival3)) + + ival4 = hgvs.location.Interval( + hgvs.location.Interval(sp(10), sp(10), uncertain=False), + hgvs.location.Interval(sp(30), sp(40), uncertain=True) + ) + self.assertEqual("10_(30_40)", str(ival4)) + + ival5 = hgvs.location.Interval( + hgvs.location.Interval(sp(10), sp(20), uncertain=True), + hgvs.location.Interval(sp(30), sp(30), uncertain=True) + ) + self.assertEqual("(10_20)_(30)", str(ival5)) + + ival6 = hgvs.location.Interval( + hgvs.location.Interval(sp(10), sp(20), uncertain=True), + hgvs.location.Interval(sp(30), sp(30), uncertain=False) + ) + self.assertEqual("(10_20)_30", str(ival6)) + if __name__ == "__main__": unittest.main() diff --git a/tests/test_hgvs_sequencevariant.py b/tests/test_hgvs_sequencevariant.py index f1fca4cb..6feb5f33 100644 --- a/tests/test_hgvs_sequencevariant.py +++ b/tests/test_hgvs_sequencevariant.py @@ -2,7 +2,9 @@ import os import unittest +import parameterized import pytest + from support import CACHE import hgvs @@ -20,42 +22,60 @@ def test_gene_formatting(parser): @pytest.mark.quick @pytest.mark.models class Test_SequenceVariant(unittest.TestCase): + @classmethod + def setUpClass(cls): + cls.hdp = hgvs.dataproviders.uta.connect( + mode=os.environ.get("HGVS_CACHE_MODE", "run"), cache=CACHE + ) + cls.vm = hgvs.variantmapper.VariantMapper(cls.hdp) + cls.hp = hgvs.parser.Parser() + def test_SequenceVariant(self): - var = hgvs.sequencevariant.SequenceVariant(ac="AC", type="B", posedit="1234DE>FG") + var = hgvs.sequencevariant.SequenceVariant( + ac="AC", type="B", posedit="1234DE>FG" + ) self.assertEqual(str(var), "AC:B.1234DE>FG") def test_fill_ref(self): - hp = hgvs.parser.Parser() - hdp = hgvs.dataproviders.uta.connect( - mode=os.environ.get("HGVS_CACHE_MODE", "run"), cache=CACHE - ) - # fill reference for sequence variants - var = hp.parse_hgvs_variant("NM_001166478.1:c.31_32del").fill_ref(hdp) - self.assertEqual(var.format({"max_ref_length": None}), "NM_001166478.1:c.31_32delTT") + var = self.hp.parse_hgvs_variant("NM_001166478.1:c.31_32del").fill_ref(self.hdp) + self.assertEqual( + var.format({"max_ref_length": None}), "NM_001166478.1:c.31_32delTT" + ) - var = hp.parse_hgvs_variant("NM_001166478.1:c.31_32del2").fill_ref(hdp) - self.assertEqual(var.format({"max_ref_length": None}), "NM_001166478.1:c.31_32delTT") + var = self.hp.parse_hgvs_variant("NM_001166478.1:c.31_32del2").fill_ref( + self.hdp + ) + self.assertEqual( + var.format({"max_ref_length": None}), "NM_001166478.1:c.31_32delTT" + ) - var = hp.parse_hgvs_variant("NM_001166478.1:c.2_7delinsTTTAGA").fill_ref(hdp) + var = self.hp.parse_hgvs_variant("NM_001166478.1:c.2_7delinsTTTAGA").fill_ref( + self.hdp + ) self.assertEqual( - var.format({"max_ref_length": None}), "NM_001166478.1:c.2_7delTGAAGAinsTTTAGA" + var.format({"max_ref_length": None}), + "NM_001166478.1:c.2_7delTGAAGAinsTTTAGA", ) - var = hp.parse_hgvs_variant("NM_001166478.1:c.35_36dup").fill_ref(hdp) - self.assertEqual(var.format({"max_ref_length": None}), "NM_001166478.1:c.35_36dupTC") + var = self.hp.parse_hgvs_variant("NM_001166478.1:c.35_36dup").fill_ref(self.hdp) + self.assertEqual( + var.format({"max_ref_length": None}), "NM_001166478.1:c.35_36dupTC" + ) - var = hp.parse_hgvs_variant("NM_001166478.1:c.18_19insACT").fill_ref(hdp) - self.assertEqual(var.format({"max_ref_length": None}), "NM_001166478.1:c.18_19insACT") + var = self.hp.parse_hgvs_variant("NM_001166478.1:c.18_19insACT").fill_ref( + self.hdp + ) + self.assertEqual( + var.format({"max_ref_length": None}), "NM_001166478.1:c.18_19insACT" + ) - var = hp.parse_hgvs_variant("NM_001166478.1:c.31=").fill_ref(hdp) + var = self.hp.parse_hgvs_variant("NM_001166478.1:c.31=").fill_ref(self.hdp) self.assertEqual(var.format({"max_ref_length": None}), "NM_001166478.1:c.31T=") def test_format(self): - hp = hgvs.parser.Parser() - # Global default settings - var = hp.parse_hgvs_variant("NP_001628.1:p.Gly528Arg") + var = self.hp.parse_hgvs_variant("NP_001628.1:p.Gly528Arg") self.assertEqual(str(var), "NP_001628.1:p.Gly528Arg") self.assertEqual(var.format(), "NP_001628.1:p.Gly528Arg") @@ -68,7 +88,7 @@ def test_format(self): conf = {"p_3_letter": False} self.assertEqual(var.format(conf), "NP_001628.1:p.G528R") - var = hp.parse_hgvs_variant("NP_001628.1:p.Gly528Ter") + var = self.hp.parse_hgvs_variant("NP_001628.1:p.Gly528Ter") conf = {"p_term_asterisk": True} self.assertEqual(var.format(conf), "NP_001628.1:p.Gly528*") self.assertEqual(var.format(), "NP_001628.1:p.Gly528Ter") @@ -77,23 +97,256 @@ def test_format(self): self.assertEqual(var.format(), "NP_001628.1:p.Gly528Ter") # Remove reference sequence - var = hp.parse_hgvs_variant("NM_001166478.1:c.31_32delTT") + var = self.hp.parse_hgvs_variant("NM_001166478.1:c.31_32delTT") self.assertEqual(str(var), "NM_001166478.1:c.31_32del") - self.assertEqual(var.format(conf={"max_ref_length": 1}), "NM_001166478.1:c.31_32del") - self.assertEqual(var.format(conf={"max_ref_length": 2}), "NM_001166478.1:c.31_32delTT") - self.assertEqual(var.format(conf={"max_ref_length": None}), "NM_001166478.1:c.31_32delTT") + self.assertEqual( + var.format(conf={"max_ref_length": 1}), "NM_001166478.1:c.31_32del" + ) + self.assertEqual( + var.format(conf={"max_ref_length": 2}), "NM_001166478.1:c.31_32delTT" + ) + self.assertEqual( + var.format(conf={"max_ref_length": None}), "NM_001166478.1:c.31_32delTT" + ) - var = hp.parse_hgvs_variant("NM_001166478.1:c.31_32del2") + var = self.hp.parse_hgvs_variant("NM_001166478.1:c.31_32del2") self.assertEqual(str(var), "NM_001166478.1:c.31_32del") - self.assertEqual(var.format(conf={"max_ref_length": None}), "NM_001166478.1:c.31_32del2") + self.assertEqual( + var.format(conf={"max_ref_length": None}), "NM_001166478.1:c.31_32del2" + ) - var = hp.parse_hgvs_variant("NM_001166478.1:c.31_32delTTinsAA") + var = self.hp.parse_hgvs_variant("NM_001166478.1:c.31_32delTTinsAA") self.assertEqual(str(var), "NM_001166478.1:c.31_32delinsAA") - var = hp.parse_hgvs_variant("NM_001166478.1:c.35_36dupTC") + var = self.hp.parse_hgvs_variant("NM_001166478.1:c.35_36dupTC") self.assertEqual(str(var), "NM_001166478.1:c.35_36dup") - var = hp.parse_hgvs_variant("NM_001166478.1:c.31T=") + var = self.hp.parse_hgvs_variant("NM_001166478.1:c.31T=") self.assertEqual(str(var), "NM_001166478.1:c.31=") - self.assertEqual(var.format(conf={"max_ref_length": None}), "NM_001166478.1:c.31T=") + self.assertEqual( + var.format(conf={"max_ref_length": None}), "NM_001166478.1:c.31T=" + ) + + def test_uncertain(self): + vs = "NC_000005.9:g.(90136803_90144453)_(90159675_90261231)dup" + v = self.hp.parse(vs) + self.assertEqual(vs, str(v)) + self.assertEqual(v.posedit.pos.start.start.base, 90136803) + self.assertEqual(v.posedit.pos.start.end.base, 90144453) + self.assertEqual(v.posedit.pos.start.uncertain, True) + self.assertEqual(v.posedit.pos.end.start.base, 90159675) + self.assertEqual(v.posedit.pos.end.end.base, 90261231) + self.assertEqual(v.posedit.pos.end.uncertain, True) + self.assertEqual(type(v.posedit.edit).__name__, "Dup") + + vs2 = "NC_000009.11:g.(?_108337304)_(108337428_?)del" + v2 = self.hp.parse(vs2) + self.assertEqual(vs2, str(v2)) + self.assertEqual(v2.posedit.pos.start.start.base, None) + self.assertEqual(v2.posedit.pos.start.uncertain, True) + self.assertEqual(v2.posedit.pos.start.end.base, 108337304) + self.assertEqual(v2.posedit.pos.end.start.base, 108337428) + self.assertEqual(v2.posedit.pos.end.end.base, None) + self.assertEqual(v2.posedit.pos.end.uncertain, True) + self.assertEqual(type(v2.posedit.edit).__name__, "NARefAlt") + + # TODO add to parser test cases + v3s = "NC_000005.9:g.(90136803_90159675)dup" + v3 = self.hp.parse(v3s) + + # Interval itself is uncertain, but positions are certain + self.assertEqual(v3s, str(v3)) + self.assertEqual(v3.posedit.pos.uncertain, True) + self.assertEqual(v3.posedit.pos.start.uncertain, False) + self.assertEqual(v3.posedit.pos.end.uncertain, False) + self.assertEqual(v3.posedit.pos.start.base, 90136803) + self.assertEqual(v3.posedit.pos.end.base, 90159675) + + v4s = "NC_000005.9:g.(90136803)_(90159675)dup" + v4 = self.hp.parse(v4s) + self.assertEqual(v4s, str(v4)) + self.assertEqual(v4.posedit.pos.uncertain, False) + self.assertEqual(v4.posedit.pos.start.uncertain, True) + self.assertEqual(str(v4.posedit.pos.start), "(90136803)") + self.assertEqual(str(v4.posedit.pos.end), "(90159675)") + self.assertEqual(v4.posedit.pos.end.uncertain, True) + self.assertEqual(v4.posedit.pos.start.start.base, 90136803) + self.assertEqual(v4.posedit.pos.end.start.base, 90159675) + + # Test that the start and end positions are not the same object + v4.posedit.pos.start.end.base = 90136804 + self.assertTrue(v4.posedit.pos.start.start is not v4.posedit.pos.start.end) + self.assertEqual(v4.posedit.pos.start.end.base, 90136804) + self.assertEqual(v4.posedit.pos.start.start.base, 90136803) + + self.assertEqual("NC_000005.9:g.(90136803_90136804)_(90159675)dup", str(v4)) + + def test_partial_uncertain_projection(self): + data = [ + ( + "NC_000009.11:g.108337304_(108337428_?)del", + False, + True, + "NM_001079802.1:n.207_(321+10_?)del", + "NM_001079802.1:c.-10_(105+10_?)del", + ), + ( + "NC_000009.11:g.(?_108337304)_108337428del", + True, + False, + "NM_001079802.1:n.(?_207)_321+10del", + "NM_001079802.1:c.(?_-10)_105+10del", + ), + ] + + for hgvs_g, start_uncertain, stop_uncertain, hgvs_n, hgvs_c in data: + var_g = self.hp.parse(hgvs_g) + self.assertEqual(var_g.posedit.pos.start.uncertain, start_uncertain) + self.assertEqual(var_g.posedit.pos.end.uncertain, stop_uncertain) + self.assertEqual(hgvs_g, str(var_g)) + acc = hgvs_c.split(":")[0] + var_n = self.vm.g_to_n(var_g, acc) + self.assertEqual(hgvs_n, str(var_n)) + var_c = self.vm.g_to_c(var_g, acc) + self.assertEqual(hgvs_c, str(var_c)) + + def test_uncertain_projection_g_to_c_confidence(self): + data = [ + ( + "NC_000005.9:g.(90136803_90144453)_(90159675_90261231)dup", + "NM_032119.3:n.(?_17116-1)_(17952+1_?)dup", + "NM_032119.3:c.(?_17020-1)_(17856+1_?)dup", + ), + ( + "NC_000019.9:g.(11211022_11213339)_(11217364_11218067)dup", + "NM_000527.5:n.(?_277-1)_(903+1_?)dup", + "NM_000527.5:c.(?_191-1)_(817+1_?)dup", + ), + ( + "NC_000009.11:g.(?_108337304)_(108337428_?)del", + "NM_001079802.1:n.(?_207)_(321+10_?)del", + "NM_001079802.1:c.(?_-10)_(105+10_?)del", + ), + ] + + for hgvs_g, hgvs_n, hgvs_c in data: + var_g = self.hp.parse(hgvs_g) + self.assertEqual(hgvs_g, str(var_g)) + acc = hgvs_c.split(":")[0] + var_n = self.vm.g_to_n(var_g, acc) + self.assertEqual(hgvs_n, str(var_n)) + var_c = self.vm.g_to_c(var_g, acc) + self.assertEqual(hgvs_c, str(var_c)) + + @parameterized.parameterized.expand( + [ + ( + 11692, + "DEL", + "NC_000023.11:g.(133661675_133661730)_(133661850_133661926)del", + "NC_000023.11:g.(?_133661730)_(133661850_?)del", + "NM_004484.3:c.(1293_1293)-76_(1413_1413)del", + "NM_004484.3:c.(?_1293)_(1413_?)del", + ), + ( + 31562, + "DEL", + "NC_000007.14:g.(16361566_16366648)_(16369693_16391969)del", + "NC_000007.14:g.(?_16366648)_(16369693_?)del", + "NM_001101426.3:c.(535_684)+6399_(535_684)+14526del", + "NM_001101426.3:c.(?_684+6399)_(684+9444_?)del", + ), + ( + 425669, + "DEL", + "NC_000002.12:g.(?_202376935)_(202377551_202464808)del", + "NC_000002.12:g.(?_202376935)_(202377551_?)del", + "NM_001204.6:c.(?_-540)_(76+1_77-1)del", + "NM_001204.6:c.(?_-540)_(76+1_?)del", + ), + ( + 425698, + "DEL", + "NC_000002.12:g.(202377551_202464808)_(202559947_?)del", + "NC_000002.12:g.(?_202464808)_(202559947_?)del", + "NM_001204.6:c.(76+1_77-1)_(*1_?)del", + "NM_001204.6:c.(?_77-1)_(*1_?)del", + ), + ( + 220591, + "DEL", + "NC_000017.11:g.(?_58709859)_(58734342_?)del", + "NC_000017.11:g.(?_58709859)_(58734342_?)del", + "NM_058216.2:c.706-?_*120del", + "NM_058216.2:c.(?_706)_(*120_?)del", + ), + ( + 251062, + "DUP", + "NC_000019.9:g.(11211022_11213339)_(11217364_11218067)dup", + "NC_000019.9:g.(?_11213339)_(11217364_?)dup", + "NM_000527.5:c.(190+1_191-1)_(817+1_818-1)dup", + "NM_000527.5:c.(?_191-1)_(817+1_?)dup", + ), + ( + 565301, + "DUP", + "NC_000001.11:g.(216073301_216078088)_(216327655_216364952)dup", + "NC_000001.11:g.(?_216078088)_(216327655_?)dup", + "NM_206933.2:c.(784+1_785-1)_(5572+1_5573-1)dup", + "NM_206933.2:c.(?_785-1)_(5572+1_?)dup", + ), + ( + 254064, + "DUP", + "NC_000012.11:g.(?_133248801)_(133257865_?)dup", + "NC_000012.11:g.(?_133248801)_(133257865_?)dup", + "NM_006231.3:c.63-?_1794+?dup1732", + "NM_006231.3:c.(?_63)_(1794_?)dup", + ), + ( + 237630, + "DUP", + "NC_000017.10:g.(?_15133094)_(15164078_?)dup", + "NC_000017.10:g.(?_15133094)_(15164078_?)dup", + "NM_000304.3:c.-34-?_*1140dup1657", + "NM_000304.3:c.(?_-34)_(*1140_?)dup", + ), + ] + ) + def test_clinvar_uncertain_ranges( + self, + clinvar_id, + event_type, + clinvar_hgvs_g, + hgvs_hgvs_g, + clinvar_hgvs_c, + hgvs_hgvs_c, + ): + """This is a unit test for the clinvar uncertain ranges described in + issue #225: https://github.com/biocommons/hgvs/issues/225. + + This test goes in a loop -> uncertain hgvs_g -> hgvs_c -> hgvs_g. + As part of this loop we lose information about the outer confidence interval, but we retain the inner confidence internval. + That's why the hgvs_g_hgvs_g value contains only the inner interval. + """ + + var_g = self.hp.parse(clinvar_hgvs_g) + self.assertEqual(clinvar_hgvs_g, str(var_g)) + + assert not var_g.posedit.pos.uncertain + assert var_g.posedit.pos.start.uncertain + + chrom_ac = var_g.ac + tx_ac = clinvar_hgvs_c.split(":")[0] + var_c = self.vm.g_to_c(var_g, tx_ac) + self.assertEqual(hgvs_hgvs_c, str(var_c)) + + # the start/stop positions are uncertain, but the whole range is not: + assert not var_c.posedit.pos.uncertain + assert var_c.posedit.pos.start.uncertain + assert var_c.posedit.pos.end.uncertain + + var_g_reverse = self.vm.c_to_g(var_c, chrom_ac) + self.assertEqual(hgvs_hgvs_g, str(var_g_reverse)) if __name__ == "__main__":