def threadSequence(self, new_sequence, map_old2new):

        s = list(self.mString)
        c = 0
        for x in range(len(s)):
            m = map_old2new.mapRowToCol(c)
            if m >= 0:
                s[c] = new_sequence[m]
            else:
                s[c] = self.mGapChar
            if s[c] not in self.mGapChars:
                c += 1

        self.mString = "".join(s)
thread a new sequence onto this sequence replacing
dataset/ETHPy150Open CGATOxford/cgat/CGAT/Mali.py/AlignedString.threadSequence