def break_chains(df):
    """Break a non-linear alignment in linear parts"""
    dataframes = []
    last_direction = df["is_reverse"].iloc[0]
    initial_index = 0
    for index, direction in enumerate(df["is_reverse"]):
        if direction != last_direction:
            dataframes.append(df.iloc[initial_index:index])
            initial_index = index
        last_direction = direction
    else:
        dataframes.append(df.iloc[initial_index:])
    return dataframes