Another Genome Conversion Tool: Python frontend to Rust chainfile crate
Project description
agct: Another Genome Conversion Tool
A drop-in replacement for the pyliftover tool, using the St. Jude's chainfile crate. Enables significantly faster chainfile loading from cold start (see analysis/
).
Installation
Install from PyPI:
python3 -m pip install agct
Usage
Initialize a class instance:
from agct import Converter
c = Converter("hg38", "hg19")
If a chainfile is unavailable locally, it's downloaded from UCSC and saved using the
wags-tails
package -- see the configuration instructions for information on how to designate a non-default storage location.
Call convert_coordinate()
:
c.convert_coordinate("chr7", 140453136, "+")
# [['chr7', 140152936, '+']]
Development
The Rust toolchain must be installed.
Create a virtual environment and install developer dependencies:
python3 -m virtualenv venv
source venv/bin/activate
python3 -m pip install -e '.[dev,tests]'
Be sure to install pre-commit hooks:
pre-commit install
This installs Python code as editable, but after any changes to Rust code, maturin develop
must be run:
maturin develop
Check Python style with ruff
:
python3 -m ruff format . && python3 -m ruff check --fix .
Use cargo fmt
to check Rust style (must be run from within the rust/
subdirectory):
cd rust/
cargo fmt
Run tests with pytest
:
pytest
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for agct-0.1.0.dev1-cp38-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c3c91051052747a625a13fad95bb1fde7c8318a4a3f11e7ef51f04d2333e669 |
|
MD5 | b786a2e13ff1ffd978174a3ffa322b3b |
|
BLAKE2b-256 | e2d629d2b99f666c14511191f2d3d965c7dd50fb46cadbb69a928d57d6225dd7 |
Hashes for agct-0.1.0.dev1-cp38-abi3-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 714469b506bfa2784eb16007a8dfb5eaa137caeed73fcc6d41c8d64acfa24d8a |
|
MD5 | 1e82099bd2faaaf616f805b4f1f6b515 |
|
BLAKE2b-256 | ee563c179b07f007dfac9e48d7303c9749ac8b38892f2a9d05671da54c88b0a2 |
Hashes for agct-0.1.0.dev1-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6bc15526be0a989a6ae776486b84c7eb6125870b18d675a9211f6d6b2a0fa2c5 |
|
MD5 | 0d054d168e7d5f4f7b7e19980410282f |
|
BLAKE2b-256 | 9872910912c48804747b40cfc1ef1a66d8baa3e2640ae4eb1eea0cc7e8e2b778 |
Hashes for agct-0.1.0.dev1-cp38-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 532e73bcfdb7b352b595f191c79d7a1256519050e3a54ae29e2c918d2bdaf535 |
|
MD5 | 4b437688dea9483ed2e1df16b72d76bf |
|
BLAKE2b-256 | bd498d5c98d19007f0b09aa56bc17ff796eb040c588f45b7d9f501c2db260939 |
Hashes for agct-0.1.0.dev1-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c326a55e45516b7ac3be55b7fe064cbacafd436fe35bd422a34681337547686 |
|
MD5 | 9379cb7045b3e8f7674e2d671000aeb7 |
|
BLAKE2b-256 | e502ea7b2cbdc42dc1bd08a14ab0b64071127b5f84dbd38fa4f34ed9e6cdebe9 |
Hashes for agct-0.1.0.dev1-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0eee532e367e163cd6405a6879e39c20669fd9eb3a14a16d1077806689c7a26f |
|
MD5 | 0b70522ad0ce760185108fb3c76ab193 |
|
BLAKE2b-256 | aace02e5377ff7c023a0acc90efc88bcbc67be4f0ace58b60226859ad47d766a |
Hashes for agct-0.1.0.dev1-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 449d6e83407e1a99425a533d92719339d92b80bf7fd93f5d710699ec9a3599f4 |
|
MD5 | 483125314781e6440bc8fb2b1d51b8d6 |
|
BLAKE2b-256 | 5ee31b92c94f79908f9dbc7ccec8fb615f298152d6924c4f215c72c43cadc3a7 |
Hashes for agct-0.1.0.dev1-cp38-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | acd9518c408a286384b42818260ef494fc38b7243a1b1645a96cd1a859414d7d |
|
MD5 | 4c03235f25dc915a393d4721d868e03d |
|
BLAKE2b-256 | 0722070efc88c992fe8e755308bede5aae720fe00ade12dbdf95a1b129bb4517 |
Hashes for agct-0.1.0.dev1-cp38-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1c216153cca3fee96804d636104a2bcef1efa2efb5d63cdbdfec6030ac2293a9 |
|
MD5 | 07ad54ab592ca2b57a97c3750fd78a63 |
|
BLAKE2b-256 | 3bf1e193a87b0c737fcd0d26d7335cdb586f60af6e905d2166518b4bac3ac9c2 |
Hashes for agct-0.1.0.dev1-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fe7eecf70a59d0a2c3e6a843670630ff12cff3c3ea4a043ae11d1469997ff9ed |
|
MD5 | 5eaf7352abe91b4f5a87124e657d71ab |
|
BLAKE2b-256 | 887655411a49f88c0c29dd0c5b9ca36711da83b70f64dcdf4ac335f95ce15c45 |