跟着 Molecular Cell 绘制折线图+热图
测试开头




测试结尾
点击上方关注“公众号”

1引言
今天跟着 Molecular Cell 绘制学习如何绘制一个 折线图+热图 的组合图形。
文章标题:
mTORC1 stimulates cell growth through SAM synthesis and m6A mRNA-dependent control of protein synthesis

主图里的组合热图:

复现结果:

2测试数据
文章附件里有绘图所需要的数据,我们去下载整理一下。
3绘图
查看测试数据:
# 加载R包
library(ggplot2)
library(reshape2)
library(tidyverse)
library(ggh4x)
# 导入测试数据
raw <- read.delim('test_data.txt',header = T) %>% arrange(desc(pvalue))
# 查看
head(raw,3)
Metabolites Veh1 Veh2 Veh3 Insulin1 Insulin2 Insulin3
1 uracil 288799.57 324349.02 413702.8 575708.8 886342.9 548196.6
2 hydroxyphenyllactic acid 1200616.74 801780.31 1131445.0 1516356.8 1567751.9 1321909.2
3 phosphoenolpyruvate 87499.14 79791.67 106391.7 279280.1 565405.0 812425.1
Mean.Veh Mean.Insulin Log2..Ins.Veh. pvalue
1 342283.79 670082.8 0.9691464 0.04592476
2 1044614.02 1468672.6 0.4915429 0.04221402
3 91227.49 552370.1 2.5980947 0.04035194
折线图
先绘制左边的折线图:
请关注“恒诺新知”微信公众号,感谢“R语言“,”数据那些事儿“,”老俊俊的生信笔记“,”冷🈚️思“,“珞珈R”,“生信星球”的支持!