From 3daea1bebafa3ac61657711cd57270fcbb4dd672 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tommi=20M=C3=A4klin?= Date: Mon, 4 Nov 2024 16:09:08 +0200 Subject: [PATCH] Use the new RLE return type in find. --- src/cli/main.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/cli/main.rs b/src/cli/main.rs index d9027aa..2e5fb38 100644 --- a/src/cli/main.rs +++ b/src/cli/main.rs @@ -187,10 +187,16 @@ fn main() { let seq = seqrec.normalize(true); // Get local alignments for forward strand - res = kbo::find(&seq, &sbwt, &lcs, derand_opts.clone()).iter().map(|x| (x.0, x.1, '+', x.2 + x.3, x.3, ref_contig.clone(), query_contig.to_string().clone())).collect(); + res = kbo::find(&seq, &sbwt, &lcs, derand_opts.clone()) + .iter() + .map(|x| (x.start, x.end, '+', x.matches + x.mismatches + x.jumps + x.gap_bases, x.mismatches, + ref_contig.clone(), query_contig.to_string().clone())).collect(); // Add local alignments for reverse _complement - res.append(&mut kbo::find(&seq.reverse_complement(), &sbwt, &lcs, derand_opts.clone()).iter().map(|x| (x.0, x.1, '-', x.2 + x.3, x.3, ref_contig.clone(), query_contig.to_string().clone())).collect()); + res.append(&mut kbo::find(&seq.reverse_complement(), &sbwt, &lcs, derand_opts.clone()) + .iter() + .map(|x| (x.start, x.end, '+', x.matches + x.mismatches + x.jumps + x.gap_bases, x.mismatches, + ref_contig.clone(), query_contig.to_string().clone())).collect()); } res }).flatten().collect();