Skip to main content

gwseq_io

Read the files genome-scale sequencing produces, from Python or the command line. The parsing, indexing and binning are done in Rust, and results reach numpy without a copy.

Format What you can do Reference
bigWig, bigBed Read binned values and entries, write files, convert from bedGraph, WIG and BED bbi_api
BED, peak tables Read into memory, with the same calls as a bigBed bed_api
GTF, GFF3 Read records and gene models, sort, index gtf_api
FASTA Read bases and base probabilities, index fasta_api
BAM, CRAM Read alignments, index, pile up into a coverage bigWig alignment_api
HiC Read contact matrices, quantify contacts hic_api

Every format reads from a local path or an http(s):// URL, into numpy arrays and tables of columns.

Every example in these pages is run by the test suite, and every signature is checked against the package's source.

Install

pip install gwseq-io

This installs the package, the gwseq-io command and numpy. Only a source distribution is published, so pip compiles the extension on your machine. That needs Rust 1.85 or newer and Python 3.11 or newer. The extension is pure Rust, so it needs no C compiler or Python headers.

cargo install --path crates/gwseq-io-cli, from a checkout, builds the same command without Python.

Quick start

>>> import gwseq_io
>>> with gwseq_io.open("signal.bw", "w", chr_sizes={"chr1": 10_000}) as writer:
...     writer.write_values("chr1", 0, 100, [0.5, 1.0, 1.5, 2.0])
>>> reader = gwseq_io.open("signal.bw")
>>> reader
<gwseq_io.BigWigReader chromosomes=1>
>>> reader.read_values("chr1:1-400", bin_size=100)
array([[0.5, 1. , 1.5, 2. ]], dtype=float32)
>>> reader.quantify(["chr1:1-200", "chr1:201-400"])
array([0.75, 1.75], dtype=float32)

The same from the command line:

$ gwseq-io read signal.bw -r chr1:1-400 --bin-size 100
chr1    0    400    0.5    1    1.5    2
$ gwseq-io quantify signal.bw -r chr1:1-200 -r chr1:201-400
chr1    0    200    0.75
chr1    200  400    1.75

Metadata

Release files for gwseq-io 0.9.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gwseq-io 0.9.0
File Size Uploaded Provenance Actions
gwseq_io-0.9.0.tar.gz 1.5 MB Without provenance Details for gwseq_io-0.9.0.tar.gz

Release files / gwseq_io-0.9.0.tar.gz

Download URL gwseq_io-0.9.0.tar.gz
Size 1.5 MB
Tags Source
SHA-256 checksum
How to use checksums
aa14e6eb5fa718ca61e30b0a46c1c73d8b7ad36572e103d4581616965cdeeb39
BLAKE2b-256 checksum
How to use checksums
65107230f1075eaa83799f030d703833e467d4fe0dae57616b9bc4edd9e6a041
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.8

Security for gwseq-io 0.9.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.9.0 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page