Another Genome Conversion Tool: Python frontend to Rust chainfile crate
Project description
agct: Another Genome Conversion Tool
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, Genome
c = Converter(Genome.HG38, Genome.HG19)
If a chainfile is unavailable locally, it's downloaded from UCSC and saved using the
wags-tails
package -- see the wags-tails configuration instructions for information on how to designate a non-default storage location.
Call convert_coordinate()
:
c.convert_coordinate("chr7", 140453136, "+")
# [['chr7', 140152936, <Strand.POSITIVE: '+'>]]
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]'
This installs Python code as editable, but after any changes to Rust code, run maturin develop
to rebuild the Rust binary:
maturin develop
Be sure to install pre-commit hooks:
pre-commit install
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.dev2-cp38-abi3-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d53eb39fca8f579d3ab962b9f3597013b127707d49101956f67ecb4054b85865 |
|
MD5 | 73d57b637e4e78d9afed3ecbbe0b6784 |
|
BLAKE2b-256 | 5f3aca47f10e7f6b8c09264cca7d113277eb4909eaf24db2ed4541421165eab7 |
Hashes for agct-0.1.0.dev2-cp38-abi3-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ce8e03b42c72051d8eda4113e6246ac1f9778cf67a3719263fae3f5bed23dbf |
|
MD5 | f11367f7d3effbe69997f817e8601bf5 |
|
BLAKE2b-256 | af7f6be759f845aee26e0b70aacbfc76fb9823da2c7dae5d0e9fcc30485c5751 |
Hashes for agct-0.1.0.dev2-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 40a87d4777c512cb02159fef069d048b04c208809d3fe0657ce244f498ef3956 |
|
MD5 | 94071d7bc783341e7d7d3549a89703f5 |
|
BLAKE2b-256 | cb1fd1d515e167e4145988623d36fdbea5e47c4e8a624f6a6eee5db6d3bb2f76 |
Hashes for agct-0.1.0.dev2-cp38-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 185022922fe52bc2418f9c2d473dd3ba8a0c86aef1229b5faf4c3e77b70c26a0 |
|
MD5 | 1a3cb9f042887bd852f5679afcfa4225 |
|
BLAKE2b-256 | b2fd4e7cee6ba9e4027ed8a1280011a06ef3fb92f3bdc932d60ede95f8d24d69 |
Hashes for agct-0.1.0.dev2-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 39196487e1ea35cf9a891afd7eb102273b9ff0ca8cc81e4d2113135ac3a677f9 |
|
MD5 | 2eb840a894ae6140c6dd2534d5bc9040 |
|
BLAKE2b-256 | 2612c825dc5030d595ee816d6033312784d77102baa3c08794ef60ec41ed2458 |
Hashes for agct-0.1.0.dev2-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96aa4474f484ffd446e5b15be9da773b289d8bae61e94ae576ea6dcff63fd109 |
|
MD5 | 28028839975b2df11c9c05c299e173e6 |
|
BLAKE2b-256 | 62f488839410270a64cefbf084a83b0de7af8c1178a0d2f1893e068913dc6392 |
Hashes for agct-0.1.0.dev2-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cc1b4d8331480d105e540ae68629f5da84a22c7fe184cd2f52822830bbc78913 |
|
MD5 | c43f818fc1fd299a78dbd070127f74b0 |
|
BLAKE2b-256 | dc5fbd0031cbfe77408641da3a4097f1b21419d959544c678417f7ae6e309239 |
Hashes for agct-0.1.0.dev2-cp38-abi3-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6360f660bae1cb08293a62a525f10485e19fc351bd6f0242b7bd7ee409c99055 |
|
MD5 | b409bb8d853d26a3c130144ed693673f |
|
BLAKE2b-256 | 094527bda0a5e3c65daa0bf5d0173ad1c3bd83b802dd03005ace9daa99d3720d |
Hashes for agct-0.1.0.dev2-cp38-abi3-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e3cb94bbca76d4987714118de15f8f604cff0349f023f929d04f61518f8125ce |
|
MD5 | d4c0bb04d7edb35fac06a6a55ab3853f |
|
BLAKE2b-256 | 11232426a67b86831937882f4f92ad145dcc784d5ce30128c039e08e961c1f79 |
Hashes for agct-0.1.0.dev2-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 68cabfc377928ead9c2b2943e299af9d00bd153a3eeb9dad9dbaccaf2aab6c98 |
|
MD5 | 719320d634f9ea68772c88a406530f0f |
|
BLAKE2b-256 | 77b512d76acee77931c9cb2c795f261d40c52491d07445c98d84dd66b007bf03 |