scState: A pathway-informed graph transformer framework for decoding stem cell state transitions from scRNA-seq data
Project description
Title:scState: Decoding stem cell state transitions through pathway-informed heterogeneous graph representations
Note: This project is for internal testing purposes only. Do not use it in a production environment.
We developed scState, a pathway-informed graph transformer framework for identifying stem cells and resolving quiescent and activated stem cell states from scRNA-seq data. By integrating pathway activity with adversarial representation learning in a heterogeneous graph architecture, scState enables stem cell identification, cell state discrimination, pathway-level interpretation, and trajectory inference.
Keywords: scRNA-seq, graph transformer, adversarial learning, stem cell, state transition
Installation
System Requirements
- Python 3.8.0 or higher
- Linux system is recommended
- GPU is recommended for faster model training, but CPU installation is also supported
Installation Steps
- Create a new conda environment:
conda create --name scState python=3.8
conda activate scState
- Install PyTorch and PyTorch Geometric according to your CPU/GPU configuration.
For GPU version with CUDA 11.8:
pip install https://download.pytorch.org/whl/cu118/torch-2.4.1%2Bcu118-cp38-cp38-linux_x86_64.whl
pip install https://data.pyg.org/whl/torch-2.4.0%2Bcu118/torch_scatter-2.1.2%2Bpt24cu118-cp38-cp38-linux_x86_64.whl
pip install https://data.pyg.org/whl/torch-2.4.0%2Bcu118/torch_sparse-0.6.18%2Bpt24cu118-cp38-cp38-linux_x86_64.whl
pip install https://data.pyg.org/whl/torch-2.4.0%2Bcu118/torch_cluster-1.6.3%2Bpt24cu118-cp38-cp38-linux_x86_64.whl
pip install torch-geometric==2.6.1
For CPU version:
pip install https://download.pytorch.org/whl/cpu/torch-2.4.1%2Bcpu-cp38-cp38-linux_x86_64.whl
pip install https://data.pyg.org/whl/torch-2.4.0%2Bcpu/torch_scatter-2.1.2%2Bpt24cpu-cp38-cp38-linux_x86_64.whl
pip install https://data.pyg.org/whl/torch-2.4.0%2Bcpu/torch_sparse-0.6.18%2Bpt24cpu-cp38-cp38-linux_x86_64.whl
pip install https://data.pyg.org/whl/torch-2.4.0%2Bcpu/torch_cluster-1.6.3%2Bpt24cpu-cp38-cp38-linux_x86_64.whl
pip install torch-geometric==2.6.1
- Install MulticoreTSNE for Palantir.
palantir==1.0.0 requires MulticoreTSNE. If installing MulticoreTSNE through pip fails during compilation, we recommend installing it with conda:
conda install -c conda-forge multicore-tsne=0.1 -y
- Install the required dependencies using pip:
pip install -r requirements.txt
- Use pip to install scState:
pip install scState
- Add the environment to Jupyter Notebook:
pip install ipykernel
python -m ipykernel install --user --name scState --display-name "Python (scState)"
Dependencies
scState was tested under Python 3.8. The main dependencies are listed below:
- anndata==0.8.0
- dill==0.3.4
- matplotlib==3.5.2
- numpy==1.22.3
- pandas==1.4.2
- scipy==1.10.1
- seaborn==0.11.2
- scikit-learn==1.1.2
- torch==2.4.1+cu118
- torch-geometric==2.6.1
- torchmetrics==0.9.3
- xlwt==1.3.0
- tqdm==4.64.0
- scanpy==1.9.1
- leidenalg==0.8.10
- ipywidgets==8.0.6
- palantir==1.0.0
For PyTorch Geometric, the following extension packages are required and should match the installed PyTorch and CUDA versions:
- torch-scatter==2.1.2+pt24cu118
- torch-sparse==0.6.18+pt24cu118
- torch-cluster==1.6.3+pt24cu118
For Palantir, the following additional dependencies are required:
- PhenoGraph==1.5.7
- fcsparser==0.2.8
- MulticoreTSNE==0.1
The tested GPU environment is:
- Python==3.8.x
- PyTorch==2.4.1+cu118
- CUDA used by PyTorch==11.8
- PyTorch Geometric==2.6.1
Usage
After installation, scState can be imported as follows:
from scState.conv import *
from scState.scState_model import *
from scState.utils import *
License
This project is released under the MIT License.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file scstate-0.1.0.tar.gz.
File metadata
- Download URL: scstate-0.1.0.tar.gz
- Upload date:
- Size: 17.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
60905babf0a6277cc47fb7945f684d0b97b0b026134de32903f77ae1fa16c49b
|
|
| MD5 |
eae36dbc08c54d83ba75f99096007dda
|
|
| BLAKE2b-256 |
113cbc9bd088048f566cb43e2dd87fe70f3a47f37aedfd6dc451171ca1a0a947
|
File details
Details for the file scstate-0.1.0-py3-none-any.whl.
File metadata
- Download URL: scstate-0.1.0-py3-none-any.whl
- Upload date:
- Size: 16.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7b61754a8230d1c70dd8dbdbf4a0269ec5e62615c096e46b8b21b5afae9af28c
|
|
| MD5 |
078a305132d7f05c12093c0dd7d281a7
|
|
| BLAKE2b-256 |
26ef3fc393e8b726163da22774f9b0992dba28bee9567e8854b146260548a82d
|