def _realign(seq, precursor, start):
error = set()<EOL>pattern_addition = [[<NUM_LIT:1>, <NUM_LIT:1>, <NUM_LIT:0>], [<NUM_LIT:1>, <NUM_LIT:0>, <NUM_LIT:1>], [<NUM_LIT:0>, <NUM_LIT:1>, <NUM_LIT:0>], [<NUM_LIT:0>, <NUM_LIT:1>, <NUM_LIT:1>], [<NUM_LIT:0>, <NUM_LIT:0>, <NUM_LIT:1>], [<NUM_LIT:1>, <NUM_LIT:1>, <NUM_LIT:1>]]<EOL>for pos in range(<NUM_LIT:0>, len(seq)):<EOL><INDENT>if seq[pos] != precursor[(start + pos)]:<EOL><INDENT>error.add(pos)<EOL><DEDENT><DEDENT>subs, add = [], []<EOL>for e in error:<EOL><INDENT>if e < len(seq) - <NUM_LIT:3>:<EOL><INDENT>subs.append([e, seq[e], precursor[start + e]])<EOL><DEDENT><DEDENT>pattern, error_add = [], []<EOL>for e in range(len(seq) - <NUM_LIT:3>, len(seq)):<EOL><INDENT>if e in error:<EOL><INDENT>pattern.append(<NUM_LIT:1>)<EOL>error_add.append(e)<EOL><DEDENT>else:<EOL><INDENT>pattern.append(<NUM_LIT:0>)<EOL><DEDENT><DEDENT>for p in pattern_addition:<EOL><INDENT>if pattern == p:<EOL><INDENT>add = seq[error_add[<NUM_LIT:0>]:]<EOL>break<EOL><DEDENT><DEDENT>if not add and error_add:<EOL><INDENT>for e in error_add:<EOL><INDENT>subs.append([e, seq[e], precursor[start + e]])<EOL><DEDENT><DEDENT>return subs, add<EOL>
The actual fn that will realign the sequence