Skip to content

Commit

Permalink
Corrected max-score-bound (+1) affecting cases where the sequences ar…
Browse files Browse the repository at this point in the history
…e very long and completely different (e.g., C -> AA...AA)
  • Loading branch information
smarco committed Aug 10, 2022
1 parent a08c498 commit 3b21505
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions wavefront/wavefront_components.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ void wavefront_components_dimensions_edit(
if (wf_components->memory_modular) {
*num_wavefronts = 2;
} else {
*num_wavefronts = MAX(max_pattern_length,max_text_length);
*num_wavefronts = MAX(max_pattern_length,max_text_length) + 1;
}
}
void wavefront_components_dimensions_linear(
Expand All @@ -74,7 +74,7 @@ void wavefront_components_dimensions_linear(
const int abs_seq_diff = ABS(max_pattern_length-max_text_length);
const int max_score_misms = MIN(max_pattern_length,max_text_length) * penalties->mismatch;
const int max_score_indel = penalties->gap_opening1 * abs_seq_diff;
*num_wavefronts = max_score_misms + max_score_indel;
*num_wavefronts = max_score_misms + max_score_indel + 1;
}
}
void wavefront_components_dimensions_affine(
Expand All @@ -94,7 +94,7 @@ void wavefront_components_dimensions_affine(
const int abs_seq_diff = ABS(max_pattern_length-max_text_length);
const int max_score_misms = MIN(max_pattern_length,max_text_length) * penalties->mismatch;
const int max_score_indel = penalties->gap_opening1 + abs_seq_diff * penalties->gap_extension1;
*num_wavefronts = max_score_misms + max_score_indel;
*num_wavefronts = max_score_misms + max_score_indel + 1;
}
}
void wavefront_components_dimensions_affine2p(
Expand All @@ -118,7 +118,7 @@ void wavefront_components_dimensions_affine2p(
const int max_score_indel1 = penalties->gap_opening1 + abs_seq_diff * penalties->gap_extension1;
const int max_score_indel2 = penalties->gap_opening2 + abs_seq_diff * penalties->gap_extension2;
const int max_score_indel = MIN(max_score_indel1,max_score_indel2);
*num_wavefronts = max_score_misms + max_score_indel;
*num_wavefronts = max_score_misms + max_score_indel + 1;
}
}
void wavefront_components_dimensions(
Expand Down
2 changes: 1 addition & 1 deletion wavefront/wavefront_unialign.c
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ bool wavefront_unialign_reached_limits(
// Global probing interval
alignment_system_t* const system = &wf_aligner->system;
if (score % system->probe_interval_global != 0) return false; // Continue
if (system->verbose >= 1) {
if (system->verbose >= 3) {
wavefront_unialign_print_status(stderr,wf_aligner,score); // DEBUG
}
// BT-Buffer
Expand Down

0 comments on commit 3b21505

Please sign in to comment.