Skip to content

Commit

Permalink
more logging
Browse files Browse the repository at this point in the history
  • Loading branch information
wdecoster committed Aug 3, 2024
1 parent 2179f3d commit b467d86
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "STRdust"
version = "0.8.8"
version = "0.9.1"
edition = "2021"


Expand Down
5 changes: 4 additions & 1 deletion src/consensus.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit b467d86

Please sign in to comment.