• Preface
    • 0.1 Mainline Map
    • 0.2 How This Book Is Organized
    • 0.3 Reading Paths
    • 0.4 Example Conventions
  • I How sclet Thinks: State, Provenance, and Navigation
  • 1 State-Aware Analysis Contract
    • 1.1 What is the State Contract?
    • 1.2 Macro View: Status()
    • 1.3 Digging Deeper: get_analysis_context()
    • 1.4 Named State Records and Typed Accessors
    • 1.5 Memory Safety and Sparse Data
    • 1.6 Manual Overrides: Layers and Default APIs
  • 2 Automation & Provenance Logs
    • 2.1 The One-Liner Pipeline
    • 2.2 The Provenance Log (CommandLog)
    • 2.3 Writing Methods for You: PipelineSummary
  • II From Data to Discovery: Analysis Mainlines
  • 3 Data Ingress and Object Interoperability
    • 3.1 Seurat and SCE Conversion
    • 3.2 AnnData (h5ad)
  • 4 Recommended usage
    • 4.1 For end users
    • 4.2 For pipeline authors
  • 5 Developer design notes
    • 5.1 Core object contract
    • 5.2 How to add a new analysis function
    • 5.3 Implementation rules for contributors
    • 5.4 What should be tested
  • 6 Core Single-Cell Workflow
    • 6.1 Read 10X data
    • 6.2 QC
    • 6.3 Ambient RNA and doublet cleanup
    • 6.4 Variable features
    • 6.5 Zero-preserving imputation
    • 6.6 Dimensional reduction
    • 6.7 Clustering
    • 6.8 UMAP
    • 6.9 Find Markers
      • 6.9.1 Marker gene information
    • 6.10 Cell cluster annotation
    • 6.11 Automatic Annotation (SingleR)
  • 7 Integration and Batch Correction
    • 7.1 Load datasets
    • 7.2 Preprocess
    • 7.3 Integration Workflow
    • 7.4 Clustering
    • 7.5 Visualization
    • 7.6 Pseudobulk Differential Expression
  • 8 Cell Identity and Reference Mapping
    • 8.1 Manual annotation
    • 8.2 Automatic annotation
    • 8.3 Reference mapping mainline workflow
      • 8.3.1 Lightweight Reference Mapping (KNN)
      • 8.3.2 Run SingleR with sclet
      • 8.3.3 Reference mapping workflow
      • 8.3.4 Symphony Atlas Mapping
      • 8.3.5 State-aware SingleR provenance
      • 8.3.6 Annotate with SingleR result
      • 8.3.7 Comparison with manual annotation result
  • 9 Cell Fate and Dynamic Processes
    • 9.1 Trajectory mainline workflow
      • 9.1.1 Lineage plot
      • 9.1.2 Pseudotime plot
      • 9.1.3 Expression trends in different cell trajectories
      • 9.1.4 Heatmap
    • 9.2 Diffusion Map for complex trajectories
      • 9.2.1 Example data
      • 9.2.2 Run velocity analysis
      • 9.2.3 Visualize velocity-based trajectory
    • 9.3 CellRank: Advanced Fate Mapping
      • 9.3.1 Run CellRank
    • 9.4 Workflow shell for velocity and fate
    • 9.5 Velocity Latent Time
  • 10 Program, Regulon, and Mechanistic Interpretation
    • 10.1 Gene set scoring and pathway activity
    • 10.2 Multi-Backend Scoring in One Click
    • 10.3 Program mainline workflow
    • 10.4 Reading and Visualizing Results
    • 10.5 Advanced Pathway Discovery (altExp and RunKEGG)
    • 10.6 SCENIC regulon inference
    • 10.7 Environment and Data Preparation
    • 10.8 One-Click Inference and Scoring
    • 10.9 Result Retrieval and State Awareness
    • 10.10 Visualizing Regulon Activity
    • 10.11 Unified GRN Entry: RunGRN()
    • 10.12 Unified Program Access: get_program() / has_program()
    • 10.13 Program Activity Dotplot: plot_program_dotplot()
  • 11 Differential Analysis and Functional Interpretation
    • 11.1 Differential expression and pseudobulk testing
    • 11.2 Standard Single-Cell DE
      • 11.2.1 The “What does this gene even do?” Problem
    • 11.3 The Gold Standard: Pseudobulk Analysis
      • 11.3.1 Step 1: Aggregate Expression
      • 11.3.2 Step 2: Pseudobulk DE with DESeq2
    • 11.4 Functional enrichment on top of differential results
    • 11.5 GO Enrichment
    • 11.6 KEGG Enrichment
  • 12 Cell-Cell Communication and Microenvironment Interaction
    • 12.1 Input
    • 12.2 Running CCI
    • 12.3 Using Alternative Backends (CellPhoneDB & NicheNet)
      • 12.3.1 CellPhoneDB
      • 12.3.2 NicheNet
    • 12.4 Visualization
      • 12.4.1 Legacy CellChat Visualization
  • 13 State Priority and Perturbation Sensitivity
    • 13.1 Perturbation Priority Workflow
      • 13.1.1 One-Step Dispatch
      • 13.1.2 Direct Augur Call
      • 13.1.3 Inspecting Results
    • 13.2 Rare Cell Detection
    • 13.3 What Fits Nearby
    • 13.4 Current Recommendation
  • 14 Spatial Context and Niche Analysis
    • 14.1 Spatial Mainline Workflow
    • 14.2 High-Resolution Spatial Deconvolution: Cell2location
    • 14.3 Spatial Colocalization with SVP
    • 14.4 Spatial Niche Detection with SVP LISA
    • 14.5 Inspecting Spatial Results Across Layers
    • 14.6 In-Silico Gene Perturbation: CellOracle
  • 15 Multimodal Expansion
    • 15.1 What Is Already Available
    • 15.2 Detecting and Registering Modalities
    • 15.3 One-Step Registration
    • 15.4 Planned Interface Direction
    • 15.5 Current Guidance
  • III Specialized Techniques and Reference
  • 16 Enhanced Visualization
    • 16.1 Loading data
    • 16.2 Dimensionality Reduction Plots
      • 16.2.1 CellDimPlot
      • 16.2.2 FeatureDimPlot
    • 16.3 Expression Heatmaps
    • 16.4 Cell Statistics
    • 16.5 Module-Specific Visualization
      • 16.5.1 Trajectory and Fate
  • 17 Fate probability on embedding
  • 18 Terminal state assignments
  • 19 Lineage driver trends
  • 20 Velocity latent time
    • 20.0.1 Perturbation Priority
    • 20.0.2 Spatial Analysis
    • 20.0.3 Cell-Cell Communication
    • 20.0.4 Reference Mapping
  • 21 Metacells with SuperCell
    • 21.1 RunSuperCell
    • 21.2 Estimate SuperCell Purity
  • 22 Milo: Differential Abundance
    • 22.1 Requirements
    • 22.2 Two-group DA (GLM)
    • 22.3 Multi-contrast testing
    • 22.4 GLMM (random intercept)
    • 22.5 Refit after dropping separated neighbourhoods
  • 23 Phenotype Association
    • 23.1 A practical pattern
    • 23.2 What gets recorded
  • 24 Interactive Data Exploration
    • 24.1 Launch Explorer
    • 24.2 Customization
  • 25 SVP: Gene Set Activity in Spatial and Single-Cell Data
    • 25.1 runSGSA
    • 25.2 runLISA
    • 25.3 runLOCALBV
  • 26 AI Copilot & Evidence Governance
    • 26.1 sclet_copilot: An AI That Understands Your Objects
    • 26.2 AuditAnalysisChain: Cross-Chain Error Control
  • References

sclet: A Lightweight Toolkit for Single-Cell Data Analysis

19 Lineage driver trends

plot_fate_driver_trends(sce, lineage = “Lineage1”, top_n = 4)