Appendix B — Extra related to biological Questions

B.1 Block 9 - Extra (optional, post-class) - cascade challenges

Optional self-study. Each challenge below describes a chain of two or three linked bugs, where fixing one surfaces the next. The goal is to practise climbing the chain: when a downstream output is wrong, what upstream check would have caught it?

Treat each challenge as a thought exercise. Try to write the diagnostic and fix as comments BEFORE running any code. The reveal at the end of each challenge explains the chain.

B.1.1 Challenge 9.1 - The disappearing T-cell subset

Symptom (downstream): SingleR returns “CD4 T cell” for less than 5 percent of cells in a PBMC dataset where flow cytometry says CD4 T cells are 25 percent. ADT panel shows CD4 protein expressed normally.

Diagnostic chain (each step surfaces the next):

  1. Compare CD4 ADT-positive cells vs CD4 RNA-positive cells.
  2. If ADT-positive cells are abundant but RNA-positive cells are rare, the cause is RNA dropout (Block 6 territory). Stop here.
  3. If RNA-positive cells are also abundant, check the SingleR reference: does it have a distinct “CD4 T cell” label, or only “T cell”?
  4. If the reference is correct, check DefaultAssay and the layer SingleR ran on (data vs counts).

Try the diagnostic on this object. Write your prediction first.

B.1.2 Challenge 9.1 - The disappearing T-cell subset

Symptom (downstream): SingleR returns “CD4 T cell” for less than 5 percent of cells in a PBMC dataset where flow cytometry says CD4 T cells are 25 percent. ADT panel shows CD4 protein expressed normally.

Diagnostic chain (each step surfaces the next):

  1. Compare CD4 ADT-positive cells vs CD4 RNA-positive cells.
  2. If ADT-positive cells are abundant but RNA-positive cells are rare, the cause is RNA dropout (Block 6 territory). Stop here.
  3. If RNA-positive cells are also abundant, check the SingleR reference: does it have a distinct “CD4 T cell” label, or only “T cell”?
  4. If the reference is correct, check DefaultAssay and the layer SingleR ran on (data vs counts).

Try the diagnostic on this object. Write your prediction first.

B.1.3 Challenge 9.2 - The cluster that disappears after re-clustering

Symptom: a cluster from Block 4 (RNA-only) disappears when you switch to WNN clustering in Block 6. The cells previously in that cluster are now spread across several other clusters.

Diagnostic chain:

  1. Look at RNA.weight for the cells previously in that cluster. Is ADT dominating?
  2. If ADT dominates, the cluster was held together by RNA-specific variance that WNN downweights. Was that variance biological (gene programme) or technical (a small batch effect on one gene)?
  3. Cross-tab the previous cluster against canonical lineage markers. If it splits cleanly along a lineage marker, WNN found a finer structure. If it does not, ADT was overweighted.

B.1.4 Challenge 9.3 - The healthy donor that behaves like COVID-19

Symptom: one Healthy donor in Step 6.12 shows a per-donor cell-type profile much closer to the COVID-19 donors than to the other Healthy donors.

Diagnostic chain:

  1. QC: is this donor’s nCount or percent.mt distribution different?
  2. Annotation: did one specific cell type get over-assigned in this donor (annotation drift, not biology)?
  3. Batch: was this donor processed in a different staining run? Check adt_batch if Block 8 Scenario 4 ran.
  4. Sample swap: are the donor metadata fields consistent (donor_id, condition, severity all aligned)? A sample swap during labelling produces this exact symptom.

B.1.5 End of optional extras