Skip to main content

Generate sceodesic embeddings from an input scRNA-seq dataset.

Project description

Sceodesic

Sceodesic is a Python package that implements the gene program discovery algorithm described by Sinan Ozbay, Aditya Parekh, and Rohit Singh in “Navigating the manifold of single-cell gene coexpression to discover interpretable gene programs.” Given a single-cell gene expression dataset, Seodesic allows the user to:

  1. Discover meaningful gene programs from any single-cell gene expression data.
  2. Re-interpet gene expression data as levels of expression of the aforementioned gene programs.

This repository contains an implementation of the algorithm. Some examples of use can be found below in "Example Usage".

Installation

You can install Sceodesic by running the following in your command line:

``` git clone https://github.com/rohitsinghlab/sceodesic.git cd ./sceodesic # to directory containing pyproject.toml file pip install . ```

API Example Usage

Below is example usage of sceodesic in Python. First, make sure your single-cell gene expression data is in an anndata object, as below.

```python import anndata

adata = [single cell gene expression anndata object] ```

Now, you are ready to discover some programs!

```python from sceodesic import run_sceo

run_sceo(adata, num_hvg=300)

embeddings = adata.obsm['sceo_embeddings']

programs (loadings) stored in .varm, as a numpy array

programs = adata.varm['sceo_programs'] ```

embeddings is a 2D numpy array where rows represent cells and columsn represent levels of gene program expression. programs is a 2D numpy array where columns represent individual gene programs, with each entry of that column giving the weight of each individual gene\ in that program. After you have generated programs and the embeddings, it becomes possible to do a wide variety of downstream single cell analysis using these embeddings. For example, if our data is labelled by cell type with an obs column called "cell_type" , we can compute differential gene program expression across cell types as follows:

```python

Create new anndata object with embeddings

adata_sceo = anndata.AnnData(embeddings, obs=adata.obs)

sc.get.rank_genes_groups_df(adata = adata_sceo, group = “cell_type”) ```

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

sceodesic-0.0.1.tar.gz (15.5 kB view details)

Uploaded Source

Built Distribution

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

sceodesic-0.0.1-py3-none-any.whl (20.9 kB view details)

Uploaded Python 3

File details

Details for the file sceodesic-0.0.1.tar.gz.

File metadata

  • Download URL: sceodesic-0.0.1.tar.gz
  • Upload date:
  • Size: 15.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for sceodesic-0.0.1.tar.gz
Algorithm Hash digest
SHA256 8d54ca4c5fa656535513dc714ff5d61639168029a5af4c13e7df8c3bb49676f1
MD5 ba3ab7507a370460b98547ad42e4ce7c
BLAKE2b-256 8f1df74fb053e759d744ec6ccff4d0a3bbd358ef67ef28d7574b0a4f0bb1dcf9

See more details on using hashes here.

File details

Details for the file sceodesic-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: sceodesic-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 20.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for sceodesic-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f272d6029afaa720eb808ab0fbe0047465ad8cc04e1a4682c5e23fe87ace54bb
MD5 2b938f88041fe11e1a688741708309cb
BLAKE2b-256 41d02928d6e9205cbc8155b4e8f31a7ed278c954d31140aa2c86cafac4c50ad0

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