Skip to main content

No project description provided

Project description

Compressed DNA sequence representation

[!WARNING] This is an experimental implementation.

ganz implements a simple way to store DNA sequences in a compressed format:

from ganz import DnaSequence

dna = DnaSequence("ACGT")

It also makes getting the one-hot representation of the DNA sequence very fast:

dna.unpack_bits()
# array([[1, 0, 0, 0],
#        [0, 1, 0, 0],
#        [0, 0, 1, 0],
#        [0, 0, 0, 1]], dtype=uint8)

PyPi version

Installation

pip install ganz

# or 

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

Building from source

To build from source, you'll need:

  • Rust toolchain (install from rustup.rs)
  • Python 3.8 or newer
  • NumPy

Then:

# Clone the repository
git clone https://github.com/gtca/ganz.git
cd ganz

# Install development dependencies
pip install maturin pytest numpy

# Build and install in development mode
pip install -e .

# Run tests
pytest tests/
cargo test

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

ganz-0.1.1.tar.gz (243.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ganz-0.1.1-cp312-cp312-macosx_11_0_arm64.whl (497.3 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

File details

Details for the file ganz-0.1.1.tar.gz.

File metadata

  • Download URL: ganz-0.1.1.tar.gz
  • Upload date:
  • Size: 243.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for ganz-0.1.1.tar.gz
Algorithm Hash digest
SHA256 3a9b70c5ffb76b082e701d4fe78c891fd8b507e277c25d41f65077580972974d
MD5 46073222fb5d12628790dd8a8f3677e7
BLAKE2b-256 2cde603cd14a4bc110f7ae35fac910e00ed0b542e2e0debcb30257d1049e5c4f

See more details on using hashes here.

File details

Details for the file ganz-0.1.1-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for ganz-0.1.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e6a162f289b42a4c2a04ae74179d118081194a875409247c7c2cdfcb76d73fe3
MD5 d60938ef6c4299504b5c607aa3faa2d7
BLAKE2b-256 2bfffc319d8cbd37953a529963525826f235342d0f4728d90f46369a82559d68

See more details on using hashes here.

Supported by

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