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.3.tar.gz (44.8 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.3-py3-none-any.whl (57.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: scdrakex-1.1.3.tar.gz
  • Upload date:
  • Size: 44.8 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.3.tar.gz
Algorithm Hash digest
SHA256 67989cde69c9a6577bebe6698a2510d1aed33cc119f466893c933df86f72a486
MD5 e5b4a2d3e09ed4f93852e40feaa281f7
BLAKE2b-256 d728317a3f8811ffcb10e1ae7a0050b24c912acadc20a7734938e34483b91e4e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: scdrakex-1.1.3-py3-none-any.whl
  • Upload date:
  • Size: 57.0 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 0762eb6f43823c2c0c2eafcd6a7ab40e26f409960e62b382589cffc1937ffa10
MD5 00a071eed7e80bba376ec01f02d9fa99
BLAKE2b-256 9e96602114bca5f4b088629543b827f4467f1b14032596f0dd88b5f6292aa7d2

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