Metadata-Version: 2.4
Name: sclab
Version: 0.4.1
Summary: sclab
Author-email: Argenis Arriojas <ArriojasMaldonado001@umb.edu>
Requires-Python: >=3.10,<=3.13
Description-Content-Type: text/markdown
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
License-File: LICENSE
Requires-Dist: anndata
Requires-Dist: anywidget
Requires-Dist: bbknn>=1.6.0
Requires-Dist: ipywidgets
Requires-Dist: itables<2.4
Requires-Dist: matplotlib
Requires-Dist: numpy
Requires-Dist: pandas
Requires-Dist: plotly<6.0
Requires-Dist: requests
Requires-Dist: scikit-learn
Requires-Dist: scipy
Requires-Dist: svgpathtools
Requires-Dist: tqdm
Requires-Dist: jupyterlab>=4.3.6 ; extra == "jupyter"
Requires-Dist: anndata2ri>=1.3 ; extra == "r"
Requires-Dist: rpy2>=3.5 ; extra == "r"
Requires-Dist: scanpy[leiden, skmisc]>=1.10 ; extra == "scanpy"
Requires-Dist: pytest>=8.3.4 ; extra == "test"
Project-URL: Bug Tracker, https://github.com/umbibio/sclab/issues
Project-URL: Changelog, https://github.com/umbibio/sclab/blob/main/CHANGELOG.md
Project-URL: Documentation, https://sclab.readthedocs.io
Project-URL: Homepage, https://github.com/umbibio/sclab
Project-URL: Repository, https://github.com/umbibio/sclab.git
Provides-Extra: jupyter
Provides-Extra: r
Provides-Extra: scanpy
Provides-Extra: test

# SCLab

SCLab is an interactive single-cell analysis toolkit that provides a seamless interface for analyzing and visualizing single-cell RNA sequencing data. Built on top of popular tools like scanpy and AnnData, SCLab offers an event-driven architecture for real-time updates and interactive visualizations.

## Features

- **Interactive Data Analysis**: Built-in dashboard with real-time updates
- **Quality Control**: Comprehensive QC metrics and filtering capabilities
- **Preprocessing**: Normalization, log transformation, and scaling with progress tracking
- **Dimensionality Reduction**: PCA with batch effect correction support
- **Visualization**: Interactive plots and tables using plotly and itables
- **Event System**: Robust event-driven architecture for real-time updates

## Installation

```bash
pip install sclab
```

## Quick Start

Open a Jupyter Notebook and run the following:

```python
from IPython.display import display
from sclab import SCLabDashboard
import scanpy as sc

# Load your data
adata = sc.read_10x_h5("your_data.h5")

# Create dashboard
dashboard = SCLabDashboard(adata, name="My Analysis")

# Display dashboard
display(dashboard)

# The dashboard provides easy access to components:
# dashboard.ds  # Dataset (wrapper for AnnData)
# dashboard.pl  # Plotter
# dashboard.pr  # Processor

# the active AnnData object is found within the dataset object:
# dashboard.ds.adata

# by default, the dashboard will update the loaded AnnData object in-place
```

## Components

### SCLabDashboard

The main interface that integrates all components with a tabbed layout:
- Main graph for visualizations
- Results panel
- Observations table
- Genes table
- Event logs

### Dataset

Handles data management with:
- AnnData integration
- Interactive tables
- Row selection and filtering
- Metadata handling

### Processor

Handles data processing steps. It is configurable with custom steps implementing the `ProcessorStepBase` interface. This package provides multiple examples of steps:

- QC
- Preprocessing
- PCA
- Nearest Neighbors
- UMAP
- Clustering

### Plotter

Provides interactive visualizations with:
- Real-time updates
- Customizable plots
- Batch effect visualization
- Export capabilities

## Requirements

- Python ≥ 3.12
- anndata ≥ 0.11.3
- scanpy ≥ 1.10.4
- Other dependencies listed in pyproject.toml

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

## License

This project is licensed under the BSD 3-Clause License - see the [LICENSE](LICENSE) file for details.

## Citation

If you use SCLab in your research, please cite:

```bibtex
@software{sclab2025,
  author = {Arriojas, Argenis},
  title = {SCLab: Interactive Single-Cell Analysis Toolkit},
  year = {2025},
  publisher = {GitHub},
  url = {https://github.com/umbibio/sclab}
}

