Metadata-Version: 2.1
Name: gspa
Version: 1.0.0
Summary: Gene Signal Pattern Analysis
Home-page: https://github.com/KrishnaswamyLab/Gene-Signal-Pattern-Analysis
Author: Aarthi Venkat, Krishnaswamy Lab, Yale University
Author-email: aarthi.venkat@yale.edu
License: GNU General Public License Version 3
Download-URL: https://github.com/KrishnaswamyLab/Gene-Signal-Pattern-Analysis/archive/v1.0.0.tar.gz
Keywords: big-data,manifold-learning,computational-biology,dimensionality-reduction,single-cell
Platform: UNKNOWN
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
Provides-Extra: test

# 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` at [GitHub](https://github.com/KrishnaswamyLab/Gene-Signal-Pattern-Analysis) for test run on simulated single-cell data.



