message: chore: trace if full matrix used, allow width up to 3*max_indel
diff: +use crate::align::band_2d::full_matrix;
  use crate::align::band_2d::{simple_stripes, Stripe};
  use crate::align::params::AlignPairwiseParams;
  use crate::align::seed_match::seed_match;
  -use crate::align::band_2d::full_matrix;
  use crate::io::letter::Letter;
  use crate::make_error;
  use eyre::Report;
  -use log::warn;
  +use log::{trace, warn};
  use num_traits::{clamp, clamp_max, clamp_min};
  -
  /// generate a vector of query sequence positions that are followed by at least `seed_length`
  /// valid characters. Positions in this vector are thus "good" positions to start a query k-mer.
  fn get_map_to_good_positions<L: Letter<L>>(qry_seq: &[L], seed_length: usize) -> Vec<usize> {
  @@ -143,6 +142,7 @@ pub fn seed_alignment<L: Letter<L>>(
  // for very short sequences, use full square
  if ref_len_u + qry_len_u < (5 * params.seed_length) {
  let stripes = full_matrix(ref_len_u, qry_len_u);
  + trace!("Band construction: Short qry&ref sequence (< 5*seed_length), thus using full matrix");
  return Ok(stripes);
  };
  @@ -160,7 +160,7 @@ pub fn seed_alignment<L: Letter<L>>(
  ref_len_i,
  params.terminal_bandwidth,
  params.excess_bandwidth,
  - params.max_indel
  + params.max_indel,
  );
  stripes
  @@ -174,7 +174,7 @@ pub fn create_stripes(
  ref_len: i32,
  terminal_bandwidth: i32,
  excess_bandwidth: i32,
  - max_indel: usize
  + max_indel: usize,
  ) -> Result<Vec<Stripe>, Report> {
  let mut seed_matches = seed_matches.to_vec();
  @@ -208,7 +208,8 @@ pub fn create_stripes(
  let min = slice.iter().min().unwrap();
  let max = slice.iter().max().unwrap();
  let width = max - min;
  - if width as usize> max_indel {
  + // Prevent huge widths, which would require massive amount of memory
  + if width as usize > 3 * max_indel {
  return make_error!("Unable to align: seed matches suggest large indels or are ambiguous due to duplications.");
  }
  robust_shifts.push((min, max));
  @@ -317,7 +318,14 @@ mod tests {
  let qry_len = 30;
  let ref_len = 40;
  - let result = create_stripes(&seed_matches, qry_len, ref_len, terminal_bandwidth, excess_bandwidth, max_indel);
  + let result = create_stripes(
  + &seed_matches,
  + qry_len,
  + ref_len,
  + terminal_bandwidth,
  + excess_bandwidth,
  + max_indel,
  + );
  println!("{:?}", result);
  