From 65b37af2d1b9f92f4972c4b45ebe258c48c2bdba Mon Sep 17 00:00:00 2001 From: Oliver Cheng Date: Sat, 4 Jan 2025 11:09:05 +0800 Subject: [PATCH] Modify error messages slightly --- src/call.rs | 4 +++- src/duplicates.rs | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/call.rs b/src/call.rs index 4e19083..72367d4 100644 --- a/src/call.rs +++ b/src/call.rs @@ -38,6 +38,8 @@ pub fn consensus( duplicates_only: bool, output_originals: bool, ) -> Result<()> { + info!("Creating thread pool with {threads} threads"); + rayon::ThreadPoolBuilder::new() .num_threads(threads) .build_global()?; @@ -60,7 +62,7 @@ pub fn consensus( idx += 1; if (idx > 0) && (idx % 100000 == 0) { - eprintln!("Called {} reads...", idx); + info!("Called {} reads...", idx); } let single = group.records.len() == 1; diff --git a/src/duplicates.rs b/src/duplicates.rs index b160da7..11c74eb 100644 --- a/src/duplicates.rs +++ b/src/duplicates.rs @@ -147,6 +147,8 @@ impl IndexReader { /// /// This function will return an error if the file cannot be opened or read, or if the file format is incorrect. pub fn get_duplicates(&mut self) -> Result<(DuplicateMap, DuplicateStatistics)> { + info!("Reading index file..."); + let mut map = DuplicateMap::new(); let mut stats = DuplicateStatistics { @@ -199,6 +201,8 @@ impl IndexReader { stats.proportion_duplicate = stats.duplicate_reads as f64 / stats.total_reads as f64; + info!("Generated duplicate map from index file"); + Ok((map, stats)) } }