From b467d868245493d008fc7ce50fc9a18fd95e5997 Mon Sep 17 00:00:00 2001 From: wdecoster Date: Sun, 4 Aug 2024 00:23:03 +0200 Subject: [PATCH] more logging --- Cargo.toml | 2 +- src/consensus.rs | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 5febf28..12046b9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "STRdust" -version = "0.8.8" +version = "0.9.1" edition = "2021" diff --git a/src/consensus.rs b/src/consensus.rs index 3bc75b6..72b45d7 100644 --- a/src/consensus.rs +++ b/src/consensus.rs @@ -99,15 +99,18 @@ pub fn consensus( // I empirically determined the following parameters to be suitable, // but further testing on other repeats would be good // mainly have to make sure the consensus does not get longer than the individual insertions + log::info!("Creating consensus for {repeat}"); let scoring = Scoring::new(-12, -6, |a: u8, b: u8| if a == b { 3 } else { -4 }); let mut aligner = Aligner::new(scoring, &seqs_bytes[0]); for seq in seqs_bytes.iter().skip(1) { aligner.global(seq).add_to_graph(); } + debug!("Added all sequences to graph"); let consensus = aligner.consensus(); + debug!("Created consensus"); let score = aligner.global(&consensus).alignment().score; - + debug!("Calculated score"); Consensus { seq: Some(std::str::from_utf8(&consensus).unwrap().to_string()), support: num_reads,