From 02d08e5221ae15164f5c1512f9f95e83c6327ef0 Mon Sep 17 00:00:00 2001 From: dagou Date: Thu, 27 Jun 2024 20:34:13 +0800 Subject: [PATCH] bug fix --- kr2r/src/bin/estimate_capacity.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kr2r/src/bin/estimate_capacity.rs b/kr2r/src/bin/estimate_capacity.rs index 408ea33..40c0758 100644 --- a/kr2r/src/bin/estimate_capacity.rs +++ b/kr2r/src/bin/estimate_capacity.rs @@ -8,7 +8,7 @@ use seqkmer::{read_parallel, FastaReader}; use serde_json; use std::collections::HashSet; use std::fs::File; -use std::io::{Read, Write}; +use std::io::{Read, Result, Write}; use std::path::{Path, PathBuf}; #[derive(Parser, Debug, Clone)] @@ -83,7 +83,8 @@ fn process_sequence>( let mut hllp: HyperLogLogPlus = HyperLogLogPlus::new(16, KBuildHasher::default()).unwrap(); - let mut reader = FastaReader::from_path(fna_file, 1).unwrap(); + let mut reader = FastaReader::from_path(fna_file, 1) + .expect("Failed to open the FASTA file with FastaReader"); let range_n = args.n as u64; read_parallel( &mut reader,