def markCodons(self, mode="case"):
        for identifier, m in self.mMali.items():
            s = m.mString
            if len(s) % 3 != 0:
                raise "sequence %s not divisible by 3" % (m.mId)

            is_upper = True
            sequence = []
            for x in range(0, len(s), 3):
                if is_upper:
                    sequence.append(s[x:x + 3].upper())
                    is_upper = False
                else:
                    sequence.append(s[x:x + 3].lower())
                    is_upper = True

            m.mString = "".join(sequence)
mark codons.
dataset/ETHPy150Open CGATOxford/cgat/CGAT/Mali.py/Mali.markCodons