clusterProfiler icon indicating copy to clipboard operation
clusterProfiler copied to clipboard

remove pvalue_table row names

Open olechnwin opened this issue 6 months ago • 1 comments

Hi,

Is there an easy way to remove the pvalue_table row names?

Here is a reproducible code of what I'm trying to do:

library(DOSE)
data(geneList)
edo2 <- gseDO(geneList)
gseaplot2(edo2, geneSetID = 1, title = edo2$Description[1],pvalue_table=TRUE)

Image

Since I only have one enrichment line, I would like to remove the green "primary immunodeficiency disease" label. I am using enrichplot version 1.25.2.001. Also, is it possible to put NES score to the pvalue table?

Thank you in advance for your help.

edited to add: nes score request

olechnwin avatar May 29 '25 14:05 olechnwin

AFAIK this is currently not possible. Yet, I think this would be easy to implement, because in this line of the code it is determined which values are plotted. It would be nice of these arguments could be manually specified. Idem for whether or not to plot the name of the gene set(s).

https://github.com/YuLab-SMU/enrichplot/blob/9ec2877e076b527cb24eb3a3ee71cae04aaac3ae/R/gseaplot.R#L307

Pinging @GuangchuangYu as well.

guidohooiveld avatar Jun 23 '25 14:06 guidohooiveld

library(DOSE)
data(geneList)
x <- gseDO(geneList)

Default: same as before

gseaplot2(x, 1, pvalue_table=T)

no rownames

gseaplot2(x, 1, pvalue_table=T, pvalue_table_rownames=NULL)

use other information as rownames and specify which information to be displayed in the table

gseaplot2(x, 1, pvalue_table=T, 
    pvalue_table_rownames="ID", 
    pvalue_table_columns=c("NES", "p.adjust"))

gseaplot2(x, 1, pvalue_table=T, 
    pvalue_table_rownames=NULL, 
    pvalue_table_columns=c("ID", "NES", "p.adjust"))

GuangchuangYu avatar Jul 12 '25 09:07 GuangchuangYu