kmertools: DNA Vectorisation Tool
$$\ $$\ $$$$$$$$\ $$\ $$ | $$ | \__$$ __| $$ | $$ |$$ / $$$$$$\$$$$\ $$$$$$\ $$$$$$\ $$ | $$$$$$\ $$$$$$\ $$ | $$$$$$$\ $$$$$ / $$ _$$ _$$\ $$ __$$\ $$ __$$\ $$ | $$ __$$\ $$ __$$\ $$ |$$ _____| $$ $$< $$ / $$ / $$ |$$$$$$$$ |$$ | \__| $$ | $$ / $$ |$$ / $$ |$$ |\$$$$$$\ $$ |\$$\ $$ | $$ | $$ |$$ ____|$$ | $$ | $$ | $$ |$$ | $$ |$$ | \____$$\ $$ | \$$\ $$ | $$ | $$ |\$$$$$$$\ $$ | $$ | \$$$$$$ |\$$$$$$ |$$ |$$$$$$$ | \__| \__|\__| \__| \__| \_______|\__| \__| \______/ \______/ \__|\_______/
Overview
kmertools is a k-mer based feature extraction tool designed to support metagenomics and other bioinformatics analytics. This tool leverages k-mer analysis to vectorize DNA sequences, facilitating the use of these vectors in various AI/ML applications.
Features
- Oligonucleotide Frequency Vectors: Generate frequency vectors for oligonucleotides.
- Minimiser Binning: Efficiently bin sequences using minimisers to reduce data complexity.
- Chaos Game Representation (CGR): Compute CGR vectors for DNA sequences based on k-mers or whole sequence transformation.
- Coverage Histograms: Create coverage histograms to analyze the depth of sequencing reads.
- Python Binding: You can import kmertools functionality using
import pykmertools as kt
Installation
Option 1: from bioconda (recommended)
You can install kmertools from Bioconda at https://anaconda.org/bioconda/kmertools. Make sure you have conda installed.
# create conda environment and install kmertools
conda create -n kmertools -c bioconda kmertools
# activate environment
conda activate kmertools
Option 2: from PyPI
You can install kmertools from PyPI at https://pypi.org/project/pykmertools/.
pip install pykmertools
Option 3: from sources
You can install kmertools directly from the source by cloning the repository and using Rust's package manager cargo.
git clone https://github.com/your-repository/kmertools.git
cd kmertools
cargo build --release
Now add the binary to path (you may modify ~/.bashrc or ~/.zshrc)
# to add to current terminal
export PATH=$PATH:$(pwd)/target/release/
# to save to ~/.bashrc
echo "export PATH=\$PATH:$(pwd)/target/release/" >> ~/.bashrc
source ~/.bashrc
# to save to ~/.zshrc for Mac
echo "export PATH=\$PATH:$(pwd)/target/release/" >> ~/.zshrc
source ~/.zshrc
To install the python bindings run the following commands. You can use either pip or conda directories for this.
# pip
cd pip
maturin build --release
# conda
cd conda
maturin build --release
Now move to parent directory using cd .. and run the following command.
pip install target/wheels/pykmertools-<VERSION>-cp39-abi3-manylinux_2_34_x86_64.whl
Test the installation
After setting up, run the following command to print out the kmertools help message.
kmertools --help
Help
Please read our comprehensive Wiki.
Authors
- Anuradha Wickramarachchi https://anuradhawick.com
- Vijini Mallawaarachchi https://vijinimallawaarachchi.com
Citation
If you use kmertools please cite as follows.
@software{Wickramarachchi_kmertools_DNA_Vectorisation,
author = {Wickramarachchi, Anuradha and Mallawaarachchi, Vijini},
title = {{kmertools: DNA Vectorisation Tool}},
url = {https://github.com/anuradhawick/kmertools},
version = {0.1.4}
}
Please refer to the Wiki for citations of relevant algorithms.
Support and contributions
Please get in touch via author websites or GitHub issues. Thanks!
Metadata
Release files for pykmertools 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| pykmertools-1.0.0-cp310-abi3-win_amd64.whl | CPython 3.10 | abi3 | Windows x86-64 | Details |
| pykmertools-1.0.0-cp310-abi3-musllinux_1_2_x86_64.whl | CPython 3.10 | abi3 | Linux musl 1.2+ x86-64 | Details |
| pykmertools-1.0.0-cp310-abi3-musllinux_1_2_aarch64.whl | CPython 3.10 | abi3 | Linux musl 1.2+ ARM64 | Details |
| pykmertools-1.0.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.10 | abi3 | Linux glibc 2.17+ x86-64 | Details |
| pykmertools-1.0.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | CPython 3.10 | abi3 | Linux glibc 2.17+ ARM64 | Details |
| pykmertools-1.0.0-cp310-abi3-macosx_11_0_arm64.whl | CPython 3.10 | abi3 | macOS 11.0+ ARM64 | Details |
| pykmertools-1.0.0-cp310-abi3-macosx_10_12_x86_64.whl | CPython 3.10 | abi3 | macOS 10.12+ x86-64 | Details |
Total release size: 9.4 MB
Release files / pykmertools-1.0.0-cp310-abi3-win_amd64.whl
| Download URL | pykmertools-1.0.0-cp310-abi3-win_amd64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.10 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
a9cbd5ea40ff1d1a231c540ad4660ace210d9d041a5e90aabd4b008c53b9dd20
|
|
BLAKE2b-256 checksum How to use checksums |
dd68f2c924cfd84d43fade2054d29999d62550ee697aa7e987911bce1616023d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / pykmertools-1.0.0-cp310-abi3-musllinux_1_2_x86_64.whl
| Download URL | pykmertools-1.0.0-cp310-abi3-musllinux_1_2_x86_64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.10 Linux musl 1.2+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
2f55a5aa650db8214ee9b3257bf4f27a4c92fca5dbd5ac829687288bb0d9cc58
|
|
BLAKE2b-256 checksum How to use checksums |
6bc02aca4eb08923d2a29e1c50f9e9cbaf222de66eb619ecad57181a9f250d4e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / pykmertools-1.0.0-cp310-abi3-musllinux_1_2_aarch64.whl
| Download URL | pykmertools-1.0.0-cp310-abi3-musllinux_1_2_aarch64.whl |
|---|---|
| Size | 1.5 MB |
| Tags | CPython 3.10 Linux musl 1.2+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
371f7204edef35f826804a5d251f4dda51a2ff9d7b5863435f0e6f8a20bdc0f8
|
|
BLAKE2b-256 checksum How to use checksums |
a205a9c58e3ddef661aec419e2cf5e9a02fa894860e1db1f5c15e17021fa251a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / pykmertools-1.0.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | pykmertools-1.0.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 1.4 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
3701133a29fe68c2ec6a0198b2074c79ee1f4da052b7af4c988fa06078c109b1
|
|
BLAKE2b-256 checksum How to use checksums |
0d4449267649e7a351957055221d6a47d3f6bdc578b704a98a841daf4b262072
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / pykmertools-1.0.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | pykmertools-1.0.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
a77853ccf343bb963fce6ffbfd91dcfad252f67551dd28356799bfbb09789a04
|
|
BLAKE2b-256 checksum How to use checksums |
b83b3ac249c33ea297e9373b2a746a5ed75901d0750c7ae535db54be7720d526
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / pykmertools-1.0.0-cp310-abi3-macosx_11_0_arm64.whl
| Download URL | pykmertools-1.0.0-cp310-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.2 MB |
| Tags | CPython 3.10 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
aa11f312c91eb0ddc5b168a807524248d1113b9d95b71c38ce4e553524099e44
|
|
BLAKE2b-256 checksum How to use checksums |
88e5ce56a2ea85e1381c2aa3585ef106cf36f88296046b166be2f354d810af8f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / pykmertools-1.0.0-cp310-abi3-macosx_10_12_x86_64.whl
| Download URL | pykmertools-1.0.0-cp310-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | CPython 3.10 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
51096d1019ecb1e3413bb8d923fd4dce21060678df243eb1329bacd6285d8e24
|
|
BLAKE2b-256 checksum How to use checksums |
caadafd955f5ae07a218a126ed37c801eae16a8b7e820df496f691597450a867
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.26 {"installer":{"name":"uv","version":"0.11.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|