def __getitem__(self, k):
        """get TranslationAnnotSlice for coordinates given by slice k """
        start = k.start                 # deal with [:stop] slices
        if start is None:
            start = self.start
        stop = k.stop                   # deal with [start:] slices
        if stop is None:
            stop = self.stop

        annoID = self._get_anno_id(start)
        a = self.db.annodb[annoID] # get TranslationAnnot object
        s = a.sequence # corresponding nucleotide region

        return a[(start - s.start) / 3: (stop - s.start) / 3]
dataset/ETHPy150Open cjlee112/pygr/pygr/translationDB.py/SeqTranslator.__getitem__/original