Metadata-Version: 2.1
Name: scouter-learn
Version: 0.1.2
Summary: A transcriptional response predictor for unseen genetic perturbtions with LLM embeddings
Home-page: https://github.com/PancakeZoy/scouter
Author: Ouyang Zhu, Jun Li
Author-email: ozhu@nd.edu
Requires-Python: >=3.11.0
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: torch>=2.0.0
Requires-Dist: tqdm>=4.0.0
Requires-Dist: anndata>=0.10.0
Requires-Dist: pandas>=2.2.0
Requires-Dist: numpy>=1.26.0
Requires-Dist: scanpy>=1.10.0
Requires-Dist: seaborn>=0.13.0
Requires-Dist: matplotlib>=3.9.0
Requires-Dist: scikit-learn>=1.5.0
Requires-Dist: scipy>=1.14.0

<p align="left">
  <img src="https://github.com/PancakeZoy/scouter/blob/master/img/ScouterLogo.png?raw=true" width="100" title="logo">
</p>

# Scouter: a transcriptional response predictor for unseen genetic perturbtions with LLM embeddings

Scouter is a deep neural network with simple architecture, for the task of predicting transcriptional response to unseen genetic perturbtions.

Scouter employs the LLM embeddings generated from text description of genes, enabling the perdiction on unseen genes.

For more details read our [manuscript]()
<p align="center">
  <img src="https://github.com/PancakeZoy/scouter/blob/master/img/workflow_horizontal.png?raw=true" width="750" title="logo">
</p>
<br><br><br>
<p align="center">
  <img src="https://github.com/PancakeZoy/scouter/blob/master/img/scouter_horizontal.png?raw=true" width="750" title="logo">
</p>

## Installation
`pip install scouter`

## Main API
Below is an example that includes main APIs to train `Scouter` on a perturbation dataset. 

```python
from scouter import Scouter, ScouterData

# please prepare the gene expression data (adata) and gene embedding dataframe (embd)
pertdata = ScouterData(adata=adata, embd=embd)
pertdata.setup_ad('embd_index')

# Model Training
scouter_model = Scouter(pertdata)
scouter_model.model_init()
scouter_model.train()

# Prediction
scouter_model.precit('GeneA+ctrl')
```

## Demos

| Name | Description |
|-----------------|-------------|
| [Model Tutorial](demo/ModelTutorial.ipynb) | A detailed tutorial on how to use Scouter on Adamson dataset, including preprocessing, paramter setting, model evaluation|
| [Unmatched Genes Tutorial](demo/UnmatchRemedy.ipynb) | A tutorial that illustrates the problem of unmatched genes between adata and embd, and provides a remedy.|
