【发布时间】:2021-04-17 07:12:49
【问题描述】:
这是我的示例数据
a <- dput(head(df))
structure(list(Term = c("Reactome Gene Sets", "GO Biological Processes",
"GO Biological Processes", "GO Biological Processes", "GO Biological Processes",
"GO Biological Processes"), Pathway = c("R-MMU-191273", "GO:0034341",
"GO:0050900", "GO:0046942", "GO:0001817", "GO:0048871"), VVV = c("Cholesterol biosynthesis",
"response to interferon-gamma", "leukocyte migration", "carboxylic acid transport",
"regulation of cytokine production", "multicellular organismal homeostasis"
), p_value = c(-11.6414922875, -9.3148301923, -6.2150336681,
-5.9190690396, -5.8467499202, -5.767770517)), row.names = c(NA,
-6L), class = c("tbl_df", "tbl", "data.frame"))
我在这里尝试显示路径及其各自的 pvalue
我的代码
ggplot(df, aes(x=Term,y=p_value)) +
geom_point(aes(size=abs(p_value))) +
#geom_text(data=df,label=df$Pathway) +
geom_label_repel(aes(label=Pathway), size=3)+
#scale_color_gradientn(colours = rainbow(5)) +
labs(
x='-log10(pvalue)', y=NULL,
color='p_value',size='pvalue'
) +
theme(
axis.title = element_text(face='bold'),
axis.text = element_text(face='bold')
)
有没有办法让我也可以将 Reactome 基因设置在与 GO 生物过程相同的轴或线上。我的想法是在一行中显示所有这些,显着的 pvalue 显示更大的气泡。
任何建议或帮助将不胜感激。
【问题讨论】: