Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

dnax — DNA models in JAX

[!WARNING] This is an experimental implementation.

dnax provides JAX-based implementation of models like BPNet, ChromBPNet, DragoNNFruit. The code is heavily based on original implementations (chrombpnet, bpnet-lite) however attempts to be more readable, accessible, and maintainable.

Installation

pip install dnax

# or 

pip install git+https://github.com/gtca/dnax.git

Usage

Vanilla ChromBPNet:

from dnax.models.chrombpnet import ChromBPNet

bias = BPNet(n_filters=512, n_layers=8)
accessibility = BPNet(n_filters=512, n_layers=8)

model = ChromBPNet(bias, accessibility)

x = ...  # (batch, 2114, 4) tensor (1-hot)
profile, counts = model(x)

For inference, you can load existing ChromBPNet models:

from dnax.io import load_chrombpnet_model

model = load_chrombpnet_model(bias_file, accessibility_file)

profile, counts = model(x)

Implementation

dnax currently uses flax and its NNX API.

Metadata

Release files for dnax 2024.0.0a1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dnax 2024.0.0a1
File Size Uploaded
dnax-2024.0.0a1.tar.gz 14.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dnax 2024.0.0a1
File Interpreter ABI Platform
dnax-2024.0.0a1-py3-none-any.whl Python 3 none any Details

Total release size: 24.7 kB

Release files / dnax-2024.0.0a1.tar.gz

Download URL dnax-2024.0.0a1.tar.gz
Size 14.5 kB
Tags Source
SHA-256 checksum
How to use checksums
ded2ce9e955c08eea88d3db19a61cac012a34e60e5aaf9b737fdb89315c01f81
BLAKE2b-256 checksum
How to use checksums
d4914bf39d3f7a8ea4883f5ec0e7ec887b6d58b4a6afd080934e7a5859a97235
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.9

Release files / dnax-2024.0.0a1-py3-none-any.whl

Download URL dnax-2024.0.0a1-py3-none-any.whl
Size 10.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b534b79d3bbc555604ec658d61383be12581a012c341b45a4a084ed6d64583ae
BLAKE2b-256 checksum
How to use checksums
07d654b4396d74b9fd1a568d06e4429e9ea60497c2dd9703887fc438f6448038
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.11.9

Release history Release notifications | RSS feed

This release

2024.0.0a1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page