Skip to content

perf(iVolcano): downsample tutorial data and link Hiplot full version - #330

Merged
ShixiangWang merged 1 commit into
mainfrom
content/ivolcano-downsample
Oct 11, 2026
Merged

ShixiangWang merged 1 commit into
mainfrom
content/ivolcano-downsample

Conversation

@ShixiangWang

Copy link
Copy Markdown
Member

Summary

Resolves the A3.3 (iVolcano 页面瘦身) item of #306: the tutorial rendered 8 interactive widgets that each embedded the full example dataset as inline SVG (~46 MB per language, ~92 MB en+zh — the largest single page on the site).

Changes

Downsampling (data-preserving strategy)

  • Omics/iVolcanoPlot.qmd + Omics/iVolcanoPlot.zh.qmd — in the load-data chunk, downsample df_limma before plotting: keep all significant genes (P.Value < 0.05 & |logFC| > 1, n = 1,950) plus a seed-fixed (set.seed(1)) random sample of 2,000 non-significant genes → 13,346 → 3,950 rows.
  • Same treatment for df_airway in the pathway-linkage chunk: keep all genes with padj < 0.05 so GO enrichment inputs and the dot-plot ↔ volcano linkage are unchanged (20,606 → 5,755 rows).
  • Comments in both languages explain the rationale and note that real analyses should use the full dataset.

Hiplot full-version link (外链完整版)

Measured impact (local render, identical template)

Page Before After Δ
iVolcanoPlot.html (one language) 48.2 MB 14.8 MB −69%
en + zh deployed ~96 MB ~30 MB −62 MB

(Widget blocks shrink 5.77–6.93 MB → 1.71–2.3 MB each; circle counts 13,346 → 3,950.)

Teaching value preserved (verified locally with set.seed(1))

  • All 1,950 significant genes retained (Up 946 / Down 1,004 unchanged)
  • All 10 extreme logFC > 8 genes retained → the filter = "logFC > 8" demo still labels all points
  • Top-50 most significant gene extraction (fanyi chunk) still yields the same top genes
  • enrichGO on the downsampled airway data returns the expected enriched terms; all 8 chunks execute cleanly end-to-end
  • Interactive/static widget construction verified against installed ivolcano 0.0.5

Validation

  • ✅ Full local render of the downsampled page (all 8 chunks, no errors)
  • ✅ Downsampled vs full-data A/B render confirms only point counts shrink; widget structure/keys identical
  • ✅ Both Hiplot links return HTTP 200
  • ⏳ PR CI full render will validate the bilingual build

🤖 Generated with Claude Code

The iVolcano tutorial rendered 8 interactive widgets that each embedded
the full example datasets (13,346 limma genes / 20,606 airway genes) as
inline SVG, making the page ~46 MB in each language (~92 MB total on the
deployed site) - the largest single page in the site.

Changes (issue #306 A3.3):
- Downsample df_limma in the load-data chunk: keep all significant genes
  (P.Value < 0.05 & |logFC| > 1, n = 1,950) plus a seed-fixed sample of
  2,000 non-significant genes
- Downsample df_airway in the pathway-linkage chunk: keep all genes with
  padj < 0.05, so GO enrichment and plot linkage are unaffected
- Add callout notes (en/zh) linking the full-featured Hiplot Volcano app
  for users who need the complete no-code version

Measured locally: page drops 48.2 MB -> 14.8 MB (-69%); deployed en+zh
saving ~62 MB. All significant genes, all logFC > 8 extremes, top-50
labeling, and enrichment-linkage behavior verified intact with
set.seed(1).

Co-Authored-By: Claude Code <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

✅ QMD Format Check

✅ All 1 checked QMD file(s) pass format validation!

Automated check by the PR Review workflow.
See contribution guidance for the expected tutorial format.

@github-actions

Copy link
Copy Markdown
Contributor

📊 Quarto Render Preview

The new or modified Quarto files have been rendered and are available as artifacts.

🔗 View and Download Rendered Files

Click the link above, scroll to the "Artifacts" section at the bottom of the page, and download quarto-rendered-files to preview the rendered HTML files.

Modified files:

Omics/iVolcanoPlot.qmd Omics/iVolcanoPlot.zh.qmd

@ShixiangWang
ShixiangWang merged commit fd89447 into main Oct 11, 2026
5 checks passed
@ShixiangWang
ShixiangWang deleted the content/ivolcano-downsample branch October 11, 2026 13:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant