def g_to_n(self, var_g, tx_ac, alt_aln_method=hgvs.global_config.mapping.alt_aln_method):
if not (var_g.type == "<STR_LIT:g>"):<EOL><INDENT>raise HGVSInvalidVariantError("<STR_LIT>" + str(var_g))<EOL><DEDENT>if self._validator:<EOL><INDENT>self._validator.validate(var_g)<EOL><DEDENT>var_g.fill_ref(self.hdp)<EOL>tm = self._fetch_AlignmentMapper(<EOL>tx_ac=tx_ac, alt_ac=var_g.ac, alt_aln_method=alt_aln_method)<EOL>pos_n = tm.g_to_n(var_g.posedit.pos)<EOL>if not pos_n.uncertain:<EOL><INDENT>edit_n = self._convert_edit_check_strand(tm.strand, var_g.posedit.edit)<EOL>if edit_n.type == '<STR_LIT>' and pos_n.start.offset == <NUM_LIT:0> and pos_n.end.offset == <NUM_LIT:0> and pos_n.end - pos_n.start > <NUM_LIT:1>:<EOL><INDENT>pos_n.start.base += <NUM_LIT:1><EOL>pos_n.end.base -= <NUM_LIT:1><EOL>edit_n.ref = '<STR_LIT>'<EOL><DEDENT><DEDENT>else:<EOL><INDENT>pos_g = tm.n_to_g(pos_n)<EOL>edit_n = hgvs.edit.NARefAlt(<EOL>ref='<STR_LIT>', alt=self._get_altered_sequence(tm.strand, pos_g, var_g))<EOL><DEDENT>pos_n.uncertain = var_g.posedit.pos.uncertain<EOL>var_n = hgvs.sequencevariant.SequenceVariant(<EOL>ac=tx_ac, type="<STR_LIT:n>", posedit=hgvs.posedit.PosEdit(pos_n, edit_n))<EOL>if self.replace_reference:<EOL><INDENT>self._replace_reference(var_n)<EOL><DEDENT>if self.add_gene_symbol:<EOL><INDENT>self._update_gene_symbol(var_n, var_g.gene)<EOL><DEDENT>return var_n<EOL>
Given a parsed g. variant, return a n. variant on the specified
        transcript using the specified alignment method (default is
        "splign" from NCBI).

        :param hgvs.sequencevariant.SequenceVariant var_g: a variant object
        :param str tx_ac: a transcript accession (e.g., NM_012345.6 or ENST012345678)
        :param str alt_aln_method: the alignment method; valid values depend on data source
        :returns: variant object (:class:`hgvs.sequencevariant.SequenceVariant`) using transcript (n.) coordinates
        :raises HGVSInvalidVariantError: if var_g is not of type "g"