Skip to main content

Project generated with PyScaffold PyPI-Server Unit tests

Save and load SummarizedExperiments in Python

Introduction

The dolomite-se package is the Python counterpart to the alabaster.se R package, providing methods for saving/reading SummarizedExperiment or RangeSummarizedExperiment objects within the dolomite framework. All components of the SummarizedExperiment - assays, row data and column data - are saved to their respective file representations, which can be loaded in a new R/Python environment for cross-language analyses.

Quick start

Let's mock up a SummarizedExperiment:

import summarizedexperiment
import biocframe
import numpy

se = summarizedexperiment.SummarizedExperiment(
    assays={ "counts": numpy.random.rand(1000, 200) },
    row_data=biocframe.BiocFrame(
        { "foo": numpy.random.rand(1000) }, 
        row_names = ["gene" + str(i) for i in range(1000)]
    ),
    column_data=biocframe.BiocFrame(
        { "whee": numpy.random.rand(200) },
        row_names = ["cell" + str(i) for i in range(200)]
    )
)

Now we can save it:

from dolomite_base import save_object
import dolomite_se
import os
from tempfile import mkdtemp

path = os.path.join(mkdtemp(), "test")
save_object(se, path)

And load it again, e,g., in a new session:

from dolomite_base import read_object

roundtrip = read_object(path)
## Class SummarizedExperiment with 1000 features and 200 samples
##   assays: ['counts']
##   row_data: ['foo']
##   column_data: ['whee']

This also works for RangeSummarizedExperiment objects storing row_ranges to the specified path.

Metadata

Release files for dolomite-se 0.3.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 dolomite-se 0.3.0
File Size Uploaded Provenance
dolomite_se-0.3.0.tar.gz 24.1 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for dolomite-se 0.3.0
File Interpreter ABI Platform
dolomite_se-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 32.9 kB

Release files / dolomite_se-0.3.0.tar.gz

Download URL dolomite_se-0.3.0.tar.gz
Size 24.1 kB
Tags Source
SHA-256 checksum
How to use checksums
33a89c9c57522c29010a13e8c7ce50e6db4910c1278865528b51cdeb375b5d3e
BLAKE2b-256 checksum
How to use checksums
b7b3db182abd2c0781bad72c162f8fd24e0b4017517dab1693afa51cd97e74ee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.7

Release files / dolomite_se-0.3.0-py3-none-any.whl

Download URL dolomite_se-0.3.0-py3-none-any.whl
Size 8.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e0aef8d4c95d5727b06fa5976b6be12575eb106cf981e696650e8cfd006f5324
BLAKE2b-256 checksum
How to use checksums
e9ba56c33f4a5ede0a58b44981ff73ea442c59a1688b84dd6c30c1f008b3a1aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.7

Security for dolomite-se 0.3.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.

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