def convertAlignlib2Mali(mali, identifiers=None, seqs=None):
    m = Mali()

    if not identifiers:
        identifiers = ["%i" % x for x in range(mali.getNumSequences())]

    if seqs is None:
        # old style MultipleAlignment
        for x in range(mali.getNumSequences()):
            a = mali.getRow(x)
            m.addSequence(
                identifiers[x], a.getFrom(), a.getTo(), a.getString())
    else:
        import alignlib_lite
        output = alignlib_lite.py_MultAlignmentFormatPlain(mali, seqs)
        for x in range(mali.getNumSequences()):
            a = output.mData[x]
            m.addSequence(
                identifiers[x], a.getFrom(), a.getTo(), a.getString())

    return m
convert a multiple alignment into an alignlib_lite.py_multiple
dataset/ETHPy150Open CGATOxford/cgat/CGAT/Mali.py/convertAlignlib2Mali