Metadata-Version: 2.1
Name: agct
Version: 0.1.0.dev0
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: Rust
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Requires-Dist: wags-tails
Requires-Dist: pytest ; extra == 'tests'
Requires-Dist: pytest-cov ; extra == 'tests'
Requires-Dist: maturin ; extra == 'dev'
Requires-Dist: ruff >=0.1.12 ; extra == 'dev'
Requires-Dist: pre-commit ; extra == 'dev'
Provides-Extra: tests
Provides-Extra: dev
License-File: LICENSE
Summary: Another Genome Conversion Tool: Python frontend to Rust chainfile crate
Author: James Stevenson
Requires-Python: >=3.8
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Homepage, https://github.com/genomicmedlab/agct
Project-URL: Documentation, https://github.com/genomicmedlab/agct
Project-URL: Changelog, https://github.com/genomicmedlab/agct/releases
Project-URL: Source, https://github.com/genomicmedlab/agct
Project-URL: Bug Tracker, https://github.com/genomicmedlab/agct/issues

# agct: Another Genome Conversion Tool

Drop-in replacement for the [pyliftover](https://github.com/konstantint/pyliftover) tool, using the St. Jude's [chainfile](https://docs.rs/chainfile/latest/chainfile/) crate. Enables significantly faster chainfile loading from cold start (see `analysis/`).

Status: alpha.

## Usage

Initialize a class instance:

```python3
from agct import Converter
c = Converter("hg38", "hg19")
```

Call ``convert_coordinate()``:

```python3
c.convert_coordinate("chr7", 140453136, "+")
# [['chr7', '140152936', '+']]
```

## Development

The [Rust toolchain](https://www.rust-lang.org/tools/install) must be installed.

Create a virtual environment and install developer dependencies:

```shell
python3 -m virtualenv venv
source venv/bin/activate
python3 -m pip install -e '.[dev,tests]'
```

Be sure to install pre-commit hooks:

```shell
pre-commit install
```

This installs Python code as editable, but after any changes to Rust code, ``maturin develop`` must be run:

```shell
maturin develop
```

Run tests with `pytest`:

```shell
pytest
```

