Skip to content

feat(workflow-operator): volcano plot hover column - #9042

Open
eugenegujing wants to merge 1 commit into
apache:mainfrom
eugenegujing:feat/volcano-plot-hover-column
Open

eugenegujing wants to merge 1 commit into
apache:mainfrom
eugenegujing:feat/volcano-plot-hover-column

Conversation

@eugenegujing

Copy link
Copy Markdown
Contributor

What changes were proposed in this PR?

The Volcano Plot uses hover_name=table.columns[0], so the tooltip label is whatever column comes first in the input. That is fine for a DESeq2 table starting with gene and useless for one starting with a composite id or a number, and there is no way to change it. This PR copies Scatter Plot's Hover column property over, one column only.

Hover column Result
empty or whitespace-only (default) hover_name=table.columns[0], unchanged for saved workflows
set, present in the input hover_name=<that column>
set, missing from the input the operator's error page Missing hover column in table., like the existing check for the two required columns (Scatter Plot lets plotly raise a ValueError here)

Independent of the label-fix (#9037) and significance-threshold (#9039) PRs; all three touch neighbouring lines of VolcanoPlotOpDesc.scala, so whichever lands second needs a small rebase.

Figures below are the operator's generated Python from main and from this branch (Hover column = gene), run on the 430-gene example workflow from the issue whose first column is transcript|gene|chr|strand; the same point is hovered in both.

Before After (Hover column = gene)
hover-before-first-column hover-after-gene

Any related issues, documentation, discussions?

Closes #9038

PR #8504 adds a generateStandaloneCode() path to this operator that copies the current template, including hover_name=table.columns[0]. Whichever lands first, the other needs a follow-up.

How was this PR tested?

New tests in VolcanoPlotOpDescSpec, written before the source change:

  • empty or whitespace-only field keeps hover_name=table.columns[0] and emits no hover check
  • a set field emits the decoded column as hover_name plus the presence check, and no table.columns[0]
  • a column name with quotes and non-ASCII text reaches the code only as a decode site
  • a workflow JSON saved before this change 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 outside Texera (pytexera stubbed, pandas + plotly 5.24.1) on the 430-gene mock table: defaults hover-label the first point as ENST00000000000|GENE_0000|chr2|+; Hover column = gene gives GENE_0000; Hover column = no_such_column yields <h1>Volcano Plot failed</h1><p>Missing hover column in table.</p>.

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.

Add an optional Hover column property, as on Scatter Plot, used as the hover label of each point.
An empty or blank field keeps the first input column as before; a set column missing from the input yields the operator's error page.
@github-actions

Copy link
Copy Markdown
Contributor

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 branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Volcano Plot: hover label is always the first input column; expose a Hover column property like Scatter Plot

1 participant