Skip to main content

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.

import anndata

adata = [single cell gene expression anndata object]

Now, you are ready to discover some programs! Note that you should ensure the gene expression data is log-normalized counts:

# if adata is raw counts:
import scanpy as sc

# normalize to log-cp10k counts
sc.pp.normalize_total(adata, 1e4)
sc.pp.log1p(adata)
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:

# 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”)

Metadata

Release files for sceodesic 0.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sceodesic 0.0.5
File Size Uploaded Provenance Actions
sceodesic-0.0.5.tar.gz 18.4 kB Without provenance Details for sceodesic-0.0.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sceodesic 0.0.5
File Interpreter ABI Platform Actions
sceodesic-0.0.5-py3-none-any.whl Python 3 none any Details for sceodesic-0.0.5-py3-none-any.whl

Total release size: 42.9 kB

Release files / sceodesic-0.0.5.tar.gz

Download URL sceodesic-0.0.5.tar.gz
Size 18.4 kB
Tags Source
SHA-256 checksum
How to use checksums
d2f6e79f8f8ff77c2104e110d3f1feb483aa34d66ce5bded545bfb845b187d5a
BLAKE2b-256 checksum
How to use checksums
4da9d1102cc0ee9d231280e660b87b5da0a998d629aaf06f25383da90cdfbc38
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.0

Release files / sceodesic-0.0.5-py3-none-any.whl

Download URL sceodesic-0.0.5-py3-none-any.whl
Size 24.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
890f1b9df35dec3a28bf0591367f5f6a12e6ba523b0efd2893abbf2c5fd69cac
BLAKE2b-256 checksum
How to use checksums
a96756a8fd588a179d65d77f58548ccb620178851bf62b72f59c55b3c9d54553
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.0

Security for sceodesic 0.0.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page