cadnano.strandset.splitcmd module

class SplitCommand(strand, base_idx, update_sequence=True)

Bases: cadnano.undocommand.UndoCommand

The SplitCommand takes as input a strand and “splits” the strand in two, such that one new strand 3’ end is at base_idx, and the other new strand 5’ end is at base_idx +/- 1 (depending on the direction of the strands).

Under the hood: On redo, this command actually is creates two new copies of the original strand, resizes each and modifies their connections. On undo, the new copies are removed and the original is restored.

redo()
undo()