# Path: hgvs/exceptions.py
# class HGVSError(Exception):
#     pass
# 
# class HGVSDataNotAvailableError(HGVSError):
#     pass
# 
# class HGVSParseError(HGVSError):
#     pass
# 
# class HGVSInvalidVariantError(HGVSError):
#     """Exception raised when variant is inconsistent or invalid"""
#     pass
# 
# Path: hgvs/enums.py



import logging
import pprint
import re
import sys
import os
import unittest
import pytest
import hgvs.assemblymapper
import hgvs.dataproviders.uta
import hgvs.normalizer
import hgvs.parser
import hgvs.sequencevariant
import hgvs.alignmentmapper
import hgvs.validator
import hgvs.variantmapper
from hgvs.exceptions import HGVSError, HGVSDataNotAvailableError, HGVSParseError, HGVSInvalidVariantError
from hgvs.enums import Datum
from support import CACHE
        # hgvs-346: verify that alignment data covers full-length transcript
        with self.assertRaises(HGVSDataNotAvailableError):
            hgvs.alignmentmapper.AlignmentMapper(
                self.hdp, tx_ac="NM_001290223.1", alt_ac="NC_000010.10", alt_aln_method="splign")

    def test_349_incorrect_normalization_insGG_to_dup2(self):
        # With dupN support, NM_005877.4:c.1104_1105insGG would
        # normalize to NM_005877.4:c.1104_1105dup2 (which is
        # different).
        original_var = "NM_005877.4:c.1104_1105insGG"
        self.assertEqual(original_var, str(
            self.hn.normalize(self.hp.parse_c_variant(original_var))))

    def test_379_move_replace_reference_to_variantmapper(self):
        # replace_reference code was in am, not vm. That meant that using vm directly
        # resulted in variants that were not reference corrected.
        g_var = self.hp.parse_hgvs_variant("NC_000006.11:g.44275011T=")
        c_var = self.hp.parse_hgvs_variant(
            "NM_020745.3:c.1015G>A")    # correct projection with ref replacement
        self.assertEqual(c_var, self.am37.g_to_c(g_var, "NM_020745.3"))    # previously okay
        self.assertEqual(c_var, self.vm_rr.g_to_c(g_var, "NM_020745.3"))    # previously wrong

    def test_381_c_to_p_error_with_del_variants(self):
        hgvs_c = "NM_000302.3:c.1594_1596del"
        var_c = self.hp.parse_hgvs_variant(hgvs_c)
        self.am37.c_to_p(var_c)    # raises exception before fixing

    def test_393_posedit_for_unknown_p_effect(self):
        hgvs_c = "NM_001330368.1:c.641-3353C>A"
        hgvs_p = "NP_001317297.1:p.?"

# Path: hgvs/exceptions.py
# class HGVSError(Exception):
#     pass
# 
# class HGVSDataNotAvailableError(HGVSError):
#     pass
# 
# class HGVSParseError(HGVSError):
#     pass
# 
# class HGVSInvalidVariantError(HGVSError):
#     """Exception raised when variant is inconsistent or invalid"""
#     pass
# 
# Path: hgvs/enums.py



# Path: tests/test_issues_03xx.py
import logging
import pprint
import re
import sys
import os
import unittest
import pytest
import hgvs.assemblymapper
import hgvs.dataproviders.uta
import hgvs.normalizer
import hgvs.parser
import hgvs.sequencevariant
import hgvs.alignmentmapper
import hgvs.validator
import hgvs.variantmapper
from hgvs.exceptions import HGVSError, HGVSDataNotAvailableError, HGVSParseError, HGVSInvalidVariantError
from hgvs.enums import Datum
from support import CACHE

        # hgvs-346: verify that alignment data covers full-length transcript
        with self.assertRaises(HGVSDataNotAvailableError):
            hgvs.alignmentmapper.AlignmentMapper(
                self.hdp, tx_ac="NM_001290223.1", alt_ac="NC_000010.10", alt_aln_method="splign")

    def test_349_incorrect_normalization_insGG_to_dup2(self):
        # With dupN support, NM_005877.4:c.1104_1105insGG would
        # normalize to NM_005877.4:c.1104_1105dup2 (which is
        # different).
        original_var = "NM_005877.4:c.1104_1105insGG"
        self.assertEqual(original_var, str(
            self.hn.normalize(self.hp.parse_c_variant(original_var))))

    def test_379_move_replace_reference_to_variantmapper(self):
        # replace_reference code was in am, not vm. That meant that using vm directly
        # resulted in variants that were not reference corrected.
        g_var = self.hp.parse_hgvs_variant("NC_000006.11:g.44275011T=")
        c_var = self.hp.parse_hgvs_variant(
            "NM_020745.3:c.1015G>A")    # correct projection with ref replacement
        self.assertEqual(c_var, self.am37.g_to_c(g_var, "NM_020745.3"))    # previously okay
        self.assertEqual(c_var, self.vm_rr.g_to_c(g_var, "NM_020745.3"))    # previously wrong

    def test_381_c_to_p_error_with_del_variants(self):
        hgvs_c = "NM_000302.3:c.1594_1596del"
        var_c = self.hp.parse_hgvs_variant(hgvs_c)
        self.am37.c_to_p(var_c)    # raises exception before fixing

    def test_393_posedit_for_unknown_p_effect(self):
        hgvs_c = "NM_001330368.1:c.641-3353C>A"
        hgvs_p = "NP_001317297.1:p.?"

        var_c = self.hp.parse_hgvs_variant(hgvs_c)