Skip to main content

scTREND: An annotation-free single-cell time-resolved and condition-dependent hazard model

Project description

scTREND

Description

scTREND (single-cell time-resolved and condition-dependent hazard model) is a novel deep generative framework that integrates single-cell latent representations from a VAE with bulk-level cell-type proportions and hazard coefficients. This enables the computation of patient-level risk scores and the identification of cell populations whose prognostic impact dynamically changes across time and clinical conditions.

Teppei Shimamura's lab, Institute of Science Tokyo, Tokyo, Japan

Overview of the scTCHM framework

Model architecture

The model comprises three main components: VAE for latent representation of single cells, bulk deconvolution based on DeepCOLOR, and a conditional piecewise constant hazard model for time- and condition-dependent risk estimation.

Requirements

Python >= 3.8.16

torch >= 1.13.1

lifelines >= 0.27.8

scanpy >= 1.9.5

pandas >= 1.5.3

numpy >= 1.23.5

matplotlib >= 3.7.2

scipy >= 1.10.1

Installation

You can install scTREND via pip:

!pip install sctrend

Application example

Explanation of key functions

  • workflow.scTREND_preprocess: Preprocesses single-cell and bulk RNA-seq data to identify highly variable genes and prepare the inputs required for scTREND, with optional incorporation of driver-gene information.

  • workflow.run_scTREND: Runs the scTREND workflow, including model training and estimation of time- and condition-dependent hazard coefficients.

Running scTREND

In this tutorial, we present an application of scTREND using a melanoma single-cell RNA-seq dataset (GSE115978) together with a bulk RNA-seq dataset from TCGA-SKCM. BRAF mutation status is incorporated as a driver condition, and the survival time axis is discretized into four time intervals. Under this setting, both the coefficients shared across all patients and the coefficients specific to BRAF-mutant patients can be visualized as shown below.

driver_genes = ["BRAF"]
edges = [...]  # time bin edges used in training
sc_adata, bulk_adata = workflow.scTREND_preprocess(sc_adata, bulk_adata,
     per=0.01, n_top_genes=5000, highly_variable="bulk", driver_genes=driver_genes)
driver_bulk_adata = bulk_adata[:, bulk_adata.var_names.isin(driver_genes)]
driver_bulk_adata.layers["SNV"] = ...  # samples × driver_genes (0:wild-type 1:mutated)
sc_adata, bulk_adata, model_params_dict, spatial_adata, exp = workflow.run_scTREND(
     sc_adata, bulk_adata,
     param_save_path="scTREND.pt",
     epoch=10000,
     batch_key="samples",
     driver_genes=driver_genes,
     driver_bulk_adata=driver_bulk_adata,
     edges=edges
)

Cell type

Baseline contribution (beta)

BRAF-specific contribution (gamma)

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

sctrend-0.1.2.tar.gz (17.7 kB view details)

Uploaded Source

Built Distribution

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

sctrend-0.1.2-py3-none-any.whl (18.0 kB view details)

Uploaded Python 3

File details

Details for the file sctrend-0.1.2.tar.gz.

File metadata

  • Download URL: sctrend-0.1.2.tar.gz
  • Upload date:
  • Size: 17.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for sctrend-0.1.2.tar.gz
Algorithm Hash digest
SHA256 c0d86cd043f590424668e3b462e16f7cbde1beb69262ec782f31c1c14b53e10d
MD5 b2ca7d9469f702fddc2fb5e420f8ed6a
BLAKE2b-256 c4c47166ba5d526add4a97ba3a845e14d511fc9d68cbe667fcd533f719e41a5d

See more details on using hashes here.

File details

Details for the file sctrend-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: sctrend-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 18.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for sctrend-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5488a1133c5070474079bac756d9eb87d184168df220704374d53ae3168dd963
MD5 c396ccf2cf84aad101ccdde670f496b3
BLAKE2b-256 c3bc782ffb6e08e53655591f1dca7b4ca34a24d4613c15be0d5957b2e13d3062

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