Revigo,高大上地可视化GO富集结果

只要有规则的地方,就有不公平。

  1. 使用TBtools做GO富集,会得到以下三个文件

  1. 使用Excel打开其中一个,比如比较经常使用的Biological Process,复制p_adjust小于等于0.05的GO term对应的p_adjust值和GO号

  2. 黏贴到revigo网站,http://revigo.irb.hr/

  1. 点击START REVIGO,并等待运行结果

  2. 在结果窗口中,基于个人生物学知识,调整展示和不展示GO term信息

  1. 以上即可输出可用图片,但也可以直接下载对应的R语言代码

# A plotting R script produced by the REVIGO server at http://revigo.irb.hr/# If you found REVIGO useful in your work, please cite the following reference:# Supek F et al. "REVIGO summarizes and visualizes long lists of Gene Ontology# terms" PLoS ONE 2011. doi:10.1371/journal.pone.0021800# --------------------------------------------------------------------------# If you don't have the ggplot2 package installed, uncomment the following line:# install.packages( "ggplot2" );library( ggplot2 );# --------------------------------------------------------------------------# If you don't have the scales package installed, uncomment the following line:# install.packages( "scales" );library( scales );# --------------------------------------------------------------------------# Here is your data from REVIGO. Scroll down for plot configuration options.revigo.names <- c("term_ID","description","frequency_%","plot_X","plot_Y","plot_size","log10_p_value","uniqueness","dispensability");revigo.data <- rbind(c("GO:0006952","defense response", 0.568,-6.246,-0.606, 4.863,-4.8239,0.784,0.000),c("GO:0007389","pattern specification process", 0.147, 2.510, 6.231, 4.274,-3.2291,0.753,0.000),c("GO:0009813","flavonoid biosynthetic process", 0.016,-0.869, 0.192, 3.317,-4.0097,0.944,0.000),c("GO:0043086","negative regulation of catalytic activity", 0.400,-4.048,-6.307, 4.710,-1.4966,0.914,0.000),c("GO:0050896","response to stimulus",12.210,-3.069, 6.021, 6.195,-3.5436,0.981,0.000),c("GO:0071554","cell wall organization or biogenesis", 0.950,-3.397, 7.169, 5.086,-2.4392,0.969,0.000),c("GO:0009812","flavonoid metabolic process", 0.018,-1.358, 2.846, 3.355,-3.5229,0.971,0.026),c("GO:0045490","pectin catabolic process", 0.058, 2.542, 0.308, 3.875,-1.8497,0.944,0.028),c("GO:0071555","cell wall organization", 0.709, 5.224, 1.318, 4.959,-2.2657,0.897,0.034),c("GO:0019419","sulfate reduction", 0.041, 6.689,-0.514, 3.722,-2.5740,0.900,0.057),c("GO:0034219","carbohydrate transmembrane transport", 0.245, 1.831,-5.809, 4.497,-2.1476,0.767,0.065),c("GO:0019748","secondary metabolic process", 0.138, 0.766,-1.413, 4.247,-1.4512,0.922,0.109),c("GO:0072330","monocarboxylic acid biosynthetic process", 0.940, 6.450,-1.591, 5.081,-1.4465,0.872,0.150),c("GO:0040008","regulation of growth", 0.172,-3.857,-5.673, 4.343,-1.4374,0.926,0.212),c("GO:0009411","response to UV", 0.054,-5.490, 0.447, 3.837,-1.3321,0.828,0.291),c("GO:0006812","cation transport", 3.242, 2.882,-5.850, 5.619,-1.5714,0.829,0.303),c("GO:0009617","response to bacterium", 0.145,-5.863, 1.628, 4.271,-1.9954,0.769,0.315),c("GO:0009926","auxin polar transport", 0.005,-0.194,-5.934, 2.820,-2.0494,0.777,0.340),c("GO:0009607","response to biotic stimulus", 0.342,-6.842,-0.560, 4.643,-2.5022,0.806,0.340),c("GO:0009719","response to endogenous stimulus", 0.526,-6.370, 0.584, 4.829,-3.4868,0.800,0.354),c("GO:0010817","regulation of hormone levels", 0.161,-2.921,-5.829, 4.314,-1.8148,0.902,0.401),c("GO:0019761","glucosinolate biosynthetic process", 0.001, 6.353,-1.095, 2.093,-1.8164,0.863,0.406),c("GO:0042221","response to chemical", 3.071,-6.236,-0.067, 5.595,-4.4737,0.771,0.427),c("GO:0009628","response to abiotic stimulus", 0.571,-7.061, 0.333, 4.865,-1.5622,0.799,0.427),c("GO:0010033","response to organic substance", 0.900,-6.276, 0.979, 5.062,-4.2472,0.739,0.451),c("GO:0009605","response to external stimulus", 1.370,-6.741, 0.103, 5.245,-2.3436,0.785,0.475),c("GO:0010073","meristem maintenance", 0.006, 3.650, 5.427, 2.882,-1.9032,0.782,0.483),c("GO:0055085","transmembrane transport", 8.916, 2.473,-6.332, 6.058,-4.1952,0.830,0.489),c("GO:0045229","external encapsulating structure organization", 0.795, 1.786, 2.167, 5.009,-2.0656,0.952,0.498),c("GO:1902578","single-organism localization", 5.919, 3.065,-5.949, 5.881,-2.1126,0.801,0.525),c("GO:0042335","cuticle development", 0.012, 2.249, 5.817, 3.182,-2.8356,0.783,0.526),c("GO:0006811","ion transport", 5.344, 1.993,-6.420, 5.836,-1.5428,0.838,0.535),c("GO:0080134","regulation of response to stress", 0.337,-5.724,-1.777, 4.636,-2.2141,0.750,0.542),c("GO:0015696","ammonium transport", 0.148, 3.719,-5.195, 4.279,-1.5985,0.861,0.558),c("GO:0048364","root development", 0.029, 2.992, 5.614, 3.573,-1.6935,0.763,0.559),c("GO:0022622","root system development", 0.029, 3.011, 5.808, 3.573,-1.6935,0.771,0.559),c("GO:0006950","response to stress", 4.575,-6.453, 0.197, 5.769,-2.2626,0.763,0.562),c("GO:0048507","meristem development", 0.013, 1.901, 6.327, 3.232,-1.5983,0.814,0.567),c("GO:0009855","determination of bilateral symmetry", 0.037, 2.857, 5.904, 3.672,-2.4190,0.746,0.567),c("GO:0009684","indoleacetic acid biosynthetic process", 0.000,-0.921,-4.011, 1.716,-1.4543,0.834,0.576),c("GO:0099402","plant organ development", 0.055, 2.681, 6.220, 3.849,-1.4713,0.764,0.584),c("GO:0072488","ammonium transmembrane transport", 0.086, 3.469,-5.237, 4.045,-1.3820,0.859,0.584),c("GO:0044765","single-organism transport", 5.708, 2.272,-5.828, 5.865,-2.1999,0.753,0.599),c("GO:0009888","tissue development", 0.491, 3.129, 6.025, 4.799,-2.7375,0.783,0.605),c("GO:0009725","response to hormone", 0.335,-6.779, 1.129, 4.633,-4.3261,0.701,0.649),c("GO:0010411","xyloglucan metabolic process", 0.016, 4.155, 0.482, 3.321,-1.7273,0.892,0.675),c("GO:0009746","response to hexose", 0.031,-6.512, 2.044, 3.603,-1.7112,0.743,0.678),c("GO:0006810","transport",17.616, 2.506,-6.117, 6.354,-1.3249,0.818,0.684),c("GO:0009743","response to carbohydrate", 0.041,-6.655, 1.736, 3.726,-1.7512,0.750,0.692),c("GO:0009955","adaxial/abaxial pattern specification", 0.002, 3.028, 5.362, 2.407,-1.4499,0.777,0.695));one.data <- data.frame(revigo.data);names(one.data) <- revigo.names;one.data <- one.data [(one.data$plot_X != "null" & one.data$plot_Y != "null"), ];one.data$plot_X <- as.numeric( as.character(one.data$plot_X) );one.data$plot_Y <- as.numeric( as.character(one.data$plot_Y) );one.data$plot_size <- as.numeric( as.character(one.data$plot_size) );one.data$log10_p_value <- as.numeric( as.character(one.data$log10_p_value) );one.data$frequency <- as.numeric( as.character(one.data$frequency) );one.data$uniqueness <- as.numeric( as.character(one.data$uniqueness) );one.data$dispensability <- as.numeric( as.character(one.data$dispensability) );#head(one.data);# --------------------------------------------------------------------------# Names of the axes, sizes of the numbers and letters, names of the columns,# etc. can be changed belowp1 <- ggplot( data = one.data );p1 <- p1 + geom_point( aes( plot_X, plot_Y, colour = log10_p_value, size = plot_size), alpha = I(0.6) ) + scale_size_area();p1 <- p1 + scale_colour_gradientn( colours = c("blue", "green", "yellow", "red"), limits = c( min(one.data$log10_p_value), 0) );p1 <- p1 + geom_point( aes(plot_X, plot_Y, size = plot_size), shape = 21, fill = "transparent", colour = I (alpha ("black", 0.6) )) + scale_size_area();p1 <- p1 + scale_size( range=c(5, 30)) + theme_bw(); # + scale_fill_gradientn(colours = heat_hcl(7), limits = c(-300, 0) );ex <- one.data [ one.data$dispensability < 0.15, ]; p1 <- p1 + geom_text( data = ex, aes(plot_X, plot_Y, label = description), colour = I(alpha("black", 0.85)), size = 3 );p1 <- p1 + labs (y = "semantic space x", x = "semantic space y");p1 <- p1 + theme(legend.key = element_blank()) ;one.x_range = max(one.data$plot_X) - min(one.data$plot_X);one.y_range = max(one.data$plot_Y) - min(one.data$plot_Y);p1 <- p1 + xlim(min(one.data$plot_X)-one.x_range/10,max(one.data$plot_X)+one.x_range/10);p1 <- p1 + ylim(min(one.data$plot_Y)-one.y_range/10,max(one.data$plot_Y)+one.y_range/10);# --------------------------------------------------------------------------# Output the plot to screenp1;# Uncomment the line below to also save the plot to a file.# The file type depends on the extension (default=pdf).# ggsave("C:/Users/path_to_your_file/revigo-plot.pdf");

  1. 打开R,并直接运行脚本,即可输出对应的R语言图

  2. 修改其中着色代码,生成好看的图片

  3. 使用AI或者coredraw等工具,打标签,即可得到类似下图

