Skip to content

Commit

Permalink
Merge pull request #1 from anton083/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
AntonOresten authored Aug 13, 2023
2 parents 7ba23f4 + 4a52cb0 commit f310896
Show file tree
Hide file tree
Showing 4 changed files with 52 additions and 27 deletions.
18 changes: 1 addition & 17 deletions .github/workflows/TagBot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,6 @@ on:
types:
- created
workflow_dispatch:
inputs:
lookback:
default: 3
permissions:
actions: read
checks: read
contents: write
deployments: read
issues: read
discussions: read
packages: read
pages: read
pull-requests: read
repository-projects: read
security-events: read
statuses: read
jobs:
TagBot:
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'
Expand All @@ -28,4 +12,4 @@ jobs:
- uses: JuliaRegistries/TagBot@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
ssh: ${{ secrets.DOCUMENTER_KEY }}
ssh: ${{ secrets.DOCUMENTER_KEY }}
24 changes: 24 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Documentation
on:
push:
branches:
- main
- dev
tags: '*'
pull_request:
jobs:
build:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: '1.9'
- name: Install dependencies
run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
- name: Build and deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: julia --project=docs/ docs/make.jl
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,10 @@
[![MIT license](https://img.shields.io/badge/license-MIT-green.svg)](https://opensource.org/license/MIT)
[![Documentation](https://img.shields.io/badge/docs-stable-blue.svg)](https://anton083.github.io/VectorizedKmers.jl/stable/)
[![Status](https://github.com/anton083/VectorizedKmers.jl/actions/workflows/CI.yml/badge.svg?branch=main)](https://github.com/anton083/VectorizedKmers.jl/actions/workflows/CI.yml?query=branch%3Amain)
[![Coverage](https://codecov.io/gh/anton083/VectorizedKmers.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/anton083/VectorizedKmers.jl)
[![Coverage](https://codecov.io/gh/anton083/VectorizedKmers.jl/branch/main/graph/badge.svg)](https://codecov.io/gh/anton083/VectorizedKmers.jl)

VectorizedKmers.jl is a Julia package for fast $k$-mer counting of biological sequences. The core idea is that $k$-mers with an alphabet size $A$ are essentially integers in base $A$, and can be used as indices in a vector of size $A^k$ to count the corresponding $k$-mers.

The `KmerCount` type is a wrapper for `AbstractVector`, which means that these vector k-mer counts are not limited to Julia's `Base.Vector` type; other kinds of vectors can be used as well, such as `CUDA.CuVector`, `SparseArrays.SparseVector` or even matrix views. To efficiently group k-mer counts together, the `KmerCountVector` stores them in a matrix as rows or columns. It can wrap any `AbstractMatrix`, such as `Matrix` or `CuMatrix`, and indexing it returns a `KmerCount` wrapped around a view of a row or column of the original matrix.

This data structure can be used to quickly approximate distances between sequences. Most notably, the squared Euclidean distance was used to estimate edit distance in [this paper](https://doi.org/10.1093/nar/gkz657). The dot product has also proven to be a useful metric for comparing correlation between sequences.
29 changes: 20 additions & 9 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,27 @@ using Documenter
DocMeta.setdocmeta!(VectorizedKmers, :DocTestSetup, :(using VectorizedKmers); recursive=true)

makedocs(;
modules=[VectorizedKmers],
authors="Anton",
repo="https://github.com/anton083/VectorizedKmers.jl/blob/{commit}{path}#{line}",
sitename="VectorizedKmers.jl",
format=Documenter.HTML(;
prettyurls=get(ENV, "CI", "false") == "true",
edit_link="main",
assets=String[],
modules = [VectorizedKmers],
authors = "Anton O. Sollman",
repo = "https://github.com/anton083/VectorizedKmers.jl/blob/{commit}{path}#{line}",
sitename = "VectorizedKmers.jl",
doctest = true,
format = Documenter.HTML(;
prettyurls = get(ENV, "CI", "false") == "true",
edit_link = "main",
assets = String[],
),
pages=[
pages = [
"Home" => "index.md",
],
checkdocs = :all,
)

deploydocs(;
repo = "github.com/anton083/VectorizedKmers.jl",
push_preview = true,
branch = "gh-pages",
devbranch = "dev",
deps = nothing,
make = nothing
)

0 comments on commit f310896

Please sign in to comment.