stLENS is a python-based scalable tool for determining the optimal number of principal components from spatial transcriptomics data. It is designed to handle large-scale spatial omics datasets efficiently.
- Scalable Analysis: Efficiently handles large spatial transcriptomics datasets
- Optimal PC Selection: Determines the optimal number of principal components using advanced statistical methods
- scverse Compatible: Seamlessly integrates with scanpy and other scverse tools
- GPU Acceleration: Leverages CUDA for high-performance computing
- Spatial-aware: Specifically designed for spatial transcriptomics data analysis
- Python 3.9, 3.10, or 3.11
- CUDA-compatible GPU (for GPU acceleration)
conda install cupypip install stLENSgit clone https://github.com/pnucolab/stLENS.git
cd stLENS
pip install -e .from stLENS import stLENS
import scanpy as sc
import anndata as ad
# Load your spatial transcriptomics data
adata = sc.read_h5ad("your_spatial_data.h5ad")
# Initialize stLENS
stlens = stLENS()
# Determine optimal number of PCs
stlens.find_optimal_pc(adata)For detailed documentation, tutorials, and API reference, visit: https://stlens.readthedocs.io/
We provide comprehensive tutorials and reproducible examples:
- Basic Tutorial - Introduction to stLENS basics and core functionality
- Spatial Analysis Tutorial - Reproduce spatial transcriptomics results from our paper
- Time Series Analysis - Reproduce temporal analysis results from our paper
This project is licensed under the BSD 3-Clause License - see the LICENSE file for details.
