Repository navigation
feat(workflow-operator): volcano plot significance cut-offs - #9041
Open
eugenegujing wants to merge 1 commit into
Open
eugenegujing wants to merge 1 commit into
eugenegujing wants to merge 1 commit into
Conversation
Add optional Significance threshold and Effect-size threshold properties that draw dashed cut-off lines at -log10(threshold) and at plus and minus the effect-size threshold. Add a Color by significance toggle that, with both thresholds set, colors points Up, Down or Not significant instead of by effect size. Bound both thresholds in the JSON schema and ignore a non-positive, non-finite or above-one value instead of drawing it.
Contributor
Automated Reviewer SuggestionsBased on the
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this PR?
The Volcano Plot draws a plain scatter of effect size vs
-log10(p), colored by effect size, which is already the x axis. Nothing shows where the significance bar is or which points clear it. This PR adds three optional properties, all off by default, so saved workflows render as before.0 < x <= 1-log10(threshold)> 0+thresholdand-thresholdUp/Down/Not significantwith a legend instead of the continuousRdBuscaleCategories use strict comparisons on the selected p-value column:
Up=p < sigandeffect > eff,Down=p < sigandeffect < -eff, everything elseNot significant. The category is written to a column namedSignificance(also the legend title); an input column of that name would be shadowed inside the operator only. Colors are ColorBrewer RdBu end points#B2182B/#2166ACplus grey#9E9E9E.Validation: the JSON schema bounds above stop bad values in the property panel. For hand-edited JSON the operator also ignores a threshold it cannot draw (NaN, infinite, <= 0, or a p cut-off > 1) and falls back to the continuous coloring if the toggle is on but a threshold is missing. A cut-off of exactly 1 is allowed and draws its line at y = 0. If the cut-off's
-log10is beyond the data range the line may fall outside the auto-ranged axis; extending the range is left for a follow-up.Independent of the label-fix (#9037) and hover-column (#9038) 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
mainand from this branch, run on the 430-gene example workflow from the issue, with thresholds 0.05 and 1.Any related issues, documentation, discussions?
Closes #9039
PR #8504 adds a
generateStandaloneCode()path to this operator that copies the current template. Whichever lands first, the other needs a follow-up.How was this PR tested?
New tests in
VolcanoPlotOpDescSpec, written before the source change:np.selectcolumn, exact color map and category order, nocolor_continuous_scaleInfinity,-Infinity,NaNfrom JSON never reach the Python1e-300,Double.MIN_VALUEand1e21in every site they appearexclusiveMinimum/maximumon the two thresholdsSmoke run outside Texera (pytexera stubbed, pandas + plotly 5.24.1) on the 430-gene mock table, 420 rows after the operator drops zero and missing p-values:
Up35,Down35,Not significant350"Infinity"/"NaN"from JSONNot significant420Up41,Down38,Not significant341The exponent-form dumps pass
python -m py_compile.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.