Skip to main content

Another Genome Conversion Tool: Python frontend to Rust chainfile crate

Project description

agct: Another Genome Conversion Tool

image image image Actions status

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agct-0.1.0.dev2.tar.gz (10.6 kB view details)

Uploaded Source

Built Distributions

agct-0.1.0.dev2-cp38-abi3-win_amd64.whl (163.8 kB view details)

Uploaded CPython 3.8+ Windows x86-64

agct-0.1.0.dev2-cp38-abi3-win32.whl (161.3 kB view details)

Uploaded CPython 3.8+ Windows x86

agct-0.1.0.dev2-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.1 MB view details)

Uploaded CPython 3.8+ manylinux: glibc 2.17+ x86-64

agct-0.1.0.dev2-cp38-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl (1.2 MB view details)

Uploaded CPython 3.8+ manylinux: glibc 2.17+ s390x

agct-0.1.0.dev2-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl (1.1 MB view details)

Uploaded CPython 3.8+ manylinux: glibc 2.17+ ppc64le

agct-0.1.0.dev2-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl (1.1 MB view details)

Uploaded CPython 3.8+ manylinux: glibc 2.17+ ARMv7l

agct-0.1.0.dev2-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.1 MB view details)

Uploaded CPython 3.8+ manylinux: glibc 2.17+ ARM64

agct-0.1.0.dev2-cp38-abi3-manylinux_2_5_i686.manylinux1_i686.whl (1.1 MB view details)

Uploaded CPython 3.8+ manylinux: glibc 2.5+ i686

agct-0.1.0.dev2-cp38-abi3-macosx_11_0_arm64.whl (274.5 kB view details)

Uploaded CPython 3.8+ macOS 11.0+ ARM64

agct-0.1.0.dev2-cp38-abi3-macosx_10_12_x86_64.whl (277.8 kB view details)

Uploaded CPython 3.8+ macOS 10.12+ x86-64

File details

Details for the file agct-0.1.0.dev2.tar.gz.

File metadata

  • Download URL: agct-0.1.0.dev2.tar.gz
  • Upload date:
  • Size: 10.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: maturin/1.6.0

File hashes

Hashes for agct-0.1.0.dev2.tar.gz
Algorithm Hash digest
SHA256 09527a97d1427b64803bb268de32822ad21082c94a084a1d4a9880a6c956bf33
MD5 05d2be8c4851f7e5674a44cd15df4a4c
BLAKE2b-256 851f2245f3e7c5938aa35fff59f5b08eb9d378cb645a12ed55156550eaa3dd41

See more details on using hashes here.

File details

Details for the file agct-0.1.0.dev2-cp38-abi3-win_amd64.whl.

File metadata

File hashes

Hashes for agct-0.1.0.dev2-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 d53eb39fca8f579d3ab962b9f3597013b127707d49101956f67ecb4054b85865
MD5 73d57b637e4e78d9afed3ecbbe0b6784
BLAKE2b-256 5f3aca47f10e7f6b8c09264cca7d113277eb4909eaf24db2ed4541421165eab7

See more details on using hashes here.

File details

Details for the file agct-0.1.0.dev2-cp38-abi3-win32.whl.

File metadata

  • Download URL: agct-0.1.0.dev2-cp38-abi3-win32.whl
  • Upload date:
  • Size: 161.3 kB
  • Tags: CPython 3.8+, Windows x86
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: maturin/1.6.0

File hashes

Hashes for agct-0.1.0.dev2-cp38-abi3-win32.whl
Algorithm Hash digest
SHA256 0ce8e03b42c72051d8eda4113e6246ac1f9778cf67a3719263fae3f5bed23dbf
MD5 f11367f7d3effbe69997f817e8601bf5
BLAKE2b-256 af7f6be759f845aee26e0b70aacbfc76fb9823da2c7dae5d0e9fcc30485c5751

See more details on using hashes here.

File details

Details for the file agct-0.1.0.dev2-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

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

See more details on using hashes here.

File details

Details for the file agct-0.1.0.dev2-cp38-abi3-manylinux_2_17_s390x.manylinux2014_s390x.whl.

File metadata

File hashes

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

See more details on using hashes here.

File details

Details for the file agct-0.1.0.dev2-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl.

File metadata

File hashes

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

See more details on using hashes here.

File details

Details for the file agct-0.1.0.dev2-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl.

File metadata

File hashes

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

See more details on using hashes here.

File details

Details for the file agct-0.1.0.dev2-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

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

See more details on using hashes here.

File details

Details for the file agct-0.1.0.dev2-cp38-abi3-manylinux_2_5_i686.manylinux1_i686.whl.

File metadata

File hashes

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

See more details on using hashes here.

File details

Details for the file agct-0.1.0.dev2-cp38-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for agct-0.1.0.dev2-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e3cb94bbca76d4987714118de15f8f604cff0349f023f929d04f61518f8125ce
MD5 d4c0bb04d7edb35fac06a6a55ab3853f
BLAKE2b-256 11232426a67b86831937882f4f92ad145dcc784d5ce30128c039e08e961c1f79

See more details on using hashes here.

File details

Details for the file agct-0.1.0.dev2-cp38-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

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

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page