Save and load genomic ranges objects to file
This package implements methods for saving and loading GenomicRanges and GenomicRangesList objects. It provides a language-agnostic method for serializing genomic coordinates in these objects, as well as data in related objects like sequence information. To get started, install the package from PyPI:
pip install dolomite-ranges
We can then save a GenomicRanges to a file, preserving its metadata and mcols:
import os
from tempfile import mkdtemp
from dolomite_base import read_object, save_object
from genomicranges import GenomicRanges
from iranges import IRanges
import dolomite_ranges
gr = GenomicRanges(
seqnames=["chrA", "chrB", "chrC"],
ranges=IRanges([10, 30, 2200], [20, 50, 30]),
strand=["*", "+", "-"],
)
dir = os.path.join(mkdtemp(), "granges")
save_object(gr, dir)
roundtrip = read_object(dir)
Similarly save and load a GenomicRangesList to a file,
import os
from tempfile import mkdtemp
from dolomite_base import read_object, save_object
from genomicranges import GenomicRanges, SeqInfo
from iranges import IRanges
import dolomite_ranges
a = GenomicRanges(
seqnames=["chr1", "chr2", "chr1", "chr3"],
ranges=IRanges([1, 3, 2, 4], [10, 30, 50, 60]),
strand=["-", "+", "*", "+"],
mcols=BiocFrame({"score": [1, 2, 3, 4]}),
)
b = GenomicRanges(
seqnames=["chr2", "chr4", "chr5"],
ranges=IRanges([3, 6, 4], [30, 50, 60]),
strand=["-", "+", "*"],
mcols=BiocFrame({"score": [2, 3, 4]}),
)
grl = GenomicRangesList(ranges=[a, b], names=["a", "b"])
dir = os.path.join(mkdtemp(), "granges_list")
save_object(gr, dir)
roundtrip = read_object(dir)
Note
This project has been set up using PyScaffold 4.5. For details and usage information on PyScaffold see https://pyscaffold.org/.
Metadata
Release files for dolomite-ranges 0.4.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 | Provenance | |
|---|---|---|---|---|
| dolomite_ranges-0.4.1.tar.gz | 25.4 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dolomite_ranges-0.4.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 37.3 kB
Release files / dolomite_ranges-0.4.1.tar.gz
| Download URL | dolomite_ranges-0.4.1.tar.gz |
|---|---|
| Size | 25.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
386d8e53d3e40f3b01d51636b07f025748489d7753649621f4e90c3c90dfff3c
|
|
BLAKE2b-256 checksum How to use checksums |
11771bfe18a0830ca2ed77234df5d7d0963a5a390a5d3ec2d0e2a61a0ffdb70a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 14, 2026.
Transparency logRelease files / dolomite_ranges-0.4.1-py3-none-any.whl
| Download URL | dolomite_ranges-0.4.1-py3-none-any.whl |
|---|---|
| Size | 11.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
73b9fd12cffcc135a6ccfe5355da9cfbaa088f7dd534f79d38404d09c7a68610
|
|
BLAKE2b-256 checksum How to use checksums |
495a465a18229c42460b78ba190bd63ca760b4e5cc36162d1ade7da6d7a9b5aa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 14, 2026.
Transparency logSecurity for dolomite-ranges 0.4.1
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for dolomite_ranges-0.4.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 14, 2026.
Transparency logA 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.