Skip to content
Lanxu · OmniBio
All tools

Online PCA Analysis and Plot

Paste a gene expression matrix to run principal component analysis (PCA) in your browser, color samples by group, label them, and export SVG / PNG plus the sample scores.

  • No sign-up
  • Runs locally

Expression matrix

Sample groups (optional)

One group name per sample in column order (one per line, or comma-separated), or one “sample name + Tab + group” per line. Leave empty for no groups.

Options

Preprocessing

Plot

Result

Paste your data, or click “Load example” to try it out.

How to use

  1. Paste an expression matrix (sample names in the first row, gene names in the first column, numbers elsewhere), or choose / drop a CSV or TSV file; or click “Load example” first. PCA needs at least 3 samples.
  2. Enter sample groups (one group name per sample, or click “Infer from sample names”); points are colored by group.
  3. Under Preprocessing, decide on log2(x + 1), the top N genes by variance and per-gene standardization; log2 is ticked by default when the data look like counts.
  4. Under Plot, choose the principal components for the two axes, set point size, width and title, and optionally label samples and draw a 95% ellipse per group.
  5. Check the scatter plot and the variance explained by each component on the right, then download SVG, PNG or the sample scores TSV.

Notes

  • Same method as the OmniBio platform: the 1000 genes with the highest variance, each centered and divided by its standard deviation (R prcomp(center = TRUE, scale. = TRUE)); variance explained matches prcomp. The sign of a PC is arbitrary; here the sample with the largest absolute score on each PC is made positive.
  • Normalized, log-scale input is recommended (e.g. DESeq2 VST, log2 CPM / TPM). Raw counts should not go into PCA directly; the OmniBio platform applies VST first, and without DESeq2 here, log2(x + 1) is offered as an approximation.
  • The 95% ellipses follow ggplot2 stat_ellipse defaults (multivariate t, robust estimate) and need at least 4 samples per group. With few replicates they are large and only indicative.
  • Rows with missing values are removed, genes with identical values in all samples are dropped first, up to 500 samples are supported, and with many samples the number of genes is capped automatically (2000 genes at 500 samples) to keep the browser responsive. Layout follows the OmniBio platform figure style (Arial, 6 pt text); width 89 or 183 mm.

FAQ

Should I use raw counts or normalized data for PCA?

Normalized, log-scale data is recommended (e.g. DESeq2 VST, log2 CPM / TPM); raw counts should not go into PCA directly. There is no DESeq2 here, so when all values are non-negative and the maximum exceeds 100 (counts or unlogged expression), log2(x + 1) is ticked by default as an approximation. If the matrix has negative values, log2 is not applied and a note says so.

Is the computation the same as R’s prcomp?

Yes. By default the 1000 genes with the highest variance are used, each centered and divided by its standard deviation (equivalent to prcomp(center = TRUE, scale. = TRUE)), and the variance explained matches prcomp. The sign of a component is arbitrary; here the sample with the largest absolute score on each component is made positive, so the same input always gives the same plot.

How is the 95% ellipse drawn, and how many samples does a group need?

The ellipse follows ggplot2 stat_ellipse defaults (multivariate t, robust estimate). You need to enter sample groups first, each group needs at least 4 samples, and no ellipse is drawn if its points lie on a line. With few replicates the ellipse is large and only indicative, not a statistical test.

Will many samples or genes make it slow? What are the limits?

Up to 500 samples are supported; remove some first if you have more. With many samples the number of genes is capped automatically to keep the browser responsive (2000 genes at 500 samples), and the page tells you how many were used. Rows with missing values are removed, and genes with identical values in all samples (zero variance) are dropped first.

Is my data uploaded, and what can I export?

No. Everything runs locally in your browser; nothing is sent to a server and no sign-in is needed. You can download SVG (vector, editable in Illustrator), a 600 dpi PNG, and a sample scores TSV containing all principal components.