Methods
RNA-seq Explorer runs an entire differential-expression workflow in the browser as a single self-contained HTML file. No server is ever involved and no count data leaves the user's machine. It works in two tiers: a fast in-browser engine (JavaScript) gives instant, interactive results for exploration, and an optional bridge to real DESeq2 in R (below) swaps in authoritative statistics for publication — that step also runs locally, in the user's own R installation.
Sample QC. Before analysis, each sample is summarised directly from its raw counts: library size (the sum of assigned counts — i.e. mapped/counted reads, not raw sequencing depth, which isn't present in an imported matrix), the number of detected genes (≥1 count), the median-of-ratios size factor, library complexity (the share of counts contributed by the 50 highest-expressed genes), and mitochondrial content (the fraction of counts from mt- genes, when present). Replicate consistency is assessed by the Pearson correlation of log₂ size-factor-normalised expression to the nearest same-group sample; the nearest match is used rather than the group average so that a single outlier cannot depress the scores of its group-mates. Samples are flagged for unusually low library size, few detected genes, extreme size factors, elevated mitochondrial fraction, or low nearest-replicate correlation. These are heuristic screening thresholds intended to prompt inspection rather than automated exclusion.
Differential expression. Raw counts are pre-filtered by a user-set rowSums threshold, then normalized with the median-of-ratios method to correct for library-size and composition differences between samples. A gene-wise dispersion is estimated and shrunk toward a fitted mean–dispersion trend, and differential expression is called with a DESeq2-style Wald test. p-values are adjusted across all tested genes by the Benjamini–Hochberg procedure (padj / FDR). log₂ fold change is computed on size-factor-normalized counts with a 0.5 pseudocount; positive values indicate up-regulation in the treatment group relative to the control reference.
Authoritative DESeq2 in R. The in-browser engine above is a fast DESeq2-style approximation — great for instant, interactive exploration, but not byte-for-byte identical to the reference implementation. Because DESeq2 itself only runs in R and cannot execute inside a web page, the tool doesn't reimplement it — it hands your data off to the real thing and reads the results back. The round-trip has three steps:
- Export — click Run real DESeq in R. The tool writes a small bundle for your current control-vs-treatment contrast: the contrast count matrix, an all-sample count matrix, and a ready-to-run R script (
deseq2_<contrast>.R).
- Run in R — put those files in one folder and run
Rscript deseq2_<contrast>.R on any machine with R and the DESeq2 Bioconductor package. The script runs the genuine DESeq2 analysis and writes two outputs: a results table (baseMean, log2FoldChange, lfcSE, stat, pvalue, padj) and a blind variance-stabilised (VST) matrix across all samples. (Have Claude Code? A one-click button copies a prompt that runs this for you.)
- Import back — drop those two files onto Import DESeq2 output. Each is auto-detected from its columns (not its filename), and every view switches from the browser approximation to the real DESeq2 numbers: Volcano, DEG Table, Scatter, Pathways and TF from the results table; PCA and Heatmap from the VST.
The result: the whole pipeline stays on your own hardware — the browser for speed, R for the authoritative statistics — with no server anywhere in the loop.
Outlier handling. An optional Cook's-distance step identifies samples that disproportionately drive a gene's fit, offering four modes (a robust leave-one-out filter, a DESeq2-faithful gene-wise flag, an aggressive trend-based flag, and off). The threshold follows DESeq2's qF(0.99, 2, m−2) convention and is only active when a group has ≥3 replicates.
Unsupervised views. PCA and the heatmap use a blind variance-stabilizing transform (VST) fitted once across all loaded samples, independent of the group labels. PCA projects the 500 most-variable genes onto the first two principal components by power iteration; the heatmap z-scores each gene across the displayed samples. The expression scatter offers VST, log₂(mean + 1), or linear scaling.
Heatmap gene selection. By default the heatmap shows the top differentially-expressed genes from the control-versus-treatment contrast, split into down- and up-regulated blocks. Three further modes select rows from an arbitrary set of user-chosen groups: (i) the most-variable genes across the selected samples on the blind VST (unsupervised); (ii) one-versus-rest marker genes, in which each selected group is tested against the pooled remainder with the same Wald approximation used for the main contrast and the top up-regulated genes per group are unioned into per-group blocks; and (iii) a multi-group likelihood-ratio test of whether a gene differs across any selected group. The LRT compares a negative-binomial full model (a separate mean per group) against a reduced model (a single common mean), evaluating the χ² statistic on (number of groups − 1) degrees of freedom; group means are obtained by Newton iteration at a shared per-gene dispersion. That dispersion is the moment estimate shrunk toward the fitted mean–dispersion trend and is held fixed across both models, so the test approximates rather than reproduces the full empirical-Bayes DESeq2 likelihood-ratio test and is intended for exploration rather than definitive multi-group inference.
Functional analysis. Pathway over-representation is tested against Reactome (its AnalysisService, with an Enrichr fallback), KEGG, and WikiPathways via a hypergeometric test. Hallmark enrichment is scored from Enrichr results. Transcription-factor activity is inferred from the DEG table using the univariate linear model (ULM) from decoupleR against CollecTRI regulons (Müller-Dott et al., 2023), with a complementary regulon over-representation test.
Annotation. Mouse genes are mapped to MGI symbols, with ~77,600 Ensembl IDs resolved; duplicate symbols can be disambiguated by their Ensembl identifier.
AI Disclosure
This tool was developed with the assistance of Claude (Anthropic), a large language model, which generated the application code. Yaxin Liu specified the analytical requirements and design, conducted testing and debugging, and takes responsibility for the tool's implementation and outputs.