Skip to content

Commit 82eaf78

Browse files
authored
Merge pull request #29 from vrbouza/3di_victordev
Fix of aa sequence processing
2 parents 38a2a28 + 22aeefe commit 82eaf78

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/hashing/aahash_iterator.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,9 @@ impl AaHashIterator {
7979
log::debug!("Preprocessing sequence");
8080
let mut reader =
8181
parse_fastx_file(file).unwrap_or_else(|_| panic!("Invalid path/file: {file}"));
82+
let mut seq_hash_it = Self::default(level.clone());
8283
loop {
8384
let record_read = reader.next();
84-
let mut seq_hash_it = Self::default(level.clone());
8585
if let Some(record) = record_read {
8686
let seqrec = record.expect("Invalid FASTA/Q record");
8787
if seqrec.qual().is_some() {
@@ -98,6 +98,7 @@ impl AaHashIterator {
9898
}
9999
if concat_fasta {
100100
hash_vec.push(seq_hash_it);
101+
seq_hash_it = Self::default(level.clone());
101102
} else {
102103
seq_hash_it.seq.push(SEQSEP);
103104
}

0 commit comments

Comments
 (0)