This avoids merging the same node multiple times, thus avoiding generating invalid unchopped graphs.
bug.gfa
H VN:Z:1.0
S 1 C
S 2 T
L 2 - 1 + 0M
S 3 G
L 3 + 2 - 0M
P A 3+,2-,1+ *
odgi unchop -i bug.gfa -o - | odgi view -i - -g
[odgi::algorithms::unchop] failure in unchop
>expected_A
GAC
>got_A
GACC
H VN:Z:1.0
S 1 CC
S 2 T
L 2 - 1 + 0M
S 3 G
L 3 + 2 - 0M
P A 3+,2-,1+ *
In this example, the new node 1 (CC) is generated by mistakenly merging the old node 1 (C) two times.
This avoids merging the same node multiple times, thus avoiding generating invalid unchopped graphs.
bug.gfa
In this example, the new node 1 (
CC
) is generated by mistakenly merging the old node 1 (C
) two times.