Skip to content

Commit

Permalink
Merge pull request #29 from vrbouza/3di_victordev
Browse files Browse the repository at this point in the history
Fix of aa sequence processing
  • Loading branch information
johnlees authored Oct 18, 2024
2 parents 38a2a28 + 22aeefe commit 82eaf78
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 82eaf78

Please sign in to comment.