Commit 8a9a2023 authored by Mikaël Salson's avatar Mikaël Salson

automaton.hpp: Copy information when defining new defining new final states

When finalising the automaton we can define new final states that
actually are a “copy” of another final state. In such a case we
also need to copy the Info that are in that former final state.

Added a test to check that.
The test uses a IGKJ sequence: thus all the kmers should be +k
or (potentially undetermined).

Fix #4225
parent b7362fd0
......@@ -135,8 +135,10 @@ void PointerACAutomaton<Info>::build_failure_functions() {
current_state = couple.first;
pointer_state<Info> *failed_state = couple.second;
if (failed_state->is_final)
if (failed_state->is_final) {
current_state->is_final = true;
current_state->informations = failed_state->informations;
for (size_t i = 0; i < NB_TRANSITIONS; i++) {
if (current_state->transitions[i] != NULL) {
q.push(pair<pointer_state<Info>*, pointer_state<Info>*>(current_state->transitions[i],
!LAUNCH: $VIDJIL_DIR/$EXEC -g $VIDJIL_DIR/germline -r 1 -1 -2 -K bug4225-j.fa
!OUTPUT_FILE: out/bug4225-j.affects
$ Find only +k and ? affects before the stretch of _ for all loci
16: seed .*(\+k| \?){28}( _)+$
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment