From e285a89362937c8b62428c2f4ff1a1beb5ad2c47 Mon Sep 17 00:00:00 2001 From: John Lees Date: Thu, 12 Oct 2023 14:52:17 +0100 Subject: [PATCH] Fix for multi-contig references in map Short contigs may be skipped entirely due to no matches, so need to keep advancing writer --- src/ska_ref/aln_writer.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ska_ref/aln_writer.rs b/src/ska_ref/aln_writer.rs index 7227fb4..1a8afb2 100644 --- a/src/ska_ref/aln_writer.rs +++ b/src/ska_ref/aln_writer.rs @@ -122,7 +122,7 @@ impl<'a> AlnWriter<'a> { /// Call in a loop over mapped positions, usually excluding '-' base which /// haven't actually been mapped pub fn write_split_kmer(&mut self, mapped_pos: usize, mapped_chrom: usize, base: u8) { - if mapped_chrom > self.curr_chrom { + while mapped_chrom > self.curr_chrom { self.fill_contig(); } // Ambiguous bases may clash with the flanks, which are copied from