Skip to main content

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, cell state transition


Installation

System requirements

  • Python 3.8.x
  • Linux system is recommended
  • GPU is recommended for faster model training, but CPU installation is also supported

Installation steps

1. Create a new conda environment

conda create --name scState python=3.8 -y
conda activate scState

2. Install PyTorch and PyTorch Geometric

Install PyTorch, PyTorch Geometric, and torchmetrics before installing scState.

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
pip install torchmetrics==0.9.3

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
pip install torchmetrics==0.9.3

3. Install scState

The package name on PyPI is scstate:

pip install --upgrade scstate

To install a specific version:

pip install scstate==2.0.0

Although the package is installed from PyPI as scstate, it should be imported in Python as scState:

import scState

If trajectory-related analysis is needed, install the optional trajectory dependencies:

python -m pip install "scstate[trajectory]==0.1.2"

Then install MulticoreTSNE for Palantir:

conda install -c conda-forge multicore-tsne=0.1 -y

Finally, install Palantir:

pip install palantir==1.0.0

5. 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.x.

Main dependencies

The following dependencies are installed by default with:

pip install scstate
  • 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
  • xlwt==1.3.0
  • tqdm==4.64.0
  • scanpy==1.9.1
  • leidenalg==0.8.10
  • ipywidgets==8.0.6
  • torch==2.4.1+cu118 or torch==2.4.1+cpu
  • torch-geometric==2.6.1
  • torchmetrics==0.9.3
  • torch-scatter==2.1.2+pt24cu118 or torch-scatter==2.1.2+pt24cpu
  • torch-sparse==0.6.18+pt24cu118 or torch-sparse==0.6.18+pt24cpu
  • torch-cluster==1.6.3+pt24cu118 or torch-cluster==1.6.3+pt24cpu
  • PhenoGraph==1.5.7
  • fcsparser==0.2.4
  • MulticoreTSNE==0.1
  • palantir==1.0.0

Usage

After installation, scState modules 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.

Metadata

Release files for scstate 6.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for scstate 6.0.0
File Size Uploaded Provenance Actions
scstate-6.0.0.tar.gz 17.5 kB Without provenance Details for scstate-6.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for scstate 6.0.0
File Interpreter ABI Platform Actions
scstate-6.0.0-py3-none-any.whl Python 3 none any Details for scstate-6.0.0-py3-none-any.whl

Total release size: 33.9 kB

Release files / scstate-6.0.0.tar.gz

Download URL scstate-6.0.0.tar.gz
Size 17.5 kB
Tags Source
SHA-256 checksum
How to use checksums
97684bc8b3944f68eff65b76c07925cb3223434f1aae06ac9950b32ca28e570b
BLAKE2b-256 checksum
How to use checksums
923e393eb478bd5ad09bd86cb97d46d0f47029def66051d93a445c2e3e287e13
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.8.0

Release files / scstate-6.0.0-py3-none-any.whl

Download URL scstate-6.0.0-py3-none-any.whl
Size 16.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
558519cf368454c99cd9b7be1797f527f5e8b3bdcf152630de0b4c3b911f05c9
BLAKE2b-256 checksum
How to use checksums
263bbb43ac650e616e55e5d7e1943f132db573f83449fde17ea25987306262bb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.8.0

Security for scstate 6.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page