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 ...
随机推荐
- runtime 知识点
demo https://github.com/ZOYOOPlus/runtime2 // // ViewController.m // runtime // Copyright © 2017年 ...
- ZooKeeper 学习资料积累
跟着实例学习ZooKeeper的用法: 临时节点 跟着实例学习ZooKeeper的用法: 缓存 跟着实例学习ZooKeeper的用法: 队列 跟着实例学习ZooKeeper的用法: Barrier 跟 ...
- 文本数据预处理:sklearn 中 CountVectorizer、TfidfTransformer 和 TfidfVectorizer
文本数据预处理的第一步通常是进行分词,分词后会进行向量化的操作.在介绍向量化之前,我们先来了解下词袋模型. 1.词袋模型(Bag of words,简称 BoW ) 词袋模型假设我们不考虑文本中词与词 ...
- Git详解之九 Git内部原理
以下内容转载自:http://www.open-open.com/lib/view/open1328070620202.html Git 内部原理 不管你是从前面的章节直接跳到了本章,还是读完了其余各 ...
- laravel 中禁用掉注册功能
想让 laravel 做单用户登录,禁止掉注册功能 在 RegisterController 添加以下方法 public function showRegistrationForm() { retur ...
- 学校项目过程中知识点 Java 2015/9/15 晚
##命令行运行Java程序1.文件Java的源代码存放在扩展名为“.java”的文件中:Java源文件编译后,得到“.class”的文件2.方法命令行下编译java源代码的方法:javac 文件名. ...
- table中文字过长使用省略号
1.设置table固定布局,否则自适应布局会不受控制 table{ table-layout: fixed; } 2.设定td宽度占比 <table> <col width=&quo ...
- new Date()相关获取当月天数和当月第一天
var myDate = new Date(); //获取本月第一天周几 var monthFirst = new Date(myDate.getFullYear(), parseInt(myDat ...
- iOS保存数据的4种方式
在iOS开发过程中,不管是做什么应用,都会碰到数据保存的问题.将数据保存到本地,能够让程序的运行更加流畅,不会出现让人厌恶的菊花形状,使得用户体验更好.下面介绍一下数据保存的方式: 1.NSKeyed ...
- PHP 生成类似 SqlServer NEWID() 全局唯一标识符
最近在对接SqlServer中对方有一个字段要求 SqlServer 中 有一个 NEWID() 就是生成36位的 唯一标识符 -> 8CBD3198-297D-4037-A859-B27BB ...