我正在尝试使用LastDataMessageMessageGUID
在地块上绘制水平置信区间。这是我正在使用的数据框的一些相关列的ggplot2
。我需要在每个head()
处绘制点,以及从tbl$logFC
到tbl$CI_L
的水平连续间隔。
tbl$CI_R
到目前为止,这是我的代码:
> head(tbl[,c('logFC', 'CI_L', 'CI_R', "adj_P_Value","gene",'Group1','Group2', 'Study_ID')])
logFC CI_L CI_R adj_P_Value gene Group1 Group2 Study_ID
1 -0.09017596 -0.43955752 0.25920561 1 CD244 Male Female GSE2461
2 0.08704844 -0.26134341 0.43544028 1 CD244 ulcerative colitis irritable bowel syndrome GSE2461
3 -0.03501474 -0.12677636 0.05674688 1 CD244 nonlesional skin lesional skin GSE27887
4 0.01096914 -0.08064105 0.10257932 1 CD244 pretreatment posttreatment GSE27887
5 -0.03707265 -0.12407201 0.04992672 1 CD244 Infliximab Before treatment GSE42296
6 0.07644834 -0.02849309 0.18138977 1 CD244 Responder Nonresponder GSE42296
一直运行到最后一行,我不知道如何指定p <- ggplot(data = tbl) +
geom_point(aes(x = logFC, y = paste(Study_ID,"\n",Group2," \U2192 ",Group1,sep = ""))) +
geom_vline(xintercept = log(0.5,2)) +
geom_vline(xintercept = log(2/3,2)) +
geom_vline(xintercept = log(1.5,2)) +
geom_vline(xintercept = log(2,2)) +
geom_hline(yintercept = hLines) +
labs(title = tbl$gene, y = "Contrasts", x = bquote(~Log[2]~'FC'))
#geom_errorbarh(aes(y = ???, x = logFC, xmin = logFC - CI_L, xmax = logFC + CI_R))
值。我尝试过做同样的y
我在开始时做的那些似乎不起作用,我尝试过做paste()
这也行不通。有什么建议?