skillfed

pyBigWig

A package for accessing bigWig files using libBigWig

pybigwig v0.3.25 164.3K downloads/30d#10,553 on PyPI250
Permissive license MIT Active released

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 pybigwig

uv

uv add pybigwig

poetry

poetry add pybigwig

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI ApprovedOperating System :: MacOSOperating System :: POSIXOperating System :: UnixProgramming Language :: CProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPython

Tags

bigwig bigbed file accessgenomic data format pythonbigwig statistics queriesbioinformatics file parsinggenome browser datainterval value storageremote bigwig access
bioinformaticsgenomicsfile-format

More Information Analysis packages