From 22aeefed20cef3b18a345a35dd67568f40dd31a7 Mon Sep 17 00:00:00 2001 From: vrbouza <15350389+vrbouza@users.noreply.github.com> Date: Fri, 18 Oct 2024 11:46:45 +0100 Subject: [PATCH] Fix of aa sequences processing, now running sketch with both --concat-fasta and without work. --- src/hashing/aahash_iterator.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/hashing/aahash_iterator.rs b/src/hashing/aahash_iterator.rs index 0dc3ccc..98b09c3 100644 --- a/src/hashing/aahash_iterator.rs +++ b/src/hashing/aahash_iterator.rs @@ -79,9 +79,9 @@ impl AaHashIterator { log::debug!("Preprocessing sequence"); let mut reader = parse_fastx_file(file).unwrap_or_else(|_| panic!("Invalid path/file: {file}")); + let mut seq_hash_it = Self::default(level.clone()); loop { let record_read = reader.next(); - let mut seq_hash_it = Self::default(level.clone()); if let Some(record) = record_read { let seqrec = record.expect("Invalid FASTA/Q record"); if seqrec.qual().is_some() { @@ -98,6 +98,7 @@ impl AaHashIterator { } if concat_fasta { hash_vec.push(seq_hash_it); + seq_hash_it = Self::default(level.clone()); } else { seq_hash_it.seq.push(SEQSEP); }