Tutorials

Welcome to the CellDISECT tutorials section. Here you'll find comprehensive guides and practical examples that will help you master CellDISECT's capabilities for single-cell analysis and counterfactual predictions.

Getting Started

Before diving into the tutorials, make sure you have:

Tutorial Categories

Beginner Tutorials

🔬 Basic CellDISECT Training

Learn how to train CellDISECT and make counterfactual predictions using the Kang dataset. Perfect for first-time users!

CellDISECT_Counterfactual.ipynb

Perturbation Prediction

🧪 Perturbation Prediction

Predict gene expression under seen, unseen, and combinatorial perturbations using predefined gene embeddings (GenePT, ESM, scGPT).

CellDISECT_Perturbation.ipynb

Advanced Applications

🧬 Latent Space Exploration

Explore how to combine CellDISECT latent spaces for erythroid subset inference, demonstrating advanced usage with Z_0 + Z_Organ integration.

Erythroid_subset_inference.ipynb
🔄 Double Counterfactual Analysis

Advanced tutorial recreating Scenario 2 counterfactual predictions on the Eraslan dataset, as featured in our paper.

Eraslan_CF_Tutorial.ipynb

Note

Each tutorial includes downloadable Jupyter notebooks that you can run locally. The notebooks are extensively documented with step-by-step explanations and best practices.

Detailed Tutorial Contents

Available Tutorials

Tutorial Details

Basic Training Tutorial

In this introductory tutorial, you’ll learn:

  • How to prepare your data for CellDISECT

  • Basic model training and configuration

  • Making simple counterfactual predictions

  • Visualizing and interpreting results

Download Notebook

Perturbation Prediction Tutorial

This tutorial covers:

  • Preparing predefined gene embeddings (GenePT, ESM) in adata.uns

  • Setting up setup_anndata with perturbation_key and perturbation_embedding_key

  • Training CellDISECT with perturbation-aware embeddings

  • Predicting seen, unseen, and combinatorial perturbations

  • Evaluating predictions with perturbation_metrics

Download Notebook

Latent Space Analysis

This advanced tutorial covers:

  • Understanding CellDISECT’s latent space structure

  • Combining multiple latent spaces (Z_0 + Z_Organ)

  • Advanced visualization techniques

  • Interpreting latent space representations

Download Notebook

Double Counterfactual Tutorial

This expert-level tutorial demonstrates:

  • Complex counterfactual predictions

  • Recreating paper results on the Eraslan dataset

  • Advanced model configurations

  • Result analysis and validation

Download Notebook