scGPT embedding extension for scDrake
Project description
scDrake's scGPT Extension
This code is fork from scGPT, which is a single-cell GPT model for gene expression data 1. This extension adds embedding calculation support for the scDrake framework2, which is a framework for building and deploying single-cell data analysis. This extension is designed to work with the scDrake framework and trying to provide a set of tools for building and deploying single-cell models.
Installation
Dependencies
- Python >= 3.8
- PyTorch >= 2.3.0
- ScanPY >= 1.9.8
install
$ python -m pip install torch scanpy scdrakex
install for development
$ python -m pip install -e .
Pretrained scGPT Model
available at scGPT
Usage
from scdrakex.task.r_cell_emb import r_embed_data
# count_matrix: a sparse matrix of shape (n_cells, n_genes)
# genes: a list of gene symbols
# model_dir: the path to the Pretrained scGPT Model directory
# output: ndarray of shape (n_cells, n_embedding)
embeding = r_embed_data(
count_matrix = count_matrix,
genes = genes,
model_dir = "scGPT_human",
)
References
-
Cui, H., Wang, C., Maan, H. et al. scGPT: toward building a foundation model for single-cell multi-omics using generative AI. Nat Methods 21, 1470–1480 (2024). ↩
-
Kubovčiak, J., Kolář, M., & Novotný, J. (2023). Scdrake: a reproducible and scalable pipeline for scRNA-seq data analysis. Bioinformatics Advances, 3(1). https://doi.org/10.1093/bioadv/vbad089 ↩
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file scdrakex-1.1.0.tar.gz.
File metadata
- Download URL: scdrakex-1.1.0.tar.gz
- Upload date:
- Size: 44.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c2e29b97b3ca53a72c1133bda036201fa344df75f8eec68ea12986abcb33e1b6
|
|
| MD5 |
61becea7447cb9d0dcb6450fc4ee6250
|
|
| BLAKE2b-256 |
d683100404a4349d409d6c8bc07c6d27302fca48a094a05711e3f8226d1cab15
|
File details
Details for the file scdrakex-1.1.0-py3-none-any.whl.
File metadata
- Download URL: scdrakex-1.1.0-py3-none-any.whl
- Upload date:
- Size: 57.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.8.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
88ed381c65184f2f255682e8c154fec82c06da9694287d8388a3d9010a43d620
|
|
| MD5 |
2c2e9e955e3a003ed2d44838340a57bc
|
|
| BLAKE2b-256 |
362780334098028746be6ba9f52a6f1186685f357cbc3e79fc46598c051c6e3e
|