Metadata-Version: 2.5
Name: singlecellexperiment
Version: 0.7.0
Summary: Container class for single-cell experiments
Project-URL: Homepage, https://github.com/BiocPy/singlecellexperiment
Project-URL: Documentation, https://biocpy.github.io/singlecellexperiment/
Project-URL: Source, https://github.com/BiocPy/singlecellexperiment
Project-URL: Bug Tracker, https://github.com/BiocPy/singlecellexperiment/issues
Author-email: Jayaram Kancherla <jayaram.kancherla@gmail.com>
License: The MIT License (MIT)
        
        Copyright (c) 2022 Genentech, Inc.
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: AUTHORS.md
License-File: LICENSE.txt
Keywords: RNA-seq,bioinformatics,single-cell,transcriptomics
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Classifier: Typing :: Typed
Requires-Python: >=3.9
Requires-Dist: compressed-lists>=0.4.3
Requires-Dist: summarizedexperiment>=0.6.3
Provides-Extra: optional
Requires-Dist: anndata==0.9.2; (python_full_version < '3.10') and extra == 'optional'
Requires-Dist: anndata>0.9.2; (python_full_version >= '3.10') and extra == 'optional'
Requires-Dist: delayedarray; extra == 'optional'
Requires-Dist: h5py; extra == 'optional'
Requires-Dist: hdf5array; extra == 'optional'
Requires-Dist: mudata==0.2.3; (python_full_version < '3.10') and extra == 'optional'
Requires-Dist: mudata>0.2.3; (python_full_version >= '3.10') and extra == 'optional'
Requires-Dist: numpy==1.24.4; (python_full_version < '3.10') and extra == 'optional'
Requires-Dist: numpy>1.24.4; (python_full_version >= '3.10') and extra == 'optional'
Provides-Extra: testing
Requires-Dist: anndata==0.9.2; (python_full_version < '3.10') and extra == 'testing'
Requires-Dist: anndata>0.9.2; (python_full_version >= '3.10') and extra == 'testing'
Requires-Dist: delayedarray; extra == 'testing'
Requires-Dist: h5py; extra == 'testing'
Requires-Dist: hdf5array; extra == 'testing'
Requires-Dist: mudata==0.2.3; (python_full_version < '3.10') and extra == 'testing'
Requires-Dist: mudata>0.2.3; (python_full_version >= '3.10') and extra == 'testing'
Requires-Dist: numpy==1.24.4; (python_full_version < '3.10') and extra == 'testing'
Requires-Dist: numpy>1.24.4; (python_full_version >= '3.10') and extra == 'testing'
Requires-Dist: pytest; extra == 'testing'
Requires-Dist: pytest-cov; extra == 'testing'
Description-Content-Type: text/markdown

[![Project generated with PyScaffold](https://img.shields.io/badge/-PyScaffold-005CA0?logo=pyscaffold)](https://pyscaffold.org/)
[![PyPI-Server](https://img.shields.io/pypi/v/SingleCellExperiment.svg)](https://pypi.org/project/SingleCellExperiment/)
![Unit tests](https://github.com/BiocPy/SingleCellExperiment/actions/workflows/run-tests.yml/badge.svg)

# 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](https://bioconductor.org/packages/release/bioc/html/SingleCellExperiment.html).


## Install

To get started, install the package from [PyPI](https://pypi.org/project/singlecellexperiment/)

```bash
pip install singlecellexperiment
```

## Usage

The `SingleCellExperiment` extends [RangedSummarizedExperiment](https://github.com/BiocPy/SummarizedExperiment) 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` or `column_pairs`: Stores relationships between features or cells.

Readers are available to parse h5ad or `AnnData` objects to SCE:

```python
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***

```python
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 `RangedSummarizedExperiment`, most methods especially slicing and accessors are inherited from the parent classes.
Checkout the [documentation](https://biocpy.github.io/SingleCellExperiment/) for more info.

<!-- pyscaffold-notes -->

## Note

This project has been set up using PyScaffold 4.5. For details and usage
information on PyScaffold see https://pyscaffold.org/.