(0)

相关推荐

  • GO富集分析示例

    GO是Gene Ontology的简称,是基因功能国际标准分类体系.它旨在建立一个适用于各种物种的,对基因和蛋白质功能进行限定和描述的,并能随着研究不断深入而更新的语言词汇标准.GO分为分子功能(Mo ...

  • 外语里的有些话一三四

    外语里的有些话一三四

  • 如果你觉得相关性热图不好看,或者太简陋

    前面的教程:混合到同一个10X样品里面的多个细胞系如何注释,我们提到了可以使用细胞系的表达量矩阵去跟细胞亚群表达量矩阵进行相关性计算. 就有粉丝提问,把单细胞亚群使用   AverageExpress ...

  • clusterProfiler|GSEA富集分析及可视化

    GSEA(Gene Set EnrichmentAnalysis),即基因集富集分析,无需设定阈值来区分上调下调基因,使用所有的基因进行分析. GO 和 KEGG 可参考:R|clusterProfi ...

  • Y叔的clusterProfiler承包了富集分析结果的可视化

    不管是 GO或者KEGG这样的常见数据库的注释结果,还是mesh,reactomePA, DOSE这样的略微小众的数据库资源,不管是超几何分布检验的富集还是GSEA的算法,都Y叔都有对应的可视化函数支 ...

  • 赠你一只金色的眼 - 富集分析和表达数据可视化

    之前是用自带数据出过一个教程,现在换成自己的数据,清了一下坑. 检查和安装加载包 site = 'https://mirrors.tuna.tsinghua.edu.cn/CRAN' if (!req ...

  • KEGG功能富集可视化“玩出”新花样,文章档次提高的不是一点点!

    组学分析是目前生物学研究中最重要的研究手段之一,而数据的可视化,发表文章也是大家所追求的.好的数据通过较好的方式呈现,能够让人眼前一亮,给文章增色不少.功能富集也是组学分析中经常用到的,而一般见到的都 ...

  • R可视化之美化功能富集条形图

    基因集富集分析是很常见的分析内容,可视化展示的方式也多样.本文提供两组分组间的差异表达基因集的功能富集结果的一些相对美观的可视化方式. 1 读取Seurat对象 生成差异表达基因 library(Se ...

  • 这是我看过最走心的数据可视化文章了,看完血赚!

    注:本文转载自 https://antv.alipay.com/zh-cn/vis/blog/vis-introduce.html 一.什么是数据可视化 科学可视化(Scientific Visual ...

  • 磷酸化多肽的富集原理及相关富集方法研究进展

    磷酸化多肽的富集原理及相关富集方法研究进展 由核酸经转录翻译后形成的前体蛋白质通常是没有活性的,往往需要再经过折叠.修饰等过程才能赋予蛋白质正常的活性及相应的功能.磷酸化是真核生物细胞内最普遍.最重要 ...

  • 这一刻,胡温很高大!

    5月12日,我恰在西安,这一天,早上特别的凉,从新闻上得知济南更是达到了5度的低温,我隐约有些不详,但又不知给家里人说什麽. 下午我一直躺在床上,入迷地看着东方卫视播出的<国家干部>,写得 ...

  • 1903年,山东淄博博山(今博山区)高大的城墙和壮观的永济桥

    山东博山(今淄博博山区)古称颜神,因齐地孝妇颜文姜得名.博山自古就是鲁中重镇,宋元以来,因这里的陶瓷.琉璃.煤炭产业发展迅猛,而成为了商贾云集之地 . 1903年,一支"英国官方旅行团&qu ...