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


import itertools
import re
import unittest
import hgvs.dataproviders.uta
import hgvs.edit
import hgvs.parser
import hgvs.sequencevariant
import hgvs.variantmapper
from hgvs.exceptions import HGVSDataNotAvailableError
from six.moves import map
            self.last_line = line
            yield line


class CrossChecker(object):
    """base class for testing a group of related variants.  Checks all reasonable combinations of
    g <-> t --> p

    """

    def crosscheck_variant_group(self, variants):
        """crosscheck a group of variants; returns None if successful, otherwise a message"""

        assert all(isinstance(v, hgvs.sequencevariant.SequenceVariant) for v in variants)

        variants = sorted(variants, key=lambda v: v.type)
        binned_variants = {k: [] for k in "cgmnrp"}
        binned_variants.update(
            {g: list(gi)
             for g, gi in itertools.groupby(variants, lambda v: v.type)})
        binned_variants["t"] = binned_variants["c"] + binned_variants["n"]

        assert len(binned_variants["g"]) == len(
            [v.ac for v in binned_variants["g"]]), "variants have multiple alignments"

        # g -> t: for each g., map to each transcript accession.
        for g_var in binned_variants["g"]:
            for t_var in binned_variants["t"]:
                try:
                    r = self.vm.g_to_t(g_var, t_var.ac)

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


# Path: tests/support/crosschecker.py
import itertools
import re
import unittest
import hgvs.dataproviders.uta
import hgvs.edit
import hgvs.parser
import hgvs.sequencevariant
import hgvs.variantmapper
from hgvs.exceptions import HGVSDataNotAvailableError
from six.moves import map

            self.last_line = line
            yield line


class CrossChecker(object):
    """base class for testing a group of related variants.  Checks all reasonable combinations of
    g <-> t --> p

    """

    def crosscheck_variant_group(self, variants):
        """crosscheck a group of variants; returns None if successful, otherwise a message"""

        assert all(isinstance(v, hgvs.sequencevariant.SequenceVariant) for v in variants)

        variants = sorted(variants, key=lambda v: v.type)
        binned_variants = {k: [] for k in "cgmnrp"}
        binned_variants.update(
            {g: list(gi)
             for g, gi in itertools.groupby(variants, lambda v: v.type)})
        binned_variants["t"] = binned_variants["c"] + binned_variants["n"]

        assert len(binned_variants["g"]) == len(
            [v.ac for v in binned_variants["g"]]), "variants have multiple alignments"

        # g -> t: for each g., map to each transcript accession.
        for g_var in binned_variants["g"]:
            for t_var in binned_variants["t"]:
                try:
                    r = self.vm.g_to_t(g_var, t_var.ac)

                except HGVSDataNotAvailableError: