Skip to main content

Gene Signal Pattern Analysis

Project description

Gene Signal Pattern Analysis

Mapping the gene space at single-cell resolution

Gene Signal Pattern Analysis is a Python package for mapping the gene space from single-cell data. For a detailed explanation of GSPA and potential downstream application, see:

Mapping the gene space at single-cell resolution with Gene Signal Pattern Analysis. Aarthi Venkat, Sam Leone, Scott E. Youlten, Eric Fagerberg, John Attanasio, Nikhil S. Joshi, Michael Perlmutter, Smita Krishnaswamy.

By considering gene expression values as signals on the cell-cell graph, GSPA enables complex analyses of gene-gene relationships, including gene cluster analysis, cell-cell communication, and patient manifold learning from gene-gene graphs.

Installation

pip install gspa

Requirements

GSPA requires Python >= 3.6. All other requirements are automatically installed by pip (see also requirements.txt).

The following have been tested: Python 3.6.15 (graphtools 1.5.3, tensorflow 2.6.2, keras 2.6.0, numpy 1.19.5, sklearn 0.24.2, scipy 1.5.4, tqdm 4.64.1, scanpy 1.7.2, phate 1.0.11) and Python 3.8.18 (graphtools 1.5.3, tensorflow 2.13.0, keras 2.13.1, numpy 1.22.4, sklearn 1.3.2, scipy 1.10.1, tqdm 4.66.4, scanpy 1.9.3, phate 1.0.11)

Usage example

import numpy as np
import gspa

# Create toy data
n_cells = 1000
n_genes = 50
data = np.random.normal(size=(n_cells, n_genes))

# GSPA operator constructs wavelet dictionary
gspa_op = gspa.GSPA()
gspa_op.construct_graph(data)
gspa_op.build_diffusion_operator()
gspa_op.build_wavelet_dictionary()

# Embed gene signals from wavelet dictionary
gene_signals = data.T # embed all measured genes
gene_ae, gene_pc = gspa_op.get_gene_embeddings(gene_signals)
gene_localization = gspa_op.calculate_localization()

See GSPA_example.ipynb above for test run on simulated single-cell data. More notebooks to generate paper figures available at https://github.com/KrishnaswamyLab/GSPA-manuscript-analyses.

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

gspa-1.1.1.tar.gz (12.2 kB view details)

Uploaded Source

File details

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

File metadata

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

File hashes

Hashes for gspa-1.1.1.tar.gz
Algorithm Hash digest
SHA256 b27961cc7aa754a706072be8e9aaae17a8833944c35ccea1df82f8045e3b106e
MD5 f8695c7c197555e407475c17c64eee38
BLAKE2b-256 ab8f02c60aa416f1e9abddba794a127381b0dd6f953fca0a7e62dcd8ee4687a0

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