def _get_variant_region(self):
        """Categorize variant by location in transcript (5'utr, exon, intron, 3'utr)

        :return "exon", "intron", "five_utr", "three_utr", "whole_gene"
        :rtype str
        """
        if self._var_c.posedit.pos.start.datum == Datum.CDS_END and self._var_c.posedit.pos.end.datum == Datum.CDS_END:
            result = self.T_UTR
        elif self._var_c.posedit.pos.start.base < 0 and self._var_c.posedit.pos.end.base < 0:
            result = self.F_UTR
        elif self._var_c.posedit.pos.start.base < 0 and self._var_c.posedit.pos.end.datum == Datum.CDS_END:
            result = self.WHOLE_GENE
        elif self._var_c.posedit.pos.start.offset != 0 or self._var_c.posedit.pos.end.offset != 0:
            # leave out anything intronic for now
            result = self.INTRON
        else:    # anything else that contains an exon
            result = self.EXON
        return result
def _get_variant_region ( self ) : if self . _var_c . posedit . pos . start . datum == Datum . CDS_END and self . _var_c . posedit . pos . end . datum == Datum . CDS_END : result = self . T_UTR elif self . _var_c . posedit . pos . start . base < 0 and self . _var_c . posedit . pos . end . base < 0 : result = self . F_UTR elif self . _var_c . posedit . pos . start . base < 0 and self . _var_c . posedit . pos . end . datum == Datum . CDS_END : result = self . WHOLE_GENE elif self . _var_c . posedit . pos . start . offset != 0 or self . _var_c . posedit . pos . end . offset != 0 : result = self . INTRON else : result = self . EXON return result
Categorize variant by location in transcript (5'utr, exon, intron, 3'utr)

        :return "exon", "intron", "five_utr", "three_utr", "whole_gene"
        :rtype str