Skip to main content

SemanticST: Spatially informed semantic graph learning for effective clustering and integration of spatial transcriptomics

Project description

SemanticST

SemanticST Pipeline


🔷 SemanticST Overview

SemanticST is a graph neural network-based unsupervised deep learning approach for spatial transcriptomics data analysis. SemanticST employs a sophisticated learning strategy to integrate gene expression and spatial information, enabling the model to learn a latent representation of spatial transcriptomics (ST) data. SemanticST uses a learnable weighted graph representation, termed Semantic Graphs, to better capture the complexity and diversity of biological processes. For each semantic graph, a unique embedding is learned using an autoencoder with Graph Convolutional Network (GCN) layers, representing distinct semantic features in latent space. To combine these representations, SemanticST introduces a learnable weight, referred to as the semantic score, for each semantic graph. The final graph representation is then dynamically fused by weighting and combining the individual embeddings based on their semantic scores, resulting in a more accurate and adaptive graph representation. SemanticST incorporates the MinCut loss function together with the Deep MinCut (DMC) learning algorithm. This approach not only captures the global structure of the graph but also reduces redundant training time. More importantly, it ensures that the learned embeddings are both meaningful and interpretable, providing a more robust and insightful representation of the graph. Notably, we incorporated a mini-batch training option in SemanticST by training the model on spatial graphs in smaller batches. This feature allows the learned semantic graph to maintain both local and global perspectives across batches, making SemanticST memory-efficient and scalable, enabling its application to any spatial transcriptomics dataset, regardless of the number of samples.

🔷 Requirements

To run SemanticST, install the following dependencies:

*python==3.9.20
*numpy==1.23.4
*anndata==0.10.9
*h5py==3.12.1
*leidenalg==0.10.2
*louvain==0.8.2
*matplotlib==3.9.2
*numba==0.60.0
*scanpy==1.10.3
*scikit-image==0.24.0
*scikit-learn==1.5.2
*scikit-misc==0.3.1
*torch==2.5.1
*torch-geometric==2.6.1
*torch_scatter==2.1.2+pt25cu124
*torch_sparse==0.6.18+pt25cu124
*torchaudio==2.5.1
*torchvision==0.20.1
*torchviz==0.0.2

Installation

You can install SemanticST via PyPI:

pip install semanticst

Or install from GitHub:

pip install git+https://github.com/roxana9/SemanticST.git

To install all dependencies, run:

pip install -r requirements.txt

🔷 Step-by-Step Tutorial

For a full tutorial on how to use SemanticST, visit our documentation:

🔗 SemanticST Tutorial Webpage

(The webpage is still under development, but a temporary version is available.)

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

semanticst-0.1.1.tar.gz (18.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

semanticst-0.1.1-py3-none-any.whl (20.6 kB view details)

Uploaded Python 3

File details

Details for the file semanticst-0.1.1.tar.gz.

File metadata

  • Download URL: semanticst-0.1.1.tar.gz
  • Upload date:
  • Size: 18.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.4

File hashes

Hashes for semanticst-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a6d0b72fc5aa3cb3711c214f67896a2a09646b9104243b9ff176c42769d85047
MD5 87577edcb14a8da1aed9d734edc16951
BLAKE2b-256 63ffe225f1b81d6e7897b9430c09c1399a5692e42c5aa167719ae0c21900c915

See more details on using hashes here.

File details

Details for the file semanticst-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: semanticst-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 20.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.4

File hashes

Hashes for semanticst-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b41409a00d02c4430343c455530bfc7168b845ecfbae56a05d3468d735b3936c
MD5 265bc1afa91b981aff012466c8e6de3e
BLAKE2b-256 b103b8b461df6b71ce3286f8dfde0a5315e6a1ef5afc44396e22d607d74a0db1

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