# GeneCluster

GeneCluster, a gene clustering method for Single Cell RNA-seq data.

## Requirements
python --- 3.8.10

scanpy --- 1.8.2

umap-learn --- 0.5.3

torch --- 1.8.1

torchvision --- 0.9.1

faiss-gpu --- 1.7.1

## Usage
The raw single-cell data in h5 format first goes through DataProcess.py to get the gene-cell in csv format, and the csv format is fed into the model for training.

```bash
# Run the GeneCluster package with parameters
GeneCluster --data_path path/to/dataset.csv --epochs 100 --nmb_cluster 20 --lr 0.01 --batch 128 --ckpt_path train_res   
```

Please note that the model outputs gene embeddings extracted by training (features.npy), which can be used to predict gene co-expression relationships and identify gene modules.


## Example

```python
from genecluster import main

args = {
    "data_path": "path/to/dataset.csv",
    "epochs": 100,
    "nmb_cluster": 10,
    "lr":0.01,
    "batch":128,
    "ckpt_path":"train_res"
    # other arguments
}

main(args)
```

## Contact

Yuting Bai (yutingya820@163.com)