Container class for single-cell experiments
Project description
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_pairs
orcolumn_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/.
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
Hashes for singlecellexperiment-0.4.7.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5eeb59faca8ffe4cb91b90c77c6cc1bbfad1264f67eaa25a4ce21a1f49b50abf |
|
MD5 | ebfec35e9d72c24ce9ede04d8c2acd79 |
|
BLAKE2b-256 | 4a19aebf9b34518dd202a493e9393d028be24b9000bfa0bbeac9c7d2aa236add |
Hashes for SingleCellExperiment-0.4.7-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cdf8450b3dd6492b1b433a4d4650d0b09dcfbb349e320de23dfb59bd9abb1b7c |
|
MD5 | c6a207d6b90c20f2af79acfc2a44ccb8 |
|
BLAKE2b-256 | e9aae22f3681651fdf5fa19e972ae810fe516d2c6071cb012a48cc49606d3038 |