Skip to content

colomemaria/seagall

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SEAGALL

Single-cell Explainable geometry Aware Graph Attention Learning pipeLine

Geometry-aware graph attention networks to explain single-cell chromatin states and gene expression (Genome Biology, 2026)

Gabriele Malagoli, Patrick Hanel, Anna Danese, Guy Wolf & Maria Colomé-Tatché

https://doi.org/10.1186/s13059-026-04066-2

alt text

Data and notebook to reproduce all the results are available at https://github.com/gmalagol10/seagall/tree/main/reproducibility

Installation

conda create -n my_env python=3.10.14

conda activate my_env

pip install git+https://github.com/gmalagol10/seagall

Usage

import seagall as sgl
import scanpy as sc
import matplotlib.pyplot as plt
import distinctipy

#Upload filtered count matrix from scRNA-seq, scATAC-seq or scChIP-seq experiment
adata=sc.read_h5ad("MouseBrain_GEX.h5ad")

#Embed the data into a latent space with geometry regularised autoencoder 
#and build the cell-to-cell graph
sgl.ee.geometrical_graph(adata, target_label="CellType", path="SEAGALL")

#Train a GAT classifier to learn the target label 
#and the GNNExplainer to extract meaninfull features
#automatic splitting the data set in training (70%), validation (10%) and test (20%) sets
sgl.ee.explain(adata, target_label="CellType")

#Show the rank-importance plot for each label
colors=distinctipy.get_colors(len(set(adata.obs.CellType)))

for i, ct in enumerate(sorted(list(set(adata.obs.CellType)))):
    print(i)
    plt.scatter(x=range(0, len(adata.var)), y=sorted(adata.var[f"SEAGALL_Importance_for_{ct}"])[::-1], c=colors[i])
plt.xscale("log")
plt.yscale("log")

alt text

Returns an updated AnnData object with:

1)Average importance of each feature for each label, stored in adata.var with the name "SEAGALL_Importance_for_*"

2)Complete cell - importance matrix stored in adata.layers["SEAGALL_Importance"]

3)Geometry aware cell-to-cell graph stored in adata.obsp["GRAE_graph"] and GRAE's latent space in adata.obsm["GRAE_latent_space"]

📖 Citation

If you use SEAGALL in your work, please cite:

Malagoli G, Hanel P, Danese A, Wolf G, Colomé-Tatché M. Geometry-aware graph attention networks to explain single-cell chromatin states and gene expression with SEAGALL Genome Biology (2026).
https://doi.org/10.1186/s13059-026-04066-2

BibTeX

@article{malagoli2026seagall,
  author  = {Malagoli, Gabriele and Hanel, Patrick and Danese, Anna and Wolf, Guy and Colom{\'e}-Tatch{\'e}, Maria},
  title   = {Geometry-aware graph attention networks to explain single-cell chromatin states and gene expression},
  journal = {Genome Biology},
  year    = {2026},
  doi     = {10.1186/s13059-026-04066-2}
}

Version History

  • 0.1
    • Initial Release

License

This project is licensed under the GNU General Public License v3.0 - see the LICENSE.md file for details

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Jupyter Notebook 75.9%
  • Python 23.7%
  • Shell 0.4%