Repository navigation
feat(workflow-operator): volcano plot labels follow columns - #9040
eugenegujing wants to merge 4 commits into
Conversation
Name the y column and its axis -log10(<p-value column>) instead of the fixed "-log10(pvalue)". Add optional Title, X Label, Y Label and Color Bar Label properties that override the column-derived text when set; an empty or blank field keeps the default.
Automated Reviewer SuggestionsBased on the
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #9040 +/- ##
============================================
+ Coverage 91.87% 91.95% +0.07%
- Complexity 5049 5092 +43
============================================
Files 1265 1276 +11
Lines 54915 55506 +591
Branches 6940 7039 +99
============================================
+ Hits 50453 51039 +586
+ Misses 2769 2725 -44
- Partials 1693 1742 +49
*This pull request uses carry forward flags. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
| config | throughput | MB/s | latency | max Δ latest / 7d | |
|---|---|---|---|---|---|
| 🔴 | bs=10 sw=10 sl=64 | 372 | 0.227 | 26,298/34,115/34,115 us | 🔴 +19.4% / 🔴 +179.1% |
| 🔴 | bs=100 sw=10 sl=64 | 804 | 0.491 | 122,492/158,874/158,874 us | 🔴 +7.9% / 🔴 +82.3% |
| 🔴 | bs=1000 sw=10 sl=64 | 960 | 0.586 | 1,033,465/1,178,878/1,178,878 us | 🔴 +7.9% / 🔴 +44.1% |
Baseline details
Latest main bc4f3c8 from same runner
| config | metric | PR | latest main | 7d avg | Δ latest | Δ 7d |
|---|---|---|---|---|---|---|
| bs=10 sw=10 sl=64 | throughput | 372 tuples/sec | 433 tuples/sec | 1,019 tuples/sec | -14.1% | -63.5% |
| bs=10 sw=10 sl=64 | MB/s | 0.227 MB/s | 0.264 MB/s | 0.622 MB/s | -14.0% | -63.5% |
| bs=10 sw=10 sl=64 | p50 | 26,298 us | 23,317 us | 10,144 us | +12.8% | +159.2% |
| bs=10 sw=10 sl=64 | p95 | 34,115 us | 28,582 us | 12,225 us | +19.4% | +179.1% |
| bs=10 sw=10 sl=64 | p99 | 34,115 us | 28,582 us | 15,527 us | +19.4% | +119.7% |
| bs=100 sw=10 sl=64 | throughput | 804 tuples/sec | 872 tuples/sec | 1,371 tuples/sec | -7.8% | -41.4% |
| bs=100 sw=10 sl=64 | MB/s | 0.491 MB/s | 0.532 MB/s | 0.837 MB/s | -7.7% | -41.3% |
| bs=100 sw=10 sl=64 | p50 | 122,492 us | 113,537 us | 79,910 us | +7.9% | +53.3% |
| bs=100 sw=10 sl=64 | p95 | 158,874 us | 156,040 us | 87,155 us | +1.8% | +82.3% |
| bs=100 sw=10 sl=64 | p99 | 158,874 us | 156,040 us | 106,643 us | +1.8% | +49.0% |
| bs=1000 sw=10 sl=64 | throughput | 960 tuples/sec | 963 tuples/sec | 1,415 tuples/sec | -0.3% | -32.2% |
| bs=1000 sw=10 sl=64 | MB/s | 0.586 MB/s | 0.588 MB/s | 0.864 MB/s | -0.3% | -32.2% |
| bs=1000 sw=10 sl=64 | p50 | 1,033,465 us | 1,030,425 us | 780,407 us | +0.3% | +32.4% |
| bs=1000 sw=10 sl=64 | p95 | 1,178,878 us | 1,092,916 us | 817,814 us | +7.9% | +44.1% |
| bs=1000 sw=10 sl=64 | p99 | 1,178,878 us | 1,092,916 us | 848,683 us | +7.9% | +38.9% |
Raw CSV
config_idx,batch_size,schema_width,string_len,num_batches,total_ms,total_tuples,total_bytes,tuples_per_sec,mb_per_sec,lat_p50_us,lat_p95_us,lat_p99_us
0,10,10,64,20,537.47,200,128000,372,0.227,26298.41,34115.30,34115.30
1,100,10,64,20,2488.67,2000,1280000,804,0.491,122491.57,158873.58,158873.58
2,1000,10,64,20,20842.47,20000,12800000,960,0.586,1033465.45,1178877.82,1178877.82
kz930
left a comment
There was a problem hiding this comment.
The color bar always shows the effect column, which is the same column as the x axis, so is a separate Color Bar Label needed, or could it follow X Label?
…label Drop the Color Bar Label property; the points are colored by the effect column that is on the x axis, so the color bar now carries the X Label text in both the engine template and the exported script.
What changes were proposed in this PR?
Root cause:
VolcanoPlotOpDesc.generatePythonCodehard-codes the y column as the literal"-log10(pvalue)"and plots it under that name, so the y axis always says-log10(pvalue)even when the selected column ispadj. The title is the literal"Volcano Plot"and the x axis and color bar show the raw effect column name. None of this can be changed from the property panel.The y column is now named after the selected p-value column, so the axis and the hover text say which column was transformed. Three optional label properties are added, empty by default:
Volcano Plot-log10(<p-value column>)The color bar has no label of its own: the points are colored by the effect column, the same column that is on the x axis, so the color bar carries the X Label text (or the effect column name when X Label is empty). If a later change lets the color encode a different column, a label for it would come with that change.
The labels go through
fig.update_layout(xaxis_title, yaxis_title, coloraxis_colorbar_title_text), same as Line Chart's X Label / Y Label. Each label is anEncodableString, so quotes and non-ASCII text are fine. A whitespace-only field counts as empty. The hover box still shows raw column names (plotly behaviour, same as Line Chart).Behavior change for saved workflows: a workflow with
padjas the p-value column now renders-log10(padj)instead of-log10(pvalue). That is the fix.Since #8504 merged, the operator also has an export path,
generateStandaloneCode(), which writes the same figure as a standalone script. It carried the same hard-coded"-log10(pvalue)"andtitle="Volcano Plot", so this PR applies the same change there: the y column is named after the selected p-value column and the three labels go throughfig.update_layoutas escaped Python literals (the export has no decoder, sopyStringLiteralescapes quotes and backslashes). The engine template and the exported script now label the figure the same way, and a spec checks that across the label combinations.Rebase note:
coloraxis_colorbar_title_textis emitted unconditionally, in both templates. Once the significance-coloring PR (#9039) lands, the categorical mode has nocoloraxis, so whichever branch rebases second needs to make that entry conditional.Figures below are the operator's generated Python from
mainand from this branch, run on the 430-gene example workflow from the issue; the third one has the title and both axis labels filled in.Any related issues, documentation, discussions?
Closes #9037
PR #8504 (merged) added the
generateStandaloneCode()export path with the same hard-coded"-log10(pvalue)"; the mirroring described above is the follow-up it needed.How was this PR tested?
New tests in
VolcanoPlotOpDescSpec, written before the source change:generateStandaloneCode: the y column and axis are named after the p-value column (including a name with a quote,p"adj), the labels fall back to the column-derived defaults, a set label is emitted as an escaped literal and the default title is gone, the color bar carries the X Label text, whitespace-only keeps the default, a saved workflow renders as a default-constructed operator, and a cross-path test with the title and X Label set checks that the engine template and the exported script carry the same title, axis and color bar labelsSmoke run: the generated code was executed outside Texera (pytexera stubbed, pandas + plotly 5.24.1) on the 430-gene mock table. Defaults give title
Volcano Plot, xlfc_shrunk, y-log10(padj), color barlfc_shrunk; with the labels set the figure shows the typed text; whitespace-only title and y label fall back to the defaults. The exported script for the default and the all-labels configuration parses withast.parse.Was this PR authored or co-authored using generative AI tooling?
Yes. Generated-by: Claude Code (claude-fable-5-1). Co-authored with Claude; the author reviewed the change before submission.