SingleCellExperiment
This package provides container class to represent single-cell experimental data as 2-dimensional matrices. In these matrices, the rows typically denote features or genomic regions of interest, while columns represent cells. In addition, a SingleCellExperiment (SCE) object may contain low-dimensionality embeddings, alternative experiments performed on same sample or set of cells. Follows Bioconductor's SingleCellExperiment.
Install
To get started, install the package from PyPI
pip install singlecellexperiment
Usage
The SingleCellExperiment extends RangeSummarizedExperiment and contains additional attributes:
reduced_dims: Slot for low-dimensionality embeddings for each cell.alternative_experiments: Manages multi-modal experiments performed on the same sample or set of cells.row_pairsorcolumn_pairs: Stores relationships between features or cells.
Readers are available to parse h5ad or AnnData objects to SCE:
import singlecellexperiment
sce = singlecellexperiment.read_h5ad("tests/data/adata.h5ad")
## output
class: SingleCellExperiment
dimensions: (20, 30)
assays(3): ['array', 'sparse', 'X']
row_data columns(5): ['var_cat', 'cat_ordered', 'int64', 'float64', 'uint8']
row_names(0):
column_data columns(5): ['obs_cat', 'cat_ordered', 'int64', 'float64', 'uint8']
column_names(0):
main_experiment_name:
reduced_dims(0): []
alternative_experiments(0): []
row_pairs(0): []
column_pairs(0): []
metadata(2): O_recarray nested
OR construct one from scratch
from singlecellexperiment import SingleCellExperiment
tse = SingleCellExperiment(
assays={"counts": counts}, row_data=df_gr, col_data=col_data,
reduced_dims={"tsne": ..., "umap": ...}, alternative_experiments={"atac": ...}
)
Since SingleCellExperiment extends RangeSummarizedExperiment, most methods especially slicing and accessors are applicable here.
Checkout the documentation for more info.
Note
This project has been set up using PyScaffold 4.5. For details and usage information on PyScaffold see https://pyscaffold.org/.
Release files for singlecellexperiment 0.5.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 | |
|---|---|---|---|
| singlecellexperiment-0.5.1.tar.gz | 1.1 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| SingleCellExperiment-0.5.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.1 MB
Release files / singlecellexperiment-0.5.1.tar.gz
| Download URL | singlecellexperiment-0.5.1.tar.gz |
|---|---|
| Size | 1.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d6b512ed6035e95b3f144f40cdf47ef079f56d3bb2c705a7e9fcab28006f6589
|
|
BLAKE2b-256 checksum How to use checksums |
39cb14f01ac246e32ce9a27eb21fec8de25f69e119e4a63ab0fc3f34b66a8d62
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|
Release files / SingleCellExperiment-0.5.1-py3-none-any.whl
| Download URL | SingleCellExperiment-0.5.1-py3-none-any.whl |
|---|---|
| Size | 14.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
21d2c6d32be4d73375bc3d8d988869ba8857fc6a16c46cb2b9fce4d008dc80bb
|
|
BLAKE2b-256 checksum How to use checksums |
907f79313e1ea239e168d51d05990b4c9e3b10b78b0468a453f5fcddc2fa3b93
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.7
|