Skip to content

Volcano Plot labels the y axis "-log10(pvalue)" regardless of the selected column, and offers no title / axis / color-bar labels #9037

Description

@eugenegujing

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:

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

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions