goseq是一个R包,用于寻找GO terms,即基因富集分析。

GO terms是标准化描述基因或基因产物的词汇,包括三方面,cellular component,molecular funciton,biological process。

每个GO term都有一个GO ID,比如 GO:006260,每个GO term背后都有一系列的相关基因。

GO分析的目的:在差异性基因分析后,我们可能得到很多差异基因,这些基因里的一部分可能跟某个生物过程相关,或几个生物过程相关。经过GO分析后,我们就能将差异性基因具体的生物功能展示出来,为下一步研究做准备。

GOseq需要输入的文件:

1.所有有count的genes。

2.差异性表达的genes。

3.genome信息,基因长度信息。#对于许多模式基因组来说,这些内容都被做成了独立的R包。

4.GO terms包。

>source("http://bioconductor.org/biocLite.R")
>biocLite("goseq")
>biocLite("geneLenDataBase")#genome,genes信息
>biocLite("org.Dm.eg.db")#果蝇的GO categories, (org,<Genome>,<GeneID>,db) >library("goseq")
>library("geneLenDataBase")
>library("org.Dm.eg.db") >DEG<-read.table("DEG",header=FALSE)
>ALL<-read.table("ALL",header=FALSE)
#DEG:差异性基因表 ALL:所有基因表(数据框格式) >DEG.vector<-c(t(DEG))
>ALL.vector<-c(t(ALL))
#把数据格式转化为vector,便于下步操作 >gene.vector=as.integer(ALL.vector%in%DEG.vector)
#生成二进制的gene vector(1代表差异性基因,0代表非差异性基因)
>names(gene.vector)<-ALL.vector >pwf=nullp(gene.vector,"dm3","ensGene")
#生成probability weighting function."dm3"是基因组,"ensgGene"是基因IDs。 >GO.wall=goseq(pwf,"dm3","ensGene")
#生成GO terms ID 。这边的疑问:genes 没有mapping 到GO categories。 goseq函数有一个选项:gene2cat,如果gene2cat=NULL,则goseq会自动调用getgo函数实现mapping功能,并将输出值gene2cat。 >enriched.GO=GO.wall$category[GO.wall$over_represented_pvalue<.05]
#生成差异性 GO terms ID >library(GO.db)
>capture.output(for(go in enriched.GO[1:length(enriched.GO)]){
print(GOTERM[go])
cat("___________")
}
,file="SigGo.txt")
#生成具体的GO TERM详解

  

goseq的更多相关文章

  1. 文献导读 | Single-Cell Sequencing of iPSC-Dopamine Neurons Reconstructs Disease Progression and Identifies HDAC4 as a Regulator of Parkinson Cell Phenotypes

    文献编号:19Mar - 11 2019年04月23日三读,会其精髓: 相信这种方法的话,那么它的精髓是什么,如何整合出这个core gene set. 首先要考虑样本的选择,样本里是否存在明显的分层 ...

  2. go语言项目汇总

    Horst Rutter edited this page 7 days ago · 529 revisions Indexes and search engines These sites prov ...

  3. Golang优秀开源项目汇总, 10大流行Go语言开源项目, golang 开源项目全集(golang/go/wiki/Projects), GitHub上优秀的Go开源项目

    Golang优秀开源项目汇总(持续更新...)我把这个汇总放在github上了, 后面更新也会在github上更新. https://github.com/hackstoic/golang-open- ...

随机推荐

  1. Java 学习笔记之读取jdbc.propertyes配置参数

    package test; import java.io.IOException; import java.io.InputStream; import java.util.Properties; p ...

  2. react 近期

    ECMAScript 6 入门:http://es6.ruanyifeng.com/#docs/destructuring#%E6%95%B0%E7%BB%84%E7%9A%84%E8%A7%A3%E ...

  3. SCSS详解

    SCSS入门 CSS预处理器 定义了一种新的专门的编程语言,编译后成正常的CSS文件.为CSS增加一些编程的特性,无需考虑浏览器的兼容问题,让CSS更加简洁,适应性更强,可读性更佳,更易于代码的维护等 ...

  4. std::condition_variable(3)复习

    #include <iostream> // std::cout #include <thread> // std::thread #include <mutex> ...

  5. 3 Steps(二分图)

    C - 3 Steps Time limit : 2sec / Memory limit : 256MB Score : 500 points Problem Statement Rng has a ...

  6. php5.4新特性实践

    本机安装的是wampserver2.2e-php5.4.3-httpd2.2.22-mysql5.5.24-32b.exe集成包 自带了php5.4 1. 数组写法 定义一个数组 过去: $arr = ...

  7. 【python】-- Django 分页 、cookie、Session、CSRF

    Django  分页 .cookie.Session.CSRF 一.分页 分页功能在每个网站都是必要的,下面主要介绍两种分页方式: 1.Django内置分页 from django.shortcuts ...

  8. ES6学习笔记(一)——let和const

    1.ES6学习之let.const (1).var.let.const 变(常)量声明 ES5 只有全局作用域和函数作用域,没有块级作用域,这带来很多不合理的场景. 在ES6中let就诞生了,实际上它 ...

  9. hbase shell编码显示中文

    最近测试hbase shell,碰到个中文显示编码问题,最后通过Python解决了问题,具体操作如下: hbase(main):015:0* scan 'fr_test_hbase:test_log1 ...

  10. android studio DELETE_FAILED_INTERNAL_ERROR Error while Installing APKs

    DELETE_FAILED_INTERNAL_ERROR Error while Installing APKs 参考https://stackoverflow.com/questions/38892 ...