eugenegujing opened a new issue, #9037:
URL: https://github.com/apache/texera/issues/9037

   ### What happened?
   
   `VolcanoPlotOpDesc.generatePythonCode` 
(`common/workflow-operator/src/main/scala/org/apache/texera/amber/operator/visualization/volcanoPlot/VolcanoPlotOpDesc.scala:111-120`)
 hard-codes every text element of the figure:
   
   ```python
   table["-log10(pvalue)"] = -np.log10(table[$pvalueColumn])   # :111
   fig = px.scatter(
       table,
       x=$effectColumn,
       y="-log10(pvalue)",                                      # :116  y-axis 
title
       hover_name=table.columns[0],
       color=$effectColumn,                                     # color bar 
title = raw column name
       color_continuous_scale="RdBu",
       title="Volcano Plot"                                     # :120
   )
   ```
   
   The property panel exposes only `Effect Size (log2 Fold Change)` and 
`P-Value Column`. Whatever column is selected as the p-value input, the y axis 
is titled `-log10(pvalue)`.
   
   In practice the p-value input is almost always a multiple-testing-adjusted 
value (DESeq2 `padj`, limma `adj.P.Val`, BH / Storey q-values). With 
`pvalueColumn = padj` the figure says `-log10(pvalue)`, i.e. it tells the 
reader the y axis is the raw p-value. Nobody can tell the difference from the 
figure, and there is no title, x-label, y-label or color-bar-label property to 
fix it from the UI. The x axis and color bar show the raw column name 
(`lfc_shrunk`, `delta_pdui`), which is not a publication label either.
   
   Concrete case (RNA-seq differential expression + differential APA, two 
volcano plots in one workflow):
   
   | Figure | Column chosen | What the figure should say | What Texera renders |
   |---|---|---|---|
   | DE volcano, y | `padj` | −log₁₀(BH-adjusted p-value) | `-log10(pvalue)` |
   | DE volcano, x | `lfc_shrunk` | Shrunken log₂ fold change (NAS1 / NAS0) | 
`lfc_shrunk` |
   | DE volcano, color bar | `lfc_shrunk` | Shrunken log₂ fold change | 
`lfc_shrunk` |
   | APA volcano, y | `padj` | −log₁₀(BH-adjusted p-value) | `-log10(pvalue)` |
   | APA volcano, x | `delta_pdui` | ΔPDUI (NAS1 − NAS0) | `delta_pdui` |
   
   The APA case also shows that the fixed `log2 Fold Change` wording in the 
property title (`:47`) is too narrow: that effect column is a difference of 
proportions, not a log fold change. We had to send collaborators a separate 
note explaining that the y label on both plots is wrong and what the axes 
actually mean.
   
   Expected: the y-axis title names the column that was actually transformed 
(e.g. `-log10(padj)`), and the title / axis / color-bar text can be set from 
the property panel, as Line Chart already allows for its axes.
   
   ### How to reproduce?
   
   1. Any source whose rows have a numeric effect column and a numeric 
adjusted-p column, e.g. a CSV with `gene,lfc_shrunk,padj`.
   2. Volcano Plot → Effect Size = `lfc_shrunk`, P-Value Column = `padj`.
   3. Run; open the result.
   
   ### Version/Branch
   
   1.4.0-incubating-SNAPSHOT (main)
   
   ### Commit Hash (Optional)
   
   _No response_
   
   ### What browsers are you seeing the problem on?
   
   _No response_
   
   ### Relevant log output
   
   ```shell
   
   ```


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to