Case Study. GO Enrichment

Case Study. GO Enrichment

  1. 安装包的时候出现的报错
install.packages(Needed, repos = 'https://mirrors.tuna.tsinghua.edu.cn/CRAN')

在这里插入图片描述解决方案:番蔷
参考博客

  1. 使用如下代码安装Bioconductor来源的package时没有反应
source("https://bioconductor.org/biocLite.R")

参考博客

R语言一次加载多个包
加载多个包时,笨重的写法如下:

 library(tidyverse)
library(ggthemes)
library(lubridate)

简洁的写法如下:

install.packages("pacman") # pacman包如果已经安装则不需要这句
pacman::p_load(tidyverse, ggthemes, lubridate) #如果其中有包未安装,则该条命令会安装并加载它
  1. GO富集时候的背景基因?

结果保存为tsv格式:

 write.table (ego_ALL, file ="C:/Users/hp/Desktop/ego_ALL.tsv", sep ="\t", row.names =TRUE, col.names =TRUE, quote =TRUE)

参考资料:
R语言-基因功能富集分析
GO和Pathway富集分析的背景基因集
GO富集分析
GO富集分析示例

画图参考:click here
如何手动做GO分析(包含p值,p.adj的计算)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Enrichplot 包是一个用于可视化基因本体(GO)富集分析结果的 R 语言包。以下是五个案例研究及其代码和步骤: 1. Case 1: GO enrichment analysis of differentially expressed genes (DEGs) in breast cancer Code: ``` library(enrichplot) library(org.Hs.eg.db) library(clusterProfiler) # Load DEGs data data <- read.csv("breast_cancer_DEGs.csv") # Perform GO enrichment analysis ego <- enrichGO(data = data$Symbol, OrgDb = org.Hs.eg.db, ont = "BP", pvalueCutoff = .05, qvalueCutoff = .05) # Plot the results barplot(ego, showCategory = 10) ``` 2. Case 2: GO enrichment analysis of DEGs in liver cancer Code: ``` library(enrichplot) library(org.Hs.eg.db) library(clusterProfiler) # Load DEGs data data <- read.csv("liver_cancer_DEGs.csv") # Perform GO enrichment analysis ego <- enrichGO(data = data$Symbol, OrgDb = org.Hs.eg.db, ont = "MF", pvalueCutoff = .05, qvalueCutoff = .05) # Plot the results dotplot(ego, showCategory = 10) ``` 3. Case 3: GO enrichment analysis of DEGs in lung cancer Code: ``` library(enrichplot) library(org.Hs.eg.db) library(clusterProfiler) # Load DEGs data data <- read.csv("lung_cancer_DEGs.csv") # Perform GO enrichment analysis ego <- enrichGO(data = data$Symbol, OrgDb = org.Hs.eg.db, ont = "CC", pvalueCutoff = .05, qvalueCutoff = .05) # Plot the results cnetplot(ego, showCategory = 10) ``` 4. Case 4: GO enrichment analysis of DEGs in prostate cancer Code: ``` library(enrichplot) library(org.Hs.eg.db) library(clusterProfiler) # Load DEGs data data <- read.csv("prostate_cancer_DEGs.csv") # Perform GO enrichment analysis ego <- enrichGO(data = data$Symbol, OrgDb = org.Hs.eg.db, ont = "BP", pvalueCutoff = .05, qvalueCutoff = .05) # Plot the results vennpie(ego, showCategory = 10) ``` 5. Case 5: GO enrichment analysis of DEGs in colon cancer Code: ``` library(enrichplot) library(org.Hs.eg.db) library(clusterProfiler) # Load DEGs data data <- read.csv("colon_cancer_DEGs.csv") # Perform GO enrichment analysis ego <- enrichGO(data = data$Symbol, OrgDb = org.Hs.eg.db, ont = "MF", pvalueCutoff = .05, qvalueCutoff = .05) # Plot the results enrichMap(ego, showCategory = 10) ```
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值