UC6_PSEUDOBULK_issue

UC6 / Cell-type-resolved pseudobulk DE (COVID-19) — interview input

Pulled-down GitHub issue used as the effective result of the INTERVIEW → GALAXY interview (the live interview mechanics are harness-owned and precede pipeline phase 1). Source: https://github.com/jmchilton/galaxy-brain/issues/29 Paired aspirational target: none yet — workflow not yet extracted from a Galaxy history.


Plain-language science (why this is interesting)

A single-cell RNA-seq experiment measures gene expression in thousands of individual cells from several people (here: some healthy “normal”, some “COVID-19”). Each cell carries two labels: which person it came from (individual) and what cell type it is (B cell, CD4 T cell, monocyte, …).

Pseudobulk = sum the raw counts of all cells of one type within one person into a single profile (“all B cells from patient 7” → one B-cell sample). This bridges single-cell data to trusted bulk statistics (edgeR), with people as the real replicates — the correct unit for a disease comparison (thousands of correlated cells from one person are not independent replicates).

Why per-cell-type DE matters: the interesting question is rarely “is gene X up in disease overall” — it’s “which cell types are actually mounting the response, and do they respond the same way?” In COVID you’d expect monocytes and some T-cell subsets to be transcriptionally inflamed while B cells barely move. Pooling all cell types (what the shipped workflow does) averages these together and can hide a strong cell-type-specific signal. Running DE separately per cell type asks the sharp question, then you can rank cell types by responsiveness and split genes into a shared core (e.g. interferon-stimulated genes lighting up everywhere) vs cell-type-specific sets. That decomposition is the scientific payoff and is invisible from a single pooled contrast.

Purpose

Demonstrate a Galaxy Notebook that goes beyond a single bulk contrast: take an annotated single-cell dataset, aggregate it into pseudobulk profiles, and ask which cell types actually respond to disease and which genes are a shared response vs cell-type-specific. Every embedded figure/table is a genuine on-graph Galaxy tool output; the reusable workflow is extracted from the history provenance graph.

Objective (MVP + stretch)

Why this is a useful demo deviation

Existing analysis anchors (real tool ids / paths)

Primary: iwc/workflows/scRNAseq/pseudobulk-worflow-decoupler-edger/pseudo-bulk_edgeR.ga

Upstream annotation reference (optional chapter): iwc/workflows/scRNAseq/scanpy-clustering/...Scanpy.gaiuc/scanpy_* 1.10.2+galaxy*, iuc/anndata_* 0.10.9+galaxy0; produces louvain clusters + manual cell-type annotation (the kind of cell_type label the pseudobulk step consumes).

velocyto was evaluated and rejected as anchor: its IWC workflow outputs only a .loom of spliced/unspliced counts (no plotting tool, no scVelo) — no on-graph figures to embed.

Public data candidates (real shipped data + actual labels)

Notebook workflow plan (numbered, on-graph)

  1. Load the annotated h5ad; show obs structure (cell_type / individual / disease) — narrative + small on-graph inspection table.
  2. Decoupler pseudobulk (groupby cell_type, sample_key individual, layer counts, factor disease): embed the on-graph pseudobulk QC plot and the filter-by-expression plot; show count_matrix head.
  3. MVP contrast: sanitation chain → edgeR ~ 0 + disease, contrast normal-COVID_19; embed the on-graph DEG table and volcano.
  4. Stretch fan-out: split the pseudobulk count_matrix columns by cell_type into a collection (on-graph column/split ops) → map edgeR over the per-cell-type subsets → per-cell-type DEG tables + volcanoes as a collection.
  5. Cross-cell-type synthesis: from the per-cell-type DEG tables, build (a) a responder-ranking table (count of FDR-significant genes per cell type) and (b) a shared-vs-specific summary via on-graph set/column ops. Embed both.
  6. Extract the reusable workflow by walking the provenance graph backward from the synthesis outputs.

Expected paper/demo artifacts

Scope and risks (honest)

Tasks