# Path: abstar/utils/regions.py
# IMGT_REGION_START_POSITIONS_AA = {'FR1': 1, 'CDR1': 27, 'FR2': 39, 'CDR2': 56,
#                                   'FR3': 66, 'CDR3': 105, 'FR4': 118}
# 
# IMGT_REGION_END_POSITIONS_AA = {'FR1': 26, 'CDR1': 38, 'FR2': 55, 'CDR2': 65,
#                                 'FR3': 104, 'CDR3': 117, 'FR4': 129}


import math
import re
import traceback
from abutils.utils import log
from abutils.utils.codons import codon_lookup as codons
from .regions import IMGT_REGION_START_POSITIONS_AA, IMGT_REGION_END_POSITIONS_AA
    @property
    def count(self):
        return len(self.mutations)


    def add(self, mutation):
        '''
        Add a single mutation.

        Args:

            mutation (Mutation): the Mutation object to be added
        '''
        self.mutations.append(mutation)


    def add_many(self, mutations):
        '''
        Adds multiple mutations.

        Args:

            mutation (list): an iterable of Mutation objects to be added
        '''
        self.mutations += mutations


    def in_region(self, region):
        region_mutations = []
        start = IMGT_REGION_START_POSITIONS_AA[region]

# Path: abstar/utils/regions.py
# IMGT_REGION_START_POSITIONS_AA = {'FR1': 1, 'CDR1': 27, 'FR2': 39, 'CDR2': 56,
#                                   'FR3': 66, 'CDR3': 105, 'FR4': 118}
# 
# IMGT_REGION_END_POSITIONS_AA = {'FR1': 26, 'CDR1': 38, 'FR2': 55, 'CDR2': 65,
#                                 'FR3': 104, 'CDR3': 117, 'FR4': 129}


# Path: abstar/utils/mutations.py
import math
import re
import traceback
from abutils.utils import log
from abutils.utils.codons import codon_lookup as codons
from .regions import IMGT_REGION_START_POSITIONS_AA, IMGT_REGION_END_POSITIONS_AA

    @property
    def count(self):
        return len(self.mutations)


    def add(self, mutation):
        '''
        Add a single mutation.

        Args:

            mutation (Mutation): the Mutation object to be added
        '''
        self.mutations.append(mutation)


    def add_many(self, mutations):
        '''
        Adds multiple mutations.

        Args:

            mutation (list): an iterable of Mutation objects to be added
        '''
        self.mutations += mutations


    def in_region(self, region):
        region_mutations = []
        start = IMGT_REGION_START_POSITIONS_AA[region]

        end = IMGT_REGION_END_POSITIONS_AA[region]