Bioinfo, bench to analysis · an interactive tutorial
⭑ Try OmicOne
Chapter 12Analysis

Beyond: batches, trajectories, communication, outcome

Once cells are annotated, the questions branch out. How do several samples fit together? Where are cells heading? What are cells saying to each other? Which are the tumour cells? Does any of this relate to patient outcome? This chapter gives each direction’s idea in a short section, with its most common trap.

Several samples: batch integration

Samples processed on different days, with different dissociation protocols, chips or chemistry versions differ systematically even when the cell types are the same, so one cell type splits by sample on the UMAP. This is a batch effect. Harmony, Seurat CCA/RPCA, scVI and similar methods align the same cell types across samples in a low-dimensional space.

The common trap: can integration erase biological differences? Yes, if condition and batch are mixed up. If every treated sample was processed in the second batch, the algorithm cannot tell batch from treatment and may align away the real treatment effect. Integration also changes the embedding (Harmony corrects the PCs), not the counts; differential expression still uses the counts, with the sample as the unit (pseudobulk). The best batch correction happens at the design stage: put samples from every group into every batch.

Dynamic processes: trajectories and RNA velocity

Trajectories and pseudotime

If the cells in a sample sit at different stages of a continuous process, such as blood-cell differentiation, they can be ordered along a path by similarity, and each cell’s position on it is its pseudotime. Monocle 3, Slingshot and similar tools do this.

The common trap: the root comes from biology. The algorithm knows only how similar cells are, not which end is “early”; you set the root with progenitor markers, sampling time points or RNA velocity. And an algorithm will always fit a path, even through data with no continuous process. pbmc3k is mostly mature blood cells, and a trajectory drawn between them does not mean differentiation.

RNA velocity

RNA velocity compares each gene’s unspliced and spliced reads: relatively more unspliced means the gene is switching on, fewer means it is switching off. From this, it infers where each cell is heading next.

The common trap: it depends on spliced/unspliced counts, which must be generated separately. The standard Cell Ranger matrix does not split them; count them from the BAM or FASTQ with velocyto, STARsolo or alevin-fry. 3′ kits mainly capture mature mRNA, and unspliced reads come largely from internal priming at A-rich intronic stretches (chapter 3). The model’s assumptions (constant splicing and degradation rates, for example) often fail, and the arrows on a 2-D plot are sensitive to the projection, so they are not evidence of direction on their own.

Between and within cells: communication and CNV

Cell–cell communication

CellChat, CellPhoneDB, LIANA and similar tools query a database of known ligand–receptor pairs and score each sender–receiver combination in which the sender expresses a ligand and the receiver its receptor.

The common trap: the output is candidates, not evidence. RNA is not protein; dissociation has already destroyed the cells’ positions, so the data cannot tell whether two cells were ever neighbours; and results depend on the database used. Use it to generate hypotheses, then validate with spatial transcriptomics, protein-level or functional experiments.

Malignant cells and CNV inference

Tumour cells often carry large copy-number changes. Ordering genes by chromosome position, smoothing expression along it and comparing with normal cells reveals gains and losses, and so separates malignant cells (inferCNV, CopyKAT, Numbat…). This is CNV inference.

The common trap: it needs normal reference cells. The best reference is immune or stromal cells from the same patient; with no reference, or the wrong one (from another patient or tissue), the result is distorted. Methods such as CopyKAT try to find diploid cells automatically, but they still need enough normal cells in the sample. Only arm-level events are visible, and a block of co-regulated genes can be misread as a copy-number change.

Back to the patient: cell features and outcome

To ask whether a cell type’s abundance or a gene signature relates to survival, first summarise each patient’s cells into one value, such as the fraction of all cells belonging to that type, or the mean signature score.

The common trap: aggregate to one row per patient before any survival analysis. Cells are never the unit of a survival test; otherwise thousands of cells repeat the same patient’s follow-up thousands of times. Compute group cut-offs (such as the median) only after the analysis set is fixed; for a continuous feature, report the Cox HR per standard deviation first and use a high/low Kaplan–Meier split only as an illustration; state the number of patients and events. Single-cell cohorts usually have few patients, so treat findings as hypotheses to validate in larger bulk cohorts.

Common pitfalls

  • Treating these outputs as conclusions. Integration, trajectories, velocity, communication and CNV inference all rest on assumptions; all need independent validation.
  • Forgetting the unit of analysis. For comparisons across conditions or patients, the unit is the sample or patient, not the cell.
  • Forcing a method onto unsuitable data. Data without a continuous process do not suit trajectories; samples without normal cells do not suit CNV inference.