enrichplot icon indicating copy to clipboard operation
enrichplot copied to clipboard

关于gseaplot2中pvalue_table的显示问题

Open swcyo opened this issue 2 years ago • 4 comments

在gseaplot2函数中当设置pvalue_table = T时,默认显示的是pvaluep.adjust,但一般情况下需要的是NES和p值,能否适当予以调整,改成显示为NESp.adjust(个人觉得没必要显示两个p值)。 我在查看gseaplot2函数时发现定义是:

if (pvalue_table) {
        pd <- x[geneSetID, c("Description", "pvalue", "p.adjust")]
        # pd <- pd[order(pd[,1], decreasing=FALSE),]
        rownames(pd) <- pd$Description

        pd <- pd[,-1]
        pd <- round(pd, 4)

        tp <- tableGrob2(pd, p.res)

        p.res <- p.res + theme(legend.position = "none") +
            annotation_custom(tp,
                              xmin = quantile(p.res$data$x, .5),
                              xmax = quantile(p.res$data$x, .95),
                              ymin = quantile(p.res$data$runningScore, .75),
                              ymax = quantile(p.res$data$runningScore, .9))
    }

当我试图把pvalue改为NES后再跑代码时,却提示没有tableGrob2函数,这个不知如何解决,万望回复,谢谢

swcyo avatar Aug 06 '21 11:08 swcyo

请问您这个问题解决了吗? 我也想改改这个。

Eugene221035 avatar May 03 '22 15:05 Eugene221035

没有

| 欧阳松 石河子大学医学院第一附属医院 - 主治医师 18799743299 @.*** 新疆石河子市北二路109号 |

---- 回复的原邮件 ---- | 发件人 | @.> | | 日期 | 2022年05月03日 23:56 | | 收件人 | @.> | | 抄送至 | Song @.@.> | | 主题 | Re: [YuLab-SMU/enrichplot] 关于gseaplot2中pvalue_table的显示问题 (#134) |

请问您这个问题解决了吗? 我也想改改这个。

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

swcyo avatar May 04 '22 07:05 swcyo

请问您这个问题解决了吗? 我也想改改这个。

tableGrob2函数在这里 https://github.com/YuLab-SMU/enrichplot/blob/master/R/ggtable.R 运行一下就解决了

swcyo avatar Sep 28 '22 18:09 swcyo

在gseaplot2函数中当设置pvalue_table = T时,默认显示的是pvaluep.adjust,但一般情况下需要的是NES和p值,能否适当予以调整,改成显示为NESp.adjust(个人觉得没必要显示两个p值)。 我在查看gseaplot2函数时发现定义是:

if (pvalue_table) {
        pd <- x[geneSetID, c("Description", "pvalue", "p.adjust")]
        # pd <- pd[order(pd[,1], decreasing=FALSE),]
        rownames(pd) <- pd$Description

        pd <- pd[,-1]
        pd <- round(pd, 4)

        tp <- tableGrob2(pd, p.res)

        p.res <- p.res + theme(legend.position = "none") +
            annotation_custom(tp,
                              xmin = quantile(p.res$data$x, .5),
                              xmax = quantile(p.res$data$x, .95),
                              ymin = quantile(p.res$data$runningScore, .75),
                              ymax = quantile(p.res$data$runningScore, .9))
    }

当我试图把pvalue改为NES后再跑代码时,却提示没有tableGrob2函数,这个不知如何解决,万望回复,谢谢 请问你最后找到solution了吗?我也想解决。

xlw1207 avatar Oct 18 '22 03:10 xlw1207

在gseaplot2函数中当设置pvalue_table = T时,默认显示的是pvaluep.adjust,但一般情况下需要的是NES和p值,能否适当予以调整,改成显示为NESp.adjust(个人觉得没必要显示两个p值)。 我在查看gseaplot2函数时发现定义是:

if (pvalue_table) {
        pd <- x[geneSetID, c("Description", "pvalue", "p.adjust")]
        # pd <- pd[order(pd[,1], decreasing=FALSE),]
        rownames(pd) <- pd$Description

        pd <- pd[,-1]
        pd <- round(pd, 4)

        tp <- tableGrob2(pd, p.res)

        p.res <- p.res + theme(legend.position = "none") +
            annotation_custom(tp,
                              xmin = quantile(p.res$data$x, .5),
                              xmax = quantile(p.res$data$x, .95),
                              ymin = quantile(p.res$data$runningScore, .75),
                              ymax = quantile(p.res$data$runningScore, .9))
    }

当我试图把pvalue改为NES后再跑代码时,却提示没有tableGrob2函数,这个不知如何解决,万望回复,谢谢 请问你最后找到solution了吗?我也想解决。

可以邮箱咨询我 [email protected]

swcyo avatar Oct 19 '22 04:10 swcyo