Metadata-Version: 2.4
Name: clusterde_py
Version: 0.1.0
Summary: Minimal implementation of the ClusterDE Algorithm for marker gene analysis vs. a synthetic null
Project-URL: Homepage, https://github.com/krisrs1128/clusterde-devel
Project-URL: Issues, https://github.com/krisrs1128/clusterde-devel/issues
Author-email: Kris Sankaran <ksankaran@wisc.edu>
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Requires-Python: >=3.10
Requires-Dist: anndata>=0.8
Requires-Dist: numpy>=1.21
Requires-Dist: pandas>=1.3
Requires-Dist: scanpy>=1.9
Requires-Dist: scdesigner>=0.0.23
Requires-Dist: scikit-learn>=1.0
Requires-Dist: scipy>=1.7
Requires-Dist: torch>=1.10
Description-Content-Type: text/markdown

# clusterde_py

A Python implementation of the ClusterDE algorithm for differential expression analysis with synthetic null comparison.

## Installation

```bash
pip install clusterde_py
```

## Usage

```python
from clusterde_py import find_markers
import scanpy as sc
from anndata import AnnData

# Load your data
adata = ...  # AnnData object with cluster labels in adata.obs

# Find markers between two clusters
result = find_markers(
    adata,
    cluster_key="cell_type",
    group1="cluster1", 
    group2="cluster2",
    fdr=0.05
)

# Result contains target p-values, null p-values, contrast scores, and q-values
print(result.head())
```

## Features

- **Synthetic null generation**: Uses scDesigner to create null datasets without cluster structure
- **Contrast scoring**: Compares real vs null p-values to identify true differential expression
- **FDR control**: Uses Clipper algorithm for false discovery rate control
- **Flexible pipeline**: Supports different contrast methods and thresholding approaches

## Development

To install in development mode:

```bash
git clone https://github.com/krisrs1128/clusterde-devel.git
cd clusterde-devel
pip install -e .
```

## License

MIT
