Find a shortest transformation of one genome into another by 2-breaks.

Assignment

Add a method transformation to the class BreakpointGraph. The method takes no arguments and must return an iterator that yields a sequence of 2-breaks corresponding to a shortest transformation of genome $$P$$ to genome $$Q$$ by 2-breaks. Each breakpoint is represented as a tuple $$(i, j, k, l)$$.

Example

>>> red_genome = Genome(Chromosome(+1, -2, -3, +4))
>>> blue_genome = Genome(Chromosome(+1, +2, -4, -3))
>>> tuple(BreakpointGraph(red_genome, blue_genome).transformation())
((4, 2, 8, 1), (7, 5, 6, 3), (2, 1, 3, 5))