Skip to content

Commit

Permalink
bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
eric committed Mar 7, 2024
1 parent 7d08415 commit 081f0f0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 3 additions & 2 deletions kr2r/src/bin/build_k2_db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
// 开始计时
let start = Instant::now();
let hash_config = HashConfig::new(capacity, value_bits, 0);
for fna_file in fna_files {
for fna_file in &fna_files {
convert_fna_to_k2_format(
fna_file,
meros,
Expand All @@ -109,9 +109,10 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
args.build.threads as u32,
);
}
println!("convert finished {:?}", &fna_files);

let hash_filename = args.build.hashtable_filename.clone();
for i in 0..2 {
for i in 0..partition {
let mut chtm = CHTableMut::new(&hash_filename, hash_config, i, chunk_size)?;
process_k2file(&chunk_files[i], &mut chtm, &taxonomy)?;
}
Expand Down
4 changes: 4 additions & 0 deletions kr2r/src/db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,10 @@ pub fn convert_fna_to_k2_format<P: AsRef<Path>>(
writer.write_all(cell.1.as_slice()).unwrap();
}
}

// for writer in writers.into_iter() {
// writer.flush().expect("io error");
// }
}
},
);
Expand Down

0 comments on commit 081f0f0

Please sign in to comment.