Skip to contents

Overview

CellTFusion integrates immune cell-type deconvolution with transcription factor (TF)–gene regulatory networks to characterize immune cell states in the tumor microenvironment from bulk RNA-seq data.

Starting from a raw count matrix, the pipeline produces latent factors — compact representations of the TME landscape that can be tested for clinical associations, mapped to known cancer meta-programs, and used as features for machine learning.

Pipeline steps

Step Function Article
Cell-type deconvolution multideconv::compute.deconvolution() Feature Computation
TF activity inference compute.TFs.activity() Feature Computation
TF module construction compute.WTCNA() Feature Computation
Pathway activity scoring compute.pathway.activity() Feature Computation
Cell group construction construct_cell_groups() Cell Groups & Latent Factors
Latent factor extraction compute.latent_factors() Cell Groups & Latent Factors
Cell niche derivation compute_cells_niches() Cell Groups & Latent Factors
Hallmark GSEA per factor compute_factor_gsea() TME State Characterisation
Meta-program mapping map_factors_to_metaprograms() TME State Characterisation
TME subtype annotation map_factors_to_TME() TME State Characterisation
Clinical association testing scores.stat.analysis() Statistical Analysis
Survival analysis compute.survival.analysis() Statistical Analysis
Test-set projection project_test_factors() Machine Learning
ML model training pipeML::compute_features.training.ML() Machine Learning
Multi-cohort (batch) analysis batch = TRUE in CellTFusion() Batch/Multi-cohort Analysis

The full pipeline — every step above run in the right order in a single call — is available through the CellTFusion() wrapper function; see the package README for usage examples, including unsupervised, supervised, and multi-cohort modes.

Quick start

Load the pre-packaged example data and run the full pipeline in one call:

raw.counts <- CellTFusion::raw.counts.tuto
traitdata  <- CellTFusion::traitdata.tuto
res <- CellTFusion(
  raw.counts    = raw.counts,
  normalized    = TRUE,
  coldata       = traitdata,
  task          = "unsupervised",
  deconv_methods = c("Quantiseq", "Epidish"),
  cancer_type   = "skcm",
  corr          = 0.7,
  pval          = 0.05,
  file_name     = "Tutorial",
  return        = TRUE
)

# Latent factor scores — use for stat tests and ML
head(res$Latent_spaces$Z)

# TME state annotations
head(res$TME_states)

Follow the articles linked in the table above for a step-by-step explanation of each stage.

Installation

remotes::install_github("VeraPancaldiLab/CellTFusion")

References