Skip to content

Commit

Permalink
Add diagram
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel-Liu-c0deb0t committed Jun 23, 2024
1 parent 6c569b6 commit 914b430
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 3 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 = "block-aligner"
version = "0.5.0"
version = "0.5.1"
authors = ["c0deb0t <[email protected]>"]
edition = "2018"
license = "MIT"
Expand Down
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ assert_eq!(cigar.to_string(), "2=6I16=3D");
```
See the [docs](https://docs.rs/block-aligner) for detailed API information.

<p align = "center">
<img src = "block_aligner_modes.png" width = "400px">
</p>

## Algorithm
Block aligner provides a new efficient way to compute pairwise alignments on proteins, DNA sequences,
and byte strings with dynamic programming.
Expand Down
Binary file added block_aligner_modes.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 5 additions & 2 deletions src/scan_block.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! Main block aligner algorithm and supporting data structures.
//! Main Block Aligner algorithm and supporting data structures.
#[cfg(feature = "simd_sse2")]
use crate::sse2::*;
Expand Down Expand Up @@ -82,7 +82,10 @@ struct StateProfile<'a, P: Profile> {
x_drop: i32
}

/// Data structure storing the settings for block aligner.
/// Data structure storing the settings for Block Aligner.
///
/// A diagram showing different ways Block Aligner can be used:
/// ![Block Aligner modes](https://raw.githubusercontent.com/Daniel-Liu-c0deb0t/block-aligner/main/block_aligner_modes.png)
pub struct Block<const TRACE: bool, const X_DROP: bool = false, const LOCAL_START: bool = false, const FREE_QUERY_START_GAPS: bool = false, const FREE_QUERY_END_GAPS: bool = false> {
res: AlignResult,
allocated: Allocated
Expand Down
2 changes: 2 additions & 0 deletions src/scores.rs
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@ impl Matrix for AAMatrix {
/// Nucleotide scoring matrix.
///
/// Supports characters `A`, `C`, `G`, `N`, and `T`. Lowercase characters are uppercased.
///
/// If a larger alphabet is needed (for example, with IUPAC characters), use `AAMatrix` instead.
#[repr(C, align(32))]
#[derive(Clone, PartialEq, Debug)]
pub struct NucMatrix {
Expand Down

0 comments on commit 914b430

Please sign in to comment.