Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: PacificBiosciences/waffle_con
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.4.3
Choose a base ref
...
head repository: PacificBiosciences/waffle_con
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
  • 3 commits
  • 4 files changed
  • 1 contributor

Commits on Dec 5, 2024

  1. Copy the full SHA
    31ad3e3 View commit details
  2. version bump and changelog update

    holtjma committed Dec 5, 2024
    Copy the full SHA
    eff3354 View commit details
  3. Merge pull request #3 from PacificBiosciences/bugfix_offset

    Bugfix offset
    holtjma authored Dec 5, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    56c7421 View commit details
Showing with 11 additions and 1 deletion.
  1. +4 −0 CHANGELOG.md
  2. +1 −1 Cargo.toml
  3. +3 −0 src/consensus.rs
  4. +3 −0 src/dual_consensus.rs
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# v0.4.4
## Bugs
* Fixed a panic caused by input sequences shorter than the offset compare length

# v0.4.3
## Bugs
* Fixed a panic caused by an unchecked `unwrap()` in a `trace!` statement
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "waffle_con"
version = "0.4.3"
version = "0.4.4"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
3 changes: 3 additions & 0 deletions src/consensus.rs
Original file line number Diff line number Diff line change
@@ -416,6 +416,9 @@ impl ConsensusNode {

// build up the search space
let con_len = self.consensus.len();

// we need to truncate the compare length if it is longer than the sequence
let offset_compare_length = offset_compare_length.min(sequence.len());

// figure out how far back we search
let start_delta = offset_window + offset_compare_length; // we search from current back to the offset_window
3 changes: 3 additions & 0 deletions src/dual_consensus.rs
Original file line number Diff line number Diff line change
@@ -871,6 +871,9 @@ impl DualConsensusNode {
vec![(&mut self.dwfas1, &self.consensus1)]
};

// we need to truncate the compare length if it is longer than the sequence
let offset_compare_length = offset_compare_length.min(sequence.len());

for (dwfas, consensus) in activators.into_iter() {
// make sure everything is currently inactive
assert!(dwfas[seq_index].is_none());