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)
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
Metadata
Release files for ganz 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ganz-0.1.1.tar.gz | 243.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ganz-0.1.1-cp312-cp312-macosx_11_0_arm64.whl | CPython 3.12 | CPython 3.12 | macOS 11.0+ ARM64 | Details |
Total release size: 740.9 kB
Release files / ganz-0.1.1.tar.gz
| Download URL | ganz-0.1.1.tar.gz |
|---|---|
| Size | 243.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3a9b70c5ffb76b082e701d4fe78c891fd8b507e277c25d41f65077580972974d
|
|
BLAKE2b-256 checksum How to use checksums |
2cde603cd14a4bc110f7ae35fac910e00ed0b542e2e0debcb30257d1049e5c4f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Release files / ganz-0.1.1-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | ganz-0.1.1-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 497.3 kB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
e6a162f289b42a4c2a04ae74179d118081194a875409247c7c2cdfcb76d73fe3
|
|
BLAKE2b-256 checksum How to use checksums |
2bfffc319d8cbd37953a529963525826f235342d0f4728d90f46369a82559d68
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|