Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/brentp/variantkey-nim
nim-wrapper for variantkey -- (chrom, pos, ref, alt) -> uint64
https://github.com/brentp/variantkey-nim
genomics variant
Last synced: 16 days ago
JSON representation
nim-wrapper for variantkey -- (chrom, pos, ref, alt) -> uint64
- Host: GitHub
- URL: https://github.com/brentp/variantkey-nim
- Owner: brentp
- License: mit
- Created: 2018-12-19T00:10:17.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2018-12-19T23:17:06.000Z (about 6 years ago)
- Last Synced: 2024-10-30T13:05:32.063Z (2 months ago)
- Topics: genomics, variant
- Language: C
- Homepage:
- Size: 21.5 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# variantkey
nim wrapper for [variantkey](https://github.com/Genomicsplc/variantkey).
This wrapper can encode+decode about 5 million variants per second.
The entirety of the API exposed by this library is demonstrated below:```
import variantkeyvar
chrom = "19"
pos = 3323934'u32
# encode
e = encode(chrom, pos, "A", "T")assert e.exact
echo e # 10959892387821256704
echo e.decode # (chrom: "19", position: 3323934, reference: "A", alternate: "T", exact: true)# longer variants are encoded with a hash
e = encode("1", 878111, "CAGGGGCCCCCGGGCTCCGGACCCCCCACCCCGTCCCGGGACTCTGCCCGGCGAGCCCCCCGGAA", "C")
# the reference and alternate are not set upon decoding.
echo e # (chrom: "1", position: 878111, reference: "", alternate: "")
```