
Getting Started with CellTFusion
CellTFusion.Rmd
library(CellTFusion)
#>
#> 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
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")