pyBigWig
A package for accessing bigWig files using libBigWig
What it is and what it does
pyBigWig is a Python wrapper around libBigWig that lets you read and write bigWig and bigBed files—standard formats for storing genomic coordinate data and associated numeric values. It handles both local files and remote access over HTTP, making it useful for working with public genome browser datasets. The package is implemented as a C extension for performance, so it compiles at install time and requires system libraries.
You use it to open files, query summary statistics (mean, max, min, coverage, standard deviation) over genomic ranges, retrieve individual base values, and access interval data. For writing, you create a new file, add a header with chromosome information, and append intervals with values. The package supports exact or approximate statistics via zoom levels, and integrates with numpy for efficient array operations.
Use it for:
- Query mean coverage or peak values across genomic regions from public datasets
- Extract base-level signal data for a chromosome range to feed into downstream analysis
- Create bigWig files from interval-value data for visualization in genome browsers
- Compute summary statistics (min/max/std) over binned intervals for rapid region comparisons
- Access remote bigBed files without downloading entire files locally
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A Python C extension for reading and writing bigWig and bigBed genomic data files, with support for local and remote file access via libBigWig.
Yes, if you work with bigWig or bigBed genomic data files. The package is stable, actively maintained, and has no known vulnerabilities. Install friction is moderate due to C compilation and system library requirements, but these are standard in bioinformatics environments. MIT license poses no restrictions.
Install
pybigwig on PyPI
pip
pip install pybigwiguv
uv add pybigwigpoetry
poetry add pybigwigInstalling pyBigWig
Before you install
Medium install friction due to C extension compilation requiring libcurl and zlib headers and libraries. Package is actively maintained with recent releases and has been stable since 2015.
License in practice
MIT license is permissive; you may use, modify, and distribute this package freely with minimal restrictions.
Quickstart
pip install pybigwig
import pyBigWig
bw = pyBigWig.open("file.bw")
stats = bw.stats("chr1", 0, 3)
bw.close()
libcurl (with curl-config) and zlib headers and libraries must be installed on your system before pip install will succeed.
Verify before relying
- Whether numpy integration (mentioned in description) is optional or required at runtime
- Performance characteristics for large-scale genomic queries or remote file streaming
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 212 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 164,324/month — #10,553 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pybigwig-0.3.25-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; pybigwig-0.3.25-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; pybigwig-0.3.25-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; pybigwig-0.3.25-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; pybigwig-0.3.25-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Keywords: bioinformatics, bigWig, bigBed
Tags
More Information Analysis packages
A drop-in replacement for Python's standard…
permissive · top 100 on PyPI
pyarrowpyarrow provides Python bindings to Apache…
permissive · top 100 on PyPI
networkxNetworkX provides data structures and…
permissive · top 1,000 on PyPI
snowflake-connector-pythonConnects Python applications to Snowflake data…
permissive · top 1,000 on PyPI
contourpyContourPy calculates contours of 2D…
permissive · top 1,000 on PyPI
snowflake-snowpark-pythonSnowpark Python provides APIs to query and…
permissive · top 1,000 on PyPI
pybigtoolspybigtools is a Python wrapper around a Rust…
permissive · top 15,000 on PyPI
pyrangesPyRanges provides efficient querying and…
permissive · top 15,000 on PyPI
bx-pythonbx-python provides Python classes and utilities…
permissive · top 15,000 on PyPI
pyensemblPyEnsembl provides a Python interface to query…
permissive · top 15,000 on PyPI
refgenieRefgenie manages standardized folder structures…
permissive · top 15,000 on PyPI
deepbiopDeepBioP is a deep learning preprocessing…
permissive · top 15,000 on PyPI
pybedtoolsWraps the BEDTools suite to perform genomic…
permissive · top 15,000 on PyPI
nclsNCLS provides a fast interval overlap query…
permissive · top 15,000 on PyPI
cyvcf2cyvcf2 is a Cython wrapper around htslib that…
permissive · top 15,000 on PyPI
pysampysam reads, manipulates, and writes genomic…
permissive · top 5,000 on PyPI