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 ...
随机推荐
- 一个导出redis有序集合sorted-sets的shell脚本
通过keys匹配需要导出的有序集合名称,这些集合命名格式为:*_010_09/Dec/2015 依次通过zscan导出有序集合中的数据,并分别保存 #/bin/shzset_pattern=”*_01 ...
- html 刷新 按钮 代码
<input type=button value=刷新 onclick="history.go(0)"> <input type=button value=刷新 ...
- 日志组件logback的介绍及配置使用方法(一)
一.logback的介绍 Logback是由log4j创始人设计的又一个开源日志组件.logback当前分成三个模块:logback-core,logback- classic和logback-acc ...
- 实现一个web服务器, 支持php
暂时还很不完善, 不过框架已经写出来了. https://github.com/tw1996/studyHttpd/
- MAMP环境配置
命令行: 开启apache服务:sudo apachectl start 停止apache服务:sudo apachectl stop 重启服务:sudo apachectl restart 查看版本 ...
- 控制已经打开的Excel
using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; usin ...
- 小波分解和合成的simulink仿真
采用5-3提升小波的方法 小波分解 数据拆分 预测 更新 数据输出使能电路 电路共有两个输入三个输出,in1是数据输入,in2是输入数据有效信号,out1是更新后的低频信号,out2是预测的高频信号, ...
- CSU1612Destroy Tunnels(强连通)传递闭包
Destroy Tunnels 原来早忘记了离散里含有这么一个叫传递闭包的东西 矩阵A的闭包B = A U A^2 U A^3 U ... 所以这里直接如果A[i][j]!= 0,建边i->j跑 ...
- nginx grpc 试用
1. 编译 wget https://nginx.org/download/nginx-1.13.10.tar.gz tar xvf nginx-1.13.10.tar.gz cd nginx-1.1 ...
- 利用mysqldump备份mysql
mysqldump备份机制:通过给定的参数信息和系统表数据,来一张表一张表地获取数据并生成insert语句插入备份文件中,这样由于时间点不一致,就会导致数据不一致,然而对于一个要求强一致性的系统来说, ...