Workflow(2) Differential expression
Workflow(2) Differential expression
Preparation
1.Download R, R studio
https://cran.r-project.org/mirrors.html
https://posit.co/download/rstudio-desktop/
Codes
1.Just copy the following codes and paste it into Rstudio
建议用txt等文本文件保存最原始的以及自己修改过的各种版本,方便改进
代码中所有需要更改的地方已经用”#”标注,”#”为R语言的注释符号
It will be better to save the original version and every version that you changed by your self to improve the reuse and accuracy of the code.
The place that can be changed has been annotated by “#”.
1 | library("lattice") |
在Rstudio右侧查看A和B的数值,下面需要用到
Check the number in the right of Rstudio, it will be used later.
1 | ggplot(DataHS,aes(fold.change,t.test.p.value, color = sig))+ |
2.2 简易热图
将需要作图的数据复制粘贴出来为一个单独的txt文件,每一行为一个蛋白,每一列为一个样本,蛋白名放在最后一列
1 | data=read.table(file="proZ.txt",header=T,sep="\t") |
pheatmap功能很多,修改图片比例,注释字体,颜色,可以直接百度搜索”pheatmap参数” 学习
推荐:https://www.jianshu.com/p/31a92d6dc746