A Zarr v3 convention for per-base resolution genomic data
Project description
pbzarr
A Python library for PBZ (Per-Base Zarr) — a Zarr v3 convention for storing per-base resolution genomic data such as read depths, methylation levels, and boolean masks.
PBZ is a modern alternative to D4 and bigWig, leveraging the Zarr ecosystem for compression, chunking, and cloud-native access.
Installation
pip install pbzarr
With optional Dask support:
pip install pbzarr[dask]
Quick Start
import pbzarr
# Create a store
store = pbzarr.create(
"sample.pbz.zarr",
contigs=["chr1", "chr2"],
contig_lengths=[248_956_422, 242_193_529],
)
# Add a track
track = store.create_track("depths", dtype="uint32", columns=["sample_A", "sample_B"])
# Write data
import numpy as np
track["chr1", 0:1000] = np.random.randint(0, 100, size=(1000, 2), dtype="uint32")
# Query data
data = track.query("chr1:0-1000", columns="sample_A")
# Open an existing store
store = pbzarr.open("sample.pbz.zarr")
track = store["depths"]
# Slice-based access
data = track["chr1", 0:1000, "sample_A"]
# Dask backend for lazy/parallel computation
store = pbzarr.open("sample.pbz.zarr", backend="dask")
lazy = store["depths"].query("chr1:0-1000000")
result = lazy.compute()
Features
- Zarr v3 only with full codec and storage backend support
- NumPy and Dask backends for eager or lazy computation
- Region query syntax:
"chr1:1000-2000", tuples, or slice notation - Column filtering by name or index
- Escape hatches to raw
zarr.Groupandzarr.Arrayobjects - Self-describing tracks with independent dtype, chunking, and metadata
Links
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pbzarr-0.1.0.tar.gz.
File metadata
- Download URL: pbzarr-0.1.0.tar.gz
- Upload date:
- Size: 42.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1043117a50ec679399537e2c375c73fc8dc402d7349dec26cf7cf11b61b0e5aa
|
|
| MD5 |
c440ee160bd9c4492b80c4ff1908b43e
|
|
| BLAKE2b-256 |
8738a7ebb92b61456896068e57fe2c7949ddae7748b1d7a8b8993da6de150a90
|
Provenance
The following attestation bundles were made for pbzarr-0.1.0.tar.gz:
Publisher:
release.yml on pbzarr/pbzarr-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pbzarr-0.1.0.tar.gz -
Subject digest:
1043117a50ec679399537e2c375c73fc8dc402d7349dec26cf7cf11b61b0e5aa - Sigstore transparency entry: 1249652971
- Sigstore integration time:
-
Permalink:
pbzarr/pbzarr-py@6af4079aacafcfced17a7aba98e93e15051d9c4e -
Branch / Tag:
refs/heads/main - Owner: https://github.com/pbzarr
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@6af4079aacafcfced17a7aba98e93e15051d9c4e -
Trigger Event:
push
-
Statement type:
File details
Details for the file pbzarr-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pbzarr-0.1.0-py3-none-any.whl
- Upload date:
- Size: 14.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ab10219f036bd2238dd6911b98028b9ba568240401c9f382d05070f4c6ae368a
|
|
| MD5 |
8c83ecb19d1a34190f5447442d8755b1
|
|
| BLAKE2b-256 |
96e3f94e09ef14fad0a36924924c84a565f5ee91c6d8c5dc5a1de9abe4e2f229
|
Provenance
The following attestation bundles were made for pbzarr-0.1.0-py3-none-any.whl:
Publisher:
release.yml on pbzarr/pbzarr-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pbzarr-0.1.0-py3-none-any.whl -
Subject digest:
ab10219f036bd2238dd6911b98028b9ba568240401c9f382d05070f4c6ae368a - Sigstore transparency entry: 1249653105
- Sigstore integration time:
-
Permalink:
pbzarr/pbzarr-py@6af4079aacafcfced17a7aba98e93e15051d9c4e -
Branch / Tag:
refs/heads/main - Owner: https://github.com/pbzarr
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@6af4079aacafcfced17a7aba98e93e15051d9c4e -
Trigger Event:
push
-
Statement type: