pvalue for go kegg enrichment
Simple, fast implementation of Fisher’s exact test. . For example, for the following table:
| o | Having the property | Not having the property |
|---|---|---|
| Selected | 12 | 5 |
| Not selected | 29 | 2 |
Perhaps we are interested in whether there is any difference of property in selected vs. non-selected groups, then we can do the Fisher’s exact test.
def fish_test(sample_hit, pop_hit, sample_count, root_count):
### sample_hit: 该样本中基因属于该term下面的个数
### pop_hit: 该物种的所有基因属于该term下面的个数
### sample_count: 样本中基因的个数
### root_count: 该物种在bp/cc/mf root 下基因的个数
sample_hit = int(sample_hit)
pop_hit = int(pop_hit)
sample_count = int(sample_count)
root_count = int(root_count)
sample_nhit = sample_count - sample_hit
pop_nhit = root_count - pop_hit
n1,n2,n3,n4 = (sample_hit, pop_hit - sample_hit,
sample_nhit, pop_nhit - sample_nhit)
p = abs(pvalue(n1,n2,n3,n4).right_tail)
return p
| Index | Pathway Name | Pathway ID | Pvalue | Pvalue_adjusted | Genes | Count | Pop Hit | List_Total | Background Genes | Class | |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | ABC transporters | hsa02010 | 2.50e-19 | 4.71e-17 | ABCA6|1.00 ABCC8|1.00 ABCG2|1.00 ABCG8|1.00 ABCB5|1.00 ABCB6|1.00 ABCC9|1.00 ABCC11|1.00 ABCA1|1.00 ABCA7|1.00 ABCA9|1.00 ABCA12|1.00 ABCB8|1.00 ABCB9|1.00 ABCG4|1.00 ABCG5|1.00 |
16 | 45 | 98 | 7057 | Environmental Information Processing | |
| 2 | Fatty acid metabolism | hsa01212 | 3.09e-11 | 2.91e-09 | ACADSB|1.00 SCD|1.00 ACOX1|1.00 ACSL3|1.00 ACSL4|1.00 ACSL1|1.00 ACSL5|1.00 ACACA|1.00 ACADL|1.00 ACADM|1.00 ACSBG1|1.00 |
11 | 48 | 98 | 7057 | Metabolism |
pvalue for go kegg enrichment的更多相关文章
- clusterProfiler包
1)enrichGO:(GO富集分析) 描述:GO Enrichment Analysis of a gene set. Given a vector of genes, this function ...
- 32、Differential Gene Expression using RNA-Seq (Workflow)
转载: https://github.com/twbattaglia/RNAseq-workflow Introduction RNAseq is becoming the one of the mo ...
- R包对植物进行GO,KEGG注释
1.安装,加载所用到到R包 用BiocManager安装,可同时加载依赖包 source("https://bioconductor.org/biocLite.R") BiocMa ...
- (转)基因芯片数据GO和KEGG功能分析
随着人类基因组计划(Human Genome Project)即全部核苷酸测序的即将完成,人类基因组研究的重心逐渐进入后基因组时代(Postgenome Era),向基因的功能及基因的多样性倾斜.通过 ...
- GSEA - Gene set enrichment analysis 基因集富集 | ORA - Over-Representation Analysis 分析原理与应用
RNA-seq是利器,大部分做实验的老板手下都有大量转录组数据,所以RNA-seq的分析需求应该是很大的(大部分的生信从业人员应该都差不多要沾边吧). 普通的转录组套路并不多,差异表达基因.富集分析. ...
- GO 和 KEGG 的区别 | GO KEGG数据库用法 | 基因集功能注释 | 代谢通路富集
一直都搞不清楚这两者的具体区别. 其实初学者搞不清楚很正常,因为它们的本质是相通的,都是对基因进行归类注释的数据库. 建议初学者自己使用一下这两个数据库,应该很快就能明白其中的区别. (抱歉之前没讲清 ...
- 手把手教你看KEGG通路图!
手把手教你看KEGG通路图! 亲爱的小伙伴们,是不是正关注代谢通路研究?或者你正面对数据,绞尽脑汁?小编当然不能让亲们这么辛苦,今天就跟大家分享KEGG代谢通路图的正确解读方法,还在迷糊中的小伙伴赶紧 ...
- DAVID 进行 GO/KEGG 功能富集分析
何为功能富集分析? 功能富集分析是将基因或者蛋白列表分成多个部分,即将一堆基因进行分类,而这里的分类标准往往是按照基因的功能来限定的.换句话说,就是把一个基因列表中,具有相似功能的基因放到一起,并和生 ...
- KEGG富集分析散点图.md
输入数据格式 pathway = read.table("kegg.result",header=T,sep="\t") pp = ggplot(pathway ...
随机推荐
- 使用Sinopia搭建私有npm仓库
使用Sinopia搭建私有npm仓库 在用npm装包的时候,每次都要下载一大堆,慢且不说,npm还老被墙,所以就想到在公司内部搭建npm仓库镜像.大概看了几个,觉得Sinopia最简单也好用,所以就使 ...
- pdf 转图片,提取图片研究心得
1.pdf 中的数据是有多种编码的,详情请看:http://www.cnblogs.com/zendu/p/7644465.html 2.我的工作场景比较特殊,pdf中全部是图片,所以pdf转图片就有 ...
- Compass入门
一.Compass是什么? 简单说,Compass是Sass的工具库(toolkit). Sass本身只是一个编译器,Compass在它的基础上,封装了一系列有用的模块和模板,补充Sass的功能. ...
- 【pandas】pandas.to_datatime()---时间格式转换
标准时间格式:2012-12-21 时间转换函数:pandas.to_datatime() # -*- coding: utf- -*- # 生成数据 import pandas as pd data ...
- 升级到XE10
下午抽空从XE7升级到XE10,用的是lsuper大侠的Dx10Update1_23.0.21418.4207,用到的控件基本装全乎了. 过程中也碰到点问题,记录下子. 1. cnPack结构匹配线与 ...
- MySQL 5.6.30 升级到5.7.10
MySQL 5.6.30 升级到5.7.10 注意,这种方式的前提是数据文件没有和软件目录在一起,如果在一起,需要停止数据库后先移动数据文件 1.解压5.7.10包到/usr/local2.停止当前的 ...
- Ubuntu12.04中Gvim无法固定到启动器的解决办法
sudo vim /usr/share/applications/gvim.desktop 修改Categories键值如下: Categories=Application;Development;
- VMWare安装Ubuntu及配置开发环境遇到的问题集
安装完Ubuntu改为中文,发现是中英文混搭的界面 sudo apt-get install $(check-language-support --language=zh_CN)更新语言包. Ecli ...
- 复选框checkbox样式修改
该方法只兼容IE9及以上 将checkbox和label关联起来, 将checkbox隐藏掉,通过点击label来点击checkbox,label的样式即可自定义. 通过checkbox:checke ...
- Python3 shutil模块
平时我们总会用到复制文件的命令,Python中自带了相应模块,那就是shutil模块,下面是shutil模块的分析及用法. 1.copyfileobj(fsrc, fdst, length=16*10 ...