def getParts( src ):
    '''split a wrap-around alignment'''

    result = None
    r = []
    last_s = src.getColTo()
    for p in range( src.getRowFrom(), 
                    src.getRowTo() ):
        s = src.mapRowToCol(p)
        if s < 0: continue
        if last_s >= s:
            if result:
                r.append( result )
            result = alignlib.makeAlignmentVector()
        last_s = s
        result.addPair( s, p, 0 )

    if result:
        r.append( result )
    return r
dataset/ETHPy150Open CGATOxford/cgat/obsolete/pipeline_prdm9.py/getParts/original