Sept. 7, 2015, 4:12 p.m. by Rosalind Team
We will use 2-Break(1, 6, 3, 8) two denote the 2-break replacing colored edges (1, 6) and (3, 8) in a genome graph with two new colored edges (1, 3) and (6, 8). Note that the order of the nodes in this function matter, since the operation 2-Break(1, 6, 8, 3) would represent a different 2-break that replaces (1, 6) and (3, 8) with (1, 8) and (6, 3).
The following pseudocode describes how 2-Break(i, i′, j, j′) transforms a genome graph.
Solve the 2-Break On Genome Graph Problem.
Given: The colored edges of a genome graph GenomeGraph, followed by indices i, i', j, and j'.
Return: The colored edges of the genome graph resulting from applying the 2-break operation.
(2, 4), (3, 8), (7, 5), (6, 1) 1, 6, 3, 8
(2, 4), (3, 1), (7, 5), (6, 8)