PCA — Sample Clustering¶
In the app: QC & samples › PCA
Available on RNA projects with DESeq2 results and a VST matrix (all.vst.tsv).
Principal Component Analysis (PCA) gives an unsupervised overview of how your samples relate to one another on their overall expression. It reduces thousands of genes to a few axes — principal components — that capture the largest differences between samples. Samples with similar expression profiles land close together, so the plot shows at a glance whether replicates cluster, whether groups separate, and whether any sample or batch stands apart.

Example output from the sample project.
Findings¶
How many samples and groups are plotted, and how much of the variance the first two components explain, for example "12 samples in 4 groups. PC1 explains 54.14% of the variance and PC2 6.5% (together 60.6%)."
Filters¶
X axis / Y axis¶
Which principal components to plot. Defaults: PC1 and PC2; up to PC10 are available.
Genes¶
Which genes the PCA is computed on: All genes (default), Top 500 by variance or Top 1000 by variance. DESeq2's plotPCA uses the top 500 most variable genes; restricting to the most variable genes usually sharpens group structure.
Groups¶
Limit the plot to some groups. Empty means All groups. The PCA is recomputed for the selected samples, so the percentages differ from a whole-project PCA. At least three samples are needed.
Unit-scaled¶
Off by default (genes centred only, so high-variance genes dominate). On, every gene is given equal weight, as R's prcomp(scale. = TRUE) does.
Batch-corrected VST (display only)¶
Shown only when the pipeline delivered a batch-corrected VST matrix (all.vst.batchcorrected.tsv). Plots the samples after the batch effect was removed, to see whether the groups separate once batch is accounted for. It is a view only: differential expression never uses the corrected matrix. See Batch Effect.
PCA score plot¶
One point per sample, labelled with its name and coloured by group. The axis titles give the share of variance each component explains, for example PC1 (54.14%). A line under the plot says where the coordinates came from:
- "Coordinates delivered by the pipeline (same as the project's PCA figure)." — when the pipeline delivered its own PCA and you are looking at all samples, all genes, unscaled; or
- "Computed here from all.vst.tsv: all genes, centred." (or the gene set and scaling you chose).
Variance explained¶
A bar chart of the percentage of variance explained by each of the first ten components. A steep drop after PC1 or PC2 means the first components capture most of the structure; a flat profile means no single direction dominates.
Raw data¶
Raw data — PCA scores¶
| Column | Meaning |
|---|---|
sample |
Sample name |
group |
The sample's group |
PC1 … PC10 |
The sample's score on each component |
Raw data — Variance explained¶
| Column | Meaning |
|---|---|
PC |
Component |
variance_pct |
% of variance it explains |
Interactive / All options¶
Interactive (the default) is the view described above. All options shows the full report, which adds:
- an Applied filter : group selector, and Genes and Scaling selectors;
- Marker shape — a column from the project annotation (such as Batch) drawn as the marker shape, while colour stays the group, so a split by that column can be told apart from a split by group;
- View — 2D or 3D (a PCA 3D Score Plot using a third component);
- written interpretation before the plot: whether the groups separate along the X axis, whether a batch or other technical column separates them, and whether a single sample is holding an axis;
- a Scree Plot with a cumulative-variance line, and a PC scores table.
In All options the X and Y components are set with PCA X axis and PCA Y axis in the Report settings panel, and the plot follows the Appearance settings (see Report Settings).
Reading it¶
- Replicates should cluster. Samples of the same group sitting close together is the first sign of good data.
- Groups should separate if the treatment had a large effect on expression. Separation along PC1 is the strongest signal.
- An outlier — a sample far from its group — may be a technical failure or a mislabelled sample. Check it in Sample QC and Sample Correlation.
- A split that follows batch rather than group means a batch effect; see Batch Effect.
- On a single-cell project each point is a pseudobulk sample of one cell type, so samples separate by cell type first and condition second. That is expected: compare conditions within one cell type.
- Variance explained depends on the gene set and scaling. Match them to a manuscript's Methods before comparing percentages.