Skip to content

closmouz/scPT

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

we present a prompt-leaning framework that integrates gene expression data into large language models (LLMs) to generate low-dimensional cell embeddings, called scPT. By generating prompts from gene expression profiles and putting them into transformer layers, scPT enhances the LLM embeddings, effectively fusing expression and text identity information.

Requirements

  • Python==3.10
  • CUDA 12.2

Installation

To install scPT with Nvidia GPU CUDA support, for Linux Systems:

conda create -n scPT python=3.10
conda activate scPT
pip install -r requirements.txt

Data availability

  • All the data can be found in the supplementary materials of the article.
  • The model expects input files in .h5ad format.
  • asap.py: example script for ASAP dataset preprocessing.

Running

python train.py

Hyperparameters and datasets can be easily adjusted by editing the files as needed.

Tutorial

  • You can download the nomic-ai from https://huggingface.co/nomic-ai/nomic-embed-text-v2-moe/tree/main.
  • Use train.py to train the model, then you can obtain the data embeddings and model parameters.
  • We use result.py to perform the final result analysis for all methods, the results of the spatial data can be found in the spatial folder.

About

single-cell prompt-leaning LLM

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages