Metadata-Version: 2.4
Name: readseurat
Version: 0.1.0
Summary: Read Seurat .rds and .h5seurat file to anndata object. Implemented in pure python.
License-Expression: MIT
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3 :: Only
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: Typing :: Typed
Requires-Dist: anndata>=0.12.7
Requires-Dist: click>=8.3.1
Requires-Dist: h5py>=3.11.0
Requires-Dist: numpy>=1.26.4
Requires-Dist: pandas>=2.2.2
Requires-Dist: scipy>=1.12.0
Requires-Dist: xarray>=2026.1.0
Requires-Dist: ipywidgets>=8.1.8 ; extra == 'test'
Requires-Dist: scanpy>=1.11.5 ; extra == 'test'
Requires-Dist: pytest>=8.3.0 ; extra == 'test'
Requires-Dist: ipython>=9.9.0 ; extra == 'test'
Requires-Dist: ipykernel>=7.1.0 ; extra == 'test'
Requires-Dist: ruff>=0.14.14 ; extra == 'test'
Requires-Dist: ty>=0.0.17 ; extra == 'test'
Requires-Dist: pytest-cov>=7.0.0 ; extra == 'test'
Requires-Dist: twine>=6.2.0 ; extra == 'test'
Requires-Dist: typing-extensions>4.4 ; extra == 'test'
Maintainer: harryhaller001
Maintainer-email: harryhaller001 <harryhaller001@gmail.com>
Requires-Python: >=3.11
Project-URL: Source, https://github.com/harryhaller001/readseurat
Provides-Extra: test
Description-Content-Type: text/markdown

# readseurat

Read Seurat `.rds` and `.h5seurat` files into [AnnData](https://anndata.readthedocs.io/) — implemented in pure Python, no R required.

The code for rds parsing is based on the `rdata` package (https://github.com/vnmabus/rdata).

## Installation

```bash
pip install readseurat
```

## Python API

```python
import readseurat

# Read an RDS file containing a Seurat object
adata = readseurat.read_seurat("pbmc3k.rds")

# Read an H5Seurat file
adata = readseurat.read_h5seurat("pbmc3k.h5seurat")
```

## Commandline

Convert a Seurat file to H5AD format:

```bash
# From RDS
readseurat convert pbmc3k.rds pbmc3k.h5ad

# From H5Seurat
readseurat convert pbmc3k.h5seurat pbmc3k.h5ad
```

```
Usage: readseurat convert [OPTIONS] INPUT OUTPUT

  Convert a Seurat file (RDS or H5Seurat) to H5AD format.

Options:
  --format [rds|h5seurat]  Input file format. Inferred from file extension if
                           not specified.
  -h, --help               Show this message and exit.
```

## Citation

`rdata` package:

> Ramos-Carreño, C., & Rossi, T. (2024). rdata: A Python library for R datasets. Journal of Open Source Software, 9(104), 1–4. https://doi.org/10.21105/joss.07540
