Skip to content

Commit

Permalink
Fix of aa sequences processing, now running sketch with both --concat…
Browse files Browse the repository at this point in the history
…-fasta and without work.
  • Loading branch information
vrbouza committed Oct 18, 2024
1 parent a24cd8b commit 22aeefe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/hashing/aahash_iterator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand All @@ -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);
}
Expand Down

0 comments on commit 22aeefe

Please sign in to comment.