Skip to main content

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

  1. 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).

  2. 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

scdrakex-1.1.1.tar.gz (45.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

scdrakex-1.1.1-py3-none-any.whl (60.2 kB view details)

Uploaded Python 3

File details

Details for the file scdrakex-1.1.1.tar.gz.

File metadata

  • Download URL: scdrakex-1.1.1.tar.gz
  • Upload date:
  • Size: 45.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.12

File hashes

Hashes for scdrakex-1.1.1.tar.gz
Algorithm Hash digest
SHA256 2211f21d185eb235375e0c22bd296f3ae5c45c38c5ec9b6b8c80b3164d1219b8
MD5 7c20e5381918e015932674dbbad81c8e
BLAKE2b-256 60f430520f758ac3fff99a22fca6779192791aa48d99d21028350876e65070a3

See more details on using hashes here.

File details

Details for the file scdrakex-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: scdrakex-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 60.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.12

File hashes

Hashes for scdrakex-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 722f101eecc6f8c51a45d5e1c7e15870c16cf49c3ef2a6b88820e17a16200841
MD5 67efc58a4f0fc3a1021750e791d4fa23
BLAKE2b-256 a131c5695371539d44270b0021aba5cffa9441f2f0c535c4fc6aa0b67cf227b0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page