def __init__(self,<EOL>seq,<EOL>cds_start,<EOL>cds_stop,<EOL>is_frameshift,<EOL>variant_start_aa,<EOL>accession,<EOL>is_substitution=False,<EOL>is_ambiguous=False):
if len(seq) > <NUM_LIT:0>:<EOL><INDENT>if isinstance(seq, six.string_types):<EOL><INDENT>seq = list(seq)<EOL><DEDENT>seq_cds = seq[cds_start - <NUM_LIT:1>:]<EOL>if len(seq_cds) % <NUM_LIT:3> != <NUM_LIT:0>:    <EOL><INDENT>seq_cds.extend(['<STR_LIT:N>'] * ((<NUM_LIT:3> - len(seq_cds) % <NUM_LIT:3>) % <NUM_LIT:3>))<EOL><DEDENT>seq_cds = '<STR_LIT>'.join(seq_cds)<EOL>seq_aa = str(Seq(seq_cds).translate())<EOL>stop_pos = seq_aa[:(cds_stop - cds_start + <NUM_LIT:1>) // <NUM_LIT:3>].rfind("<STR_LIT:*>")<EOL>if stop_pos == -<NUM_LIT:1>:<EOL><INDENT>stop_pos = seq_aa.find("<STR_LIT:*>")<EOL><DEDENT>if stop_pos != -<NUM_LIT:1>:<EOL><INDENT>seq_aa = seq_aa[:stop_pos + <NUM_LIT:1>]<EOL><DEDENT><DEDENT>else:<EOL><INDENT>seq_aa = []<EOL><DEDENT>self.transcript_sequence = '<STR_LIT>'.join(seq)<EOL>self.aa_sequence = seq_aa<EOL>self.cds_start = cds_start<EOL>self.cds_stop = cds_stop<EOL>self.protein_accession = accession<EOL>self.is_frameshift = is_frameshift<EOL>self.variant_start_aa = variant_start_aa<EOL>self.frameshift_start = None<EOL>self.is_substitution = is_substitution<EOL>self.is_ambiguous = is_ambiguous<EOL>
Create a variant sequence using inputs from VariantInserter
        :param seq: DNA sequence wiith variant incorporated
        :type seq: str or list
        :param cds_start: coding sequence start (1-based)
        :type cds_start: int
        :param cds_stop: coding sequence stop (1-based)
        :type cds_stop: int
        :param protein_accession: protein accession, e.g. NP_999999.2
        :type protein_accession: str
        :param is_frameshift: is this variant a frameshift
        :type is_frameshift: bool
        :param variant_start_aa: AA start index (1-based) for this variant
        :type variant_start_aa: int
        :param is_substitution: flag if this is a substitution AA variant
        :type is_substitution: bool
        :param is_ambiguous: flag if variant is "?"
        :type is_ambiguous: bool
        :return variant sequence data
        :rtype attrs