Skip to content

Commit

Permalink
Merge pull request #34 from tmaklin/dev
Browse files Browse the repository at this point in the history
First public release
  • Loading branch information
tmaklin authored Nov 18, 2024
2 parents 5cc26e7 + fe64a38 commit 102a2e3
Show file tree
Hide file tree
Showing 17 changed files with 690 additions and 830 deletions.
51 changes: 0 additions & 51 deletions .github/deploy/build_aarch64-apple-darwin.sh

This file was deleted.

51 changes: 0 additions & 51 deletions .github/deploy/build_x86_64-apple-darwin.sh

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}

- name: Build binary
run: cargo build --features cli --verbose
run: cargo build --all-features --verbose

- name: Run unit and integration tests
run: cargo test --no-fail-fast --verbose
run: cargo test --all-features --no-fail-fast --verbose
99 changes: 0 additions & 99 deletions .github/workflows/build_artifacts.yml

This file was deleted.

34 changes: 2 additions & 32 deletions .github/workflows/make_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,35 +12,9 @@ jobs:
create-release:
name: Create and publish release
runs-on: ubuntu-latest
environment: Make sablast release
environment: Make kbo release

steps:
- name: Download artifacts
uses: dawidd6/action-download-artifact@v6
with:
workflow: build_artifacts.yml
workflow_conclusion: success

- name: Organise files
shell: bash
run: |
mv sablast-candidate-x86_64-unknown-linux-musl/sablast-candidate-x86_64-unknown-linux-musl.tar.gz ./
mv sablast-candidate-x86_64-apple-darwin/sablast-candidate-x86_64-apple-darwin.tar.gz ./
mv sablast-candidate-aarch64-apple-darwin/sablast-candidate-aarch64-apple-darwin.tar.gz ./
- name: Rename mac artifacts
shell: bash
run: |
tar -zxvf sablast-candidate-x86_64-apple-darwin.tar.gz && mv sablast-candidate-x86_64-apple-darwin sablast-${{ github.ref_name }}-x86_64-apple-darwin && tar -zcvf sablast-candidate-x86_64-apple-darwin.tar.gz sablast-${{ github.ref_name }}-x86_64-apple-darwin
tar -zxvf sablast-candidate-aarch64-apple-darwin.tar.gz && mv sablast-candidate-aarch64-apple-darwin sablast-${{ github.ref_name }}-aarch64-apple-darwin && tar -zcvf sablast-candidate-aarch64-apple-darwin.tar.gz sablast-${{ github.ref_name }}-aarch64-apple-darwin
- name: Designate version
shell: bash
run: |
mv sablast-candidate-x86_64-unknown-linux-musl.tar.gz sablast-${{ github.ref_name }}-x86_64-linux-musl.tar.gz
mv sablast-candidate-x86_64-apple-darwin.tar.gz sablast-${{ github.ref_name }}-x86_64-apple-darwin.tar.gz
mv sablast-candidate-aarch64-apple-darwin.tar.gz sablast-${{ github.ref_name }}-aarch64-apple-darwin.tar.gz
- name: Get current date
id: date
run: echo "::set-output name=date::$(date +'%d %B %Y')"
Expand All @@ -49,12 +23,8 @@ jobs:
uses: softprops/action-gh-release@v2
with:
token: ${{ secrets.MAKE_RELEASE_TOKEN }}
name: sablast-${{ github.ref_name }} (${{ steps.date.outputs.date }})
name: kbo-${{ github.ref_name }} (${{ steps.date.outputs.date }})
draft: false
prerelease: false
fail_on_unmatched_files: true
generate_release_notes: true
files: |
sablast-${{ github.ref_name }}-x86_64-linux-musl.tar.gz
sablast-${{ github.ref_name }}-x86_64-apple-darwin.tar.gz
sablast-${{ github.ref_name }}-aarch64-apple-darwin.tar.gz
35 changes: 5 additions & 30 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,43 +1,18 @@
[package]
name = "sablast"
version = "0.3.0"
name = "kbo"
version = "0.4.0"
edition = "2021"
rust-version = "1.77.0"
authors = ["Tommi Mäklin <[email protected]>"]
description = "Spectral Burrows-Wheeler transform accelerated local alignment search"
readme = "README.md"
homepage = "https://github.com/tmaklin/sablast"
repository = "https://github.com/tmaklin/sablast"
homepage = "https://github.com/tmaklin/kbo"
repository = "https://github.com/tmaklin/kbo"
license = "MIT OR Apache-2.0"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[features]
cli = ["dep:needletail", "dep:clap", "dep:rayon", "dep:log", "dep:stderrlog"]

[[bin]]
name = "sablast"
path = "src/cli/main.rs"
required-features = ["cli"]

[dependencies]
## core
sbwt = "0.3.1"

## cli
clap = { version = "4", features = ["derive"], optional = true}

### io
#### TODO Re-enable reading compressed sequences in needletail
##### This requires resolving the libllzma linker issue in build_artifacts.yml
needletail = { version = "0.5.1", default-features = false, optional = true }

### logging
log = { version = "0.4.20", optional = true }
stderrlog = { version = "0.6.0", optional = true }

### threading
rayon = { version = "1", optional = true }
sbwt = { version = "0.3.4", features = ["bpks-mem"] }

## docs
embed-doc-image="0.1.4"
Expand Down
34 changes: 32 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,35 @@
# sablast
# kbo
Spectral Burrows-Wheeler transform accelerated local alignment search.

kbo is an approximate local aligner based on converting [_k_-bounded matching
statistics](https://www.biorxiv.org/content/10.1101/2024.02.19.580943v1)
into a character representation of the underlying alignment sequence.

Documentation is available at [https://docs.rs/kbo](https://docs.rs/kbo).

## Installation
kbo is distributed as three separate Rust packages:
- [kbo](https://github.com/tmaklin/kbo) contains a Rust library implementing the core algorithm (this repository).
- [kbo-cli](https://github.com/tmaklin/kbo-cli) provides a command-line interface for `kbo find` and `kbo map`.
- [kbo-gui](https://github.com/tmaklin/kbo-cli) provides a WebAssembly graphical user interface for running kbo in the browser.

## About
kbo supports two main operations:

- `kbo find` matches the _k_-mers in a query sequence with the
reference and reports the local alignment segments found within the
reference. Find is useful for problems that can be solved with
[blast](https://blast.ncbi.nlm.nih.gov/Blast.cgi).
- `kbo map` maps the query sequence against a reference
sequence, and reports the nucleotide sequence of the alignment relative to
the reference. Map solves the same problem as
[snippy](https://github.com/tseemann/snippy) and [ska
map](https://docs.rs/ska/latest/ska/#ska-map).

kbo uses the [Spectral Burrows-Wheeler
Transform](https://docs.rs/sbwt/latest/sbwt/) data structure that allows
efficient _k_-mer matching between a target and a query sequence and
fast retrieval of the _k_-bounded matching statistic for each _k_-mer match.

## License
sablast is dual-licensed under the [MIT](LICENSE-MIT) and [Apache 2.0](LICENSE-APACHE) licenses.
kbo is dual-licensed under the [MIT](LICENSE-MIT) and [Apache 2.0](LICENSE-APACHE) licenses.
Loading

0 comments on commit 102a2e3

Please sign in to comment.