R语言GSEA分析(一)
安装并导入要用到的R包
BiocManager::install("clusterProfiler") #感谢Y叔的clusterprofiler包
BiocManager::install("enrichplot") #画图需要
BiocManager::install("org.Hs.eg.db") #基因注释需要
library(org.Hs.eg.db)
library(clusterProfiler)
library(enrichplot)
导入数据
setwd("D:/Note/MZBJ/Q_A") #设置文件所在位置
df = read.table("gene_diff.txt",header = T) #读入txt
# df = read.csv("gene_diff.csv",header = T) #读入csv
head(df)#查看前面几行
dim(df)#数据总共几行几列
> head(df)#查看前面几行
SYMBOL logFC
1 CD74 41.99218
2 MAB21L3 35.00852
3 KCNQ1OT1 22.78417
4 RP3-323A16.1 22.25173
5 LINC00504 16.82801
6 MALAT1 16.64222
> dim(df)#数据总共几行几列
[1] 5057 2
赞 (0)
