<commit_before># -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals

import unittest

from nose.plugins.attrib import attr

from hgvs.exceptions import HGVSUnsupportedOperationError
import hgvs.dataproviders.uta
import hgvs.parser
import hgvs.variantmapper


@attr(tags=["fx"])
class Test_VariantLengths(unittest.TestCase):
    """test length_change method for all variant types and cases"""

    success_tests = [
        # class AAExt(Edit, recordtype.recordtype('AAExt', [('ref', None), ('alt', None), ('aaterm', None), ('length', None),
        ("NP_000040.1:p.Ter314Trpext*45", 45),
        ("NP_000040.1:p.Met1ext-12", 12),

        # class AAFs(Edit, recordtype.recordtype('AAFs', [('ref', None), ('alt', None), ('length', None), ('uncertain', False)])):
        # UNSUPPORTED: ("NP_000001.1:p.Gly25Trpfs*10", ),   # requires seq fetch for length :-(

        # class AARefAlt(Edit, recordtype.recordtype('AARefAlt', [('ref', None), ('alt', None), ('uncertain', False)])):
        ("NP_006149.2:p.(Glu396delinsLysLys)", 1),   # NM_006158.3:c.1186delGinsAAAA
        ("NP_006149.2:p.(Glu397del)", -1),  # NM_006158.3:n.1288_1290delGAG
        ("NP_006149.2:p.(Glu397dup)", 1),  # NM_006158.3:n.1288_1290delGAGinsGAGGAG

        # class AASub(AARefAlt):
        ("NP_006149.2:p.(Glu396Lys)", 0),  # NM_006158.3:c.1186delGinsA

        # class Conv(Edit, recordtype.recordtype('Conv', [('from_ac', None), ('from_type', None), ('from_pos', None),
        # UNSUPPORTED

        # class Dup(Edit, recordtype.recordtype('Dup', [('ref', None), ('uncertain', False)])):
        ("NM_006158.3:n.1291_1293dup", 3),
        ("NM_006158.3:n.1291_1293dupGAG", 3),
        
        # class Inv(Edit, recordtype.recordtype('Inv', [('ref', None), ('uncertain', False)])):
        ("NM_006158.3:n.1291_1293inv", 0),

        # class NACopy(Edit, recordtype.recordtype('NACopy', ['copy', ('uncertain', False)])):
        ("NC_000014.8:g.88401076_88459508copy4", (88459508-88401076+1) * 4),

        # class NADupN(Edit, recordtype.recordtype('NADupN', ['n', ('uncertain', False)])):
        ("NM_015702.2:c.307_324dup18", (324-307+1) * 18),

        # class    NARefAlt(Edit, recordtype.recordtype('NARefAlt', [('ref', None), ('alt', None), ('uncertain', False)])):
        ("NM_000314.4:c.706G>T", 0),
        ("NM_000314.4:c.706delG", -1),
        ("NM_000314.4:c.706delGinsT", 0),
        ("NM_000314.4:c.706_708del", -3),
        ("NM_000314.4:c.706_706delG", -1),<commit_msg>Remove NADupN from tests<commit_after># -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals

import unittest

from nose.plugins.attrib import attr

from hgvs.exceptions import HGVSUnsupportedOperationError
import hgvs.dataproviders.uta
import hgvs.parser
import hgvs.variantmapper


@attr(tags=["fx"])
class Test_VariantLengths(unittest.TestCase):
    """test length_change method for all variant types and cases"""

    success_tests = [
        # class AAExt(Edit, recordtype.recordtype('AAExt', [('ref', None), ('alt', None), ('aaterm', None), ('length', None),
        ("NP_000040.1:p.Ter314Trpext*45", 45),
        ("NP_000040.1:p.Met1ext-12", 12),

        # class AAFs(Edit, recordtype.recordtype('AAFs', [('ref', None), ('alt', None), ('length', None), ('uncertain', False)])):
        # UNSUPPORTED: ("NP_000001.1:p.Gly25Trpfs*10", ),   # requires seq fetch for length :-(

        # class AARefAlt(Edit, recordtype.recordtype('AARefAlt', [('ref', None), ('alt', None), ('uncertain', False)])):
        ("NP_006149.2:p.(Glu396delinsLysLys)", 1),   # NM_006158.3:c.1186delGinsAAAA
        ("NP_006149.2:p.(Glu397del)", -1),  # NM_006158.3:n.1288_1290delGAG
        ("NP_006149.2:p.(Glu397dup)", 1),  # NM_006158.3:n.1288_1290delGAGinsGAGGAG

        # class AASub(AARefAlt):
        ("NP_006149.2:p.(Glu396Lys)", 0),  # NM_006158.3:c.1186delGinsA

        # class Conv(Edit, recordtype.recordtype('Conv', [('from_ac', None), ('from_type', None), ('from_pos', None),
        # UNSUPPORTED

        # class Dup(Edit, recordtype.recordtype('Dup', [('ref', None), ('uncertain', False)])):
        ("NM_006158.3:n.1291_1293dup", 3),
        ("NM_006158.3:n.1291_1293dupGAG", 3),
        
        # class Inv(Edit, recordtype.recordtype('Inv', [('ref', None), ('uncertain', False)])):
        ("NM_006158.3:n.1291_1293inv", 0),

        # class NACopy(Edit, recordtype.recordtype('NACopy', ['copy', ('uncertain', False)])):
        ("NC_000014.8:g.88401076_88459508copy4", (88459508-88401076+1) * 4),

        # class    NARefAlt(Edit, recordtype.recordtype('NARefAlt', [('ref', None), ('alt', None), ('uncertain', False)])):
        ("NM_000314.4:c.706G>T", 0),
        ("NM_000314.4:c.706delG", -1),
        ("NM_000314.4:c.706delGinsT", 0),
        ("NM_000314.4:c.706_708del", -3),
        ("NM_000314.4:c.706_706delG", -1),
{'fraction_non_alphanumeric': 0.19425193640440278, 'fraction_numerical': 0.1210762331838565, 'mean_word_length': 3.8202357563850686, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7470265', 'n_tokens_mistral': 2241, 'n_tokens_neox': 1832, 'n_words': 317}