-
Notifications
You must be signed in to change notification settings - Fork 66
Open
Labels
good first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is neededneeds triageMark for review and label assignmentMark for review and label assignmentt:bugType: bug, error, something isn't workingType: bug, error, something isn't working
Description
Hello! Reporting a small potential bug that I ran into while using Nextalign on another project.
In my case the code was slightly different, but I believe that the issue could be reproduced by performing a banded alignment of these two sequences
let ref_str = "------------------------------TTGGCCCCGGTGCTGTCCGTCAACACGTCGTCGTCCGGCGACCTACCTGGTCTCAAAGGAGGTTTTGTTAAATGAATTAGATGGGTAAGGTTACCACGTCAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
let qry_str = "GGGGGGGGGGGGGGGGGGGGGGGGGGGGGGTTGGCCCCGGTGCTGTCCGTCAACACGTCGTCGTCCGGCGACCTACCTGGTCTCAAAGGAGGTTTTGTTAAATGAATTAGATGGGTAAGGTTACCACGTCA------------------------------";
with band shift = -30 and band width = 1, with a simple stripe alignment (e.g. using align_aa, interpreting them as amino-acid alignments) results in a hit_boundary warning.
let qry_str = qry_str.replace('-', "");
let ref_str = ref_str.replace('-', "");
let qry_seq = to_aa_seq(&qry_str).unwrap();
let ref_seq = to_aa_seq(&ref_str).unwrap();
let gap_open_close = get_gap_open_close_scores_flat(&ref_seq, ¶ms);
let band_width = 1;
let shift = -30;
let alignment = align_aa(&qry_seq, &ref_seq, &gap_open_close, band_width, shift, ¶ms).unwrap();
assert!(!alignment.hit_boundary);
It might be desirable to avoid this, and not consider trailing indels as a boundary hit. If so, in my case this was solved by applying the following changes to the score_matrix function.
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomershelp wantedExtra attention is neededExtra attention is neededneeds triageMark for review and label assignmentMark for review and label assignmentt:bugType: bug, error, something isn't workingType: bug, error, something isn't working