A tool to store kmer unique to dataset
To install:
pip install kmeruniq
Two commands:
kmeruniq buildkmeruniq query
Check the help with -h flag.
Usage example of the CLI
kmeruniq build -k 21 --fof my_file.fof --output path/to/index -e --shard 20
kmeruniq query --query_str ACGAAACGTACATTCACACACACACATAGAGAAGGAGAGCAGCACACACA --index-path path/to/index
kmeruniq query --query_file path/to/some/data.fa --index-path path/to/index
The output is a the result of a Counter for each value.
The fof format
A file of file. That is a line separated list of file.
/path/to/foo.fa
/path/to/bar.fa
/path/to/barrr.fa.gz
Each line can also specify a label for the file. Two file with the same label will be considered as merge. For instance:
/path/to/foo.fa ;chr1
/path/to/bar.fa ;chr2
/path/to/barrr.fa.gz ;chr1
Here the foo.fa and barr.fa.gz will be merged together within the index.
Remark that file can be gzip compressed.
Usage example of the Python API:
The Kmer and DNA datatype are the one used by vizibridge.
from kmeruniq.index import Index
from vizibridge import Kmer, DNA
idx = Index("path/to/my/index")
# idx is a dict-like object keyed by kmer and valued by the annotation
idx["ACG..ACG"] # some kmer of the appropriate size.
for kmer in idx:
print(idx[kmer]) # print the value of each kmer
dna = DNA("ACG....ACGT") # long sequence of DNA from somewhere
for kmer in dna.enum_canonical_kmer(idx.k):
print(idx.get(kmer)) # print the value associated to kmer or None if kmer not inside.
Release files for kmeruniq 0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| kmeruniq-0.6.tar.gz | 6.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| kmeruniq-0.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.6 kB
Release files / kmeruniq-0.6.tar.gz
| Download URL | kmeruniq-0.6.tar.gz |
|---|---|
| Size | 6.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
defe9b44ffbf828d611c4b08b228c53ed1ff9d74e26980dc87257dde97b74007
|
|
BLAKE2b-256 checksum How to use checksums |
47ab4587cec256831742a400a28a0455b3604ccdf57c30ab076f8d0209a39a24
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.5
|
Release files / kmeruniq-0.6-py3-none-any.whl
| Download URL | kmeruniq-0.6-py3-none-any.whl |
|---|---|
| Size | 11.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7dbe88cfc1fa1cf06e6533a38d93b6d65cd830d193a6a6a243682da4d54e8617
|
|
BLAKE2b-256 checksum How to use checksums |
3e2af8d207e3133fc9e054bba1ca9374b8b1241bf11c7ae396690358aaffc248
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.5
|