Skip to content

Commit

Permalink
feat: bring back short sequence branch in alignment
Browse files Browse the repository at this point in the history
Let's use `kmer_length` instead of removed `seed_length` and adjust the coefficient to roughly match the old value.
  • Loading branch information
ivan-aksamentov committed Oct 12, 2023
1 parent 6ed138e commit 9892aae
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions packages_rs/nextclade/src/align/align.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ pub fn align_nuc(
);
}

// if ref_len + qry_len < (10 * params.seed_length) {
// // for very short sequences, use full square
// let stripes = full_matrix(ref_len, qry_len);
// trace!("When processing sequence #{index} '{seq_name}': In nucleotide alignment: Band construction: short sequences, using full matrix");
// return Ok(align_pairwise(qry_seq, ref_seq, gap_open_close, params, &stripes));
// }
if ref_len + qry_len < (20 * params.kmer_length) {
// for very short sequences, use full square
let stripes = full_matrix(ref_len, qry_len);
trace!("When processing sequence #{index} '{seq_name}': In nucleotide alignment: Band construction: short sequences, using full matrix");
return Ok(align_pairwise(qry_seq, ref_seq, gap_open_close, params, &stripes));
}

// otherwise, determine seed matches roughly regularly spaced along the query sequence
let SeedMatchesResult {
Expand Down

0 comments on commit 9892aae

Please sign in to comment.