Save and load single-cell experiments in the dolomite framework!
Project description
Save and write SingleCellExperiments in Python
Introduction
The dolomite-sce package is the Python counterpart to the alabaster.sce R package,
providing methods for saving/reading SingleCellExperiment objects within the dolomite framework.
Quick start
Let's mock up a SingleCellExperiment that contains reduced dimensions and alternative experiments,
from singlecellexperiment import SingleCellExperiment
import biocframe
import numpy
sce = SingleCellExperiment(
assays={"counts": numpy.random.rand(1000, 200)},
row_data=biocframe.BiocFrame(
{"foo": numpy.random.rand(1000), "bar": numpy.random.rand(1000)}
),
column_data=biocframe.BiocFrame(
{"whee": numpy.random.rand(200), "stuff": numpy.random.rand(200)}
),
reduced_dims={"tsnooch": numpy.random.rand(200, 4)},
alternative_experiments={
"very_useful_modality": SummarizedExperiment(
{"counts": numpy.random.rand(100, 200)}
)
},
)
Now we can save it:
from dolomite_base import save_object
import dolomite_sce
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 SingleCellExperiment with 1000 features and 200 cells
## assays: ['counts']
## row_data: ['foo']
## column_data: ['whee']
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dolomite_sce-0.3.0.tar.gz.
File metadata
- Download URL: dolomite_sce-0.3.0.tar.gz
- Upload date:
- Size: 22.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c0ea6bac61def80be194ad79c73f1fd2f6d0dc6dc732880ca5508550be7b74a8
|
|
| MD5 |
8a12d72642b7deaaefd3740b253142e4
|
|
| BLAKE2b-256 |
b5e897bb932fd43c87902ccbee6b265d426b1c475197b9f0d3c5d6d48782e040
|
File details
Details for the file dolomite_sce-0.3.0-py3-none-any.whl.
File metadata
- Download URL: dolomite_sce-0.3.0-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e2ef604454546f71c7a3440b5034bf947800fa472e1c4b4b42e540e03c0c93cb
|
|
| MD5 |
0bcecf043dcdafa4643460838f28dd77
|
|
| BLAKE2b-256 |
ac7f88e56d9aa30b1528d445db17b4571f7df29378522caa4e65a4c66d0082f6
|