You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@texera.apache.org by "eugenegujing (via GitHub)" <gi...@apache.org> on 2026/10/20 04:13:17 UTC
[PR] feat(workflow-operator): volcano plot labels follow columns [texera]
eugenegujing opened a new pull request, #9040:
URL: https://github.com/apache/texera/pull/9040
### What changes were proposed in this PR?
Root cause: `VolcanoPlotOpDesc.generatePythonCode` hard-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 is `padj`. 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.
```
Before: P-Value Column = padj -> y column "-log10(pvalue)" -> y axis "-log10(pvalue)"
After: P-Value Column = padj -> y column "-log10(padj)" -> y axis "-log10(padj)", or the Y Label the user typed
```
The y column is now named after the selected p-value column, so the axis and the hover text say which column was transformed. Four optional label properties are added, empty by default:
| Property | Empty | Set |
|---|---|---|
| Title | `Volcano Plot` | the text typed |
| X Label | effect column name | the text typed |
| Y Label | `-log10(<p-value column>)` | the text typed |
| Color Bar Label | effect column name | the text typed |
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 an `EncodableString`, 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 `padj` as the p-value column now renders `-log10(padj)` instead of `-log10(pvalue)`. That is the fix.
Rebase note: `coloraxis_colorbar_title_text` is emitted unconditionally. Once the significance-coloring PR (#9039) lands, the categorical mode has no `coloraxis`, so whichever branch rebases second needs to make that entry conditional.
Figures below are the operator's generated Python from `main` and from this branch, run on the 430-gene example workflow from the issue; the third one has all four labels filled in.
| Before | After (defaults) | After (labels set) |
|---|---|---|
| <img width="1398" height="849" alt="before-main" src="https://github.com/user-attachments/assets/0c0dd5ef-3675-44e2-98f6-236b54bd631b" /> | <img width="1398" height="849" alt="labels-after-default" src="https://github.com/user-attachments/assets/ee8dc430-2142-47ac-947f-59c535c2b308" /> | <img width="1398" height="849" alt="labels-after-custom" src="https://github.com/user-attachments/assets/8299992d-d84d-48fe-9556-e66a8579e859" /> |
### Any related issues, documentation, discussions?
Closes #9037
PR #8504 adds a `generateStandaloneCode()` path to this operator that copies the current template, including the hard-coded `"-log10(pvalue)"`. Whichever lands first, the other needs a follow-up.
### How was this PR tested?
New tests in `VolcanoPlotOpDescSpec`, written before the source change:
- y column and axis are named after the selected p-value column; the old literal is gone
- every label falls back to its default when empty or whitespace-only
- a set label replaces its default and reaches the code only as a decode site (sentinels with quotes, backslash, non-ASCII)
- one set label leaves the other three at their defaults
- a workflow JSON saved before this change (only the two column keys) generates byte-for-byte the same code as a default-constructed operator
```
sbt -Dsbt.server.forcestart=true "WorkflowOperator/testOnly *VolcanoPlotOpDescSpec"
# Tests: succeeded 11, failed 0, canceled 0, ignored 0, pending 1 (the pending one is pre-existing)
sbt -Dsbt.server.forcestart=true "WorkflowOperator/scalafmtAll" "WorkflowOperator/Test/scalafmtAll"
sbt -Dsbt.server.forcestart=true "WorkflowOperator/scalafixAll --check"
# success
```
Smoke 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`, x `lfc_shrunk`, y `-log10(padj)`, color bar `lfc_shrunk`; with all four labels set the figure shows the typed text; whitespace-only title and y label fall back to the defaults.
### 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.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] feat(workflow-operator): volcano plot labels follow columns [texera]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #9040:
URL: https://github.com/apache/texera/pull/9040#issuecomment-6283458415
<!-- texera-reviewer-suggestion -->
### Automated Reviewer Suggestions
Based on the `git blame` history of the changed files, we recommend the following reviewers:
- **Contributors with relevant context:** `@kz930`, `@Yicong-Huang`
You can notify them by mentioning `@kz930`, `@Yicong-Huang` in a comment.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@texera.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org