Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

agct

Package Overview
Dependencies
Maintainers
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

agct

Another Genome Conversion Tool: Python frontend to Rust chainfile crate

  • 0.1.0.dev2
  • Source
  • PyPI
  • Socket score

Maintainers
3

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

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc