基因的富集分析
来源:互联网 发布:阿儿法营编程学校 编辑:程序博客网 时间:2024/05/16 08:52
通过RNA_seq差异表达分析等获得一组基因,想要进一步了解这些基因可能参与哪些生物学过程,具有哪些功能,一般就会用到基因的富集分析了。现在小麦基因注释信息已经可以获得,目前来看包括两套。一个是TGACv1,另一个就是IWGSC1.0。需要用到一个叫“clusterProfiler”的R包。下面用到的数据集来自TGACv1。
1、安装
source("https://bioconductor.org/biocLite.R")biocLite("clusterProfiler")biocLite("topGO")install.packages("DOSE")
需要的文件有3个,格式见下图。
library("clusterProfiler")library(ggplot2)library(stringr)setwd("/Users/mashengwei/Desktop/TGACv1/WGCNA/")####cellular_component#####gene <- read.csv(gene_list.txt",header=FALSE,sep="\t")gene <- as.factor(gene$V1)term2gene <- read.csv("cellular_component_Go_term_gene.txt",header=TRUE,sep="\t")term2name <- read.csv("GO_name.txt",header=TRUE,sep="\t")x <- enricher(gene,TERM2GENE=term2gene,TERM2NAME=term2name)out_file <- paste("TSG_nearest_CG_cellular_component_enricher.out.txt",sep ="\t")write.csv(x,out_file)dotplot(x)ggsave(filename="dotplot_cellular_component.png",dpi=600)dev.off()####molecular_function#####gene <- read.csv("gene_list2.txt",header=FALSE,sep="\t")gene <- as.factor(gene$V1)term2gene <- read.csv("molecular_function_Go_term_gene.txt",header=TRUE,sep="\t")term2name <- read.csv("GO_name.txt",header=TRUE,sep="\t")x <- enricher(gene,TERM2GENE=term2gene,TERM2NAME=term2name)out_file <- paste("molecular_function_enricher.out.txt",sep ="\t")write.csv(x,out_file)dotplot(x)ggsave(filename="dotplot_molecular_function.png",dpi=600)dev.off()####biological_process#####gene <- read.csv("gene_list3.txt",header=FALSE,sep="\t")gene <- as.factor(gene$V1)term2gene <- read.csv("biological_process_Go_term_gene.txt",header=TRUE,sep="\t")term2name <- read.csv("GO_name.txt",header=TRUE,sep="\t")x <- enricher(gene,TERM2GENE=term2gene,TERM2NAME=term2name)out_file <- paste("process_enricher.out.txt",sep ="\t")write.csv(x,out_file)dotplot(x) + scale_y_discrete(labels=function(y) str_wrap(y, width=10))ggsave(filename="dotplot_biological_process.png",dpi=600)dev.off()
将GO信息换成KEGG pathway信息即可进行KEGG pathway分析。
阅读全文
1 0
- 基因的富集分析
- GSEA富集分析
- 富集分析一网打进
- 去东方,最好用的在线GO富集分析工具
- Fisher-exact test和富集分析
- 基于RNA-seq的基因表达分析
- Predict Binding Sites of Transcription Factor && 富集分析
- 基于 MaxCompute 的极速的基因测序分析
- 基因大数据分析的云计算实践
- 图形化基因分析结果
- 基因表达分析-距离矩阵
- R语言ggplot2绘图教程——Pathway富集分析气泡图
- 企业家的基因
- 合成基因的方式
- DNA 基因的匹配
- 做互联网的基因
- 做互联网的基因
- 自私的基因
- JAVA中的反射机制
- Jvm对象探秘
- 再来
- 模拟银行转账信息
- Windows中遇到不能创建 . 开头必须键入文件名
- 基因的富集分析
- OpenCV打开 内存buf中的图片
- 快速幂取模 (位优化)
- 感悟
- 二叉树--实现二叉树的前序/中序/后序非递归遍历。
- Libevent源码分析-----连接监听器evconnlistener
- Guava学习记录
- NodeVisitor
- js获取当前时间并存到数据中