Metadata-Version: 2.2
Name: gspa
Version: 1.1.1
Summary: Gene Signal Pattern Analysis
Home-page: https://github.com/KrishnaswamyLab/Gene-Signal-Pattern-Analysis
Download-URL: https://github.com/KrishnaswamyLab/Gene-Signal-Pattern-Analysis/archive/v1.1.1.tar.gz
Author: Aarthi Venkat, Krishnaswamy Lab, Yale University
Author-email: aarthi.venkat@yale.edu
License: GNU General Public License Version 3
Keywords: big-data,manifold-learning,computational-biology,dimensionality-reduction,single-cell
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: Natural Language :: English
Classifier: Development Status :: 5 - Production/Stable
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE.md
Requires-Dist: graphtools>=1.5.0
Requires-Dist: tensorflow>=2.6.0
Requires-Dist: multiscale_phate==0.0
Requires-Dist: numpy>=1.14.0
Requires-Dist: scikit-learn
Requires-Dist: scipy>=1.1.0
Requires-Dist: tqdm
Requires-Dist: scanpy
Requires-Dist: phate
Provides-Extra: test
Requires-Dist: numpy>=1.14.0; extra == "test"
Requires-Dist: phate; extra == "test"
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: download-url
Dynamic: home-page
Dynamic: keywords
Dynamic: license
Dynamic: provides-extra
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# 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.](https://www.biorxiv.org/content/10.1101/2023.11.26.568492v1)

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](https://github.com/KrishnaswamyLab/Gene-Signal-Pattern-Analysis) for test run on simulated single-cell data. More notebooks to generate paper figures available at [https://github.com/KrishnaswamyLab/GSPA-manuscript-analyses](https://github.com/KrishnaswamyLab/GSPA-manuscript-analyses).

![](Overview.png)
