Bootcamp / Session 5 / 5.2

Session 5.2 · Ozkan Aydemir

Single-cell data, QC and integration, live.

Ozkan Aydemir works through a public COVID-19 lung lavage dataset in marimo notebooks with an AI agent: merging samples, deciding which cells to keep, finding doublets, and then integrating samples without erasing the biology you came to study.

Watch the recordings Fri Oct 16 · two recordings, about 95 minutes

Recordings

Part 1: the data and quality control

Slides on how single-cell libraries are made (droplet capture, UMIs, 5′ versus 3′ kits, VDJ, Cell Ranger, intronic reads, ambient RNA), then the dataset and two notebooks: merging the samples into one AnnData object, and quality control.

Ozkan Aydemir · data and QC · 67 minutes

Part 2: integration

Slides on batch versus condition and over-integration, questions on pooled samples, then the third notebook: normalization, variable genes, PCs, UMAPs by sample and condition, and the integrated result.

Ozkan Aydemir · integration · 27 minutes

The dataset

Bronchoalveolar lavage (BAL) cells from patients with moderate and severe COVID-19 and from healthy controls, published by Liao and colleagues in 2020. The data are public. One caution comes up early: the healthy controls were not processed alongside the patients, so control versus COVID-19 is confounded with batch. Any integration that removes the batch can also remove the disease signal.

What the notebooks cover

Merging samples

Load each sample’s count matrix, combine them into one AnnData object, and count cells per sample. A short tour of AnnData: the count matrix, cell and gene tables, and layers that keep raw and normalized counts side by side.

Quality control

Signals of damaged cells: few genes, few UMIs, a high mitochondrial fraction. Three ways to set cutoffs: one fixed threshold for everything, a threshold per sample, or a threshold per cluster. Fixed filters quietly remove neutrophils, which naturally have few genes, so the choice changes which cell types survive. The notebook compares the filters side by side.

Doublets

Scrublet and scDblFinder both simulate artificial doublets and score real cells against them. They do not always agree, and the comparison is part of the lesson.

Integration

Normalize, choose variable genes, pick the number of PCs, and look at the UMAP colored by sample and by condition before and after integration. Integration that is too strong merges cells that differ for real biological reasons. The UMAP is a picture; clustering runs on the neighbor graph. Neutrophils return as a trade-off: keep them and accept noisier QC, or filter them out and lose a cell type that matters in COVID-19 lungs.

After the session

Two minutes of feedback, so the next session is pitched better. It also records your attendance, so fill it in whether you were in the room, on Zoom, or catching up on the recording.

Session 5 feedback