相似的基因在不同物种中,其功能往往保守的。显然,需要一个统一的术语用于描述这些跨物种的同源基因及其基因产物的功能,否则,不同的实验室对相同的基因的功能的描述不同,将极大限制学术的交流。而 Gene Ontology (GO) 项目正是为了能够使对各种数据库中基因获基因产物功能描述相一致的努力结果。一般情况下,在各种组学中,做完差异表达之后,会看这些差异表达基因参与的功能,一般我们会做一个GO注释和富集。这里我们先来了解一下GO.db这个包。因为该包是许多其他包的基础依赖包。对于了解GO有很大的帮助。

1)安装载入

-------------------------------------------

if("GO.db" %in% rownames(installed.packages()) == FALSE) {source("http://bioconductor.org/biocLite.R");biocLite("GO.db")}
suppressMessages(library(GO.db))

2)查看该包所有的对象

--------------------------------------------

ls("package:GO.db")

columns(GO.db)

"DEFINITION"  "GOID"       "ONTOLOGY"   "TERM"  

功能:可以用来进行GO的注释

GOBPANCESTOR:Annotation of GO Identifiers to their Biological Process Ancestors
GOBPCHILDREN:Annotation of GO Identifiers to their Biological Process Children
GOBPOFFSPRING: Annotation of GO Identifiers to their Biological Process Offspring
GOBPPARENTS: Annotation of GO Identifiers to their Biological Process Parents
GOCCANCESTOR: Annotation of GO Identifiers to their Cellular Component Ancestors
GOCCCHILDREN: Annotation of GO Identifiers to their Cellular Component Children
GOCCOFFSPRING: Annotation of GO Identifiers to their Cellular Component Offspring
GOCCPARENTS: Annotation of GO Identifiers to their Cellular Component Parents
GOMAPCOUNTS Number of mapped keys for the maps in package GO.db
GOMFANCESTOR: Annotation of GO identifiers to their Molecular Function Ancestors
GOMFCHILDREN: Annotation of GO Identifiers to their Molecular Function Children
GOMFOFFSPRING: Annotation of GO Identifiers to their Molecular Function Offspring
GOMFPARENTS: Annotation of GO Identifiers to their Molecular Function Parents
GOOBSOLETE: Annotation of GO identifiers by terms defined by Gene Ontology Consortium and their status are obsolete
GOSYNONYM:Map from GO synonyms to GO terms
GOTERM: Annotation of GO Identifiers to GO Terms
GO_dbconn:Collect information about the package: Annotation DB

原理:所依赖的数据库ftp://ftp.geneontology.org/pub/go/godatabase/archive/latest-lite/

3)各个对象的简单使用

-----------------------------------------------------------

3.1)GOBPANCESTOR (Annotation of GO Identifiers to all of their Biological Process Ancestors,即返回的是该GO号所有的长辈关系)

xx <- as.list(GOBPANCESTOR) # Convert the object to a list
xx <- xx[!is.na(xx)] # Remove GO IDs that do not have any ancestor
if(length(xx) > 0){
goids <- xx[1] # Get the ancestor GO IDs for the first two elents of xx
}
goids
$`GO:0000001`
[1] "GO:0006996" "GO:0007005" "GO:0008150" "GO:0009987" "GO:0016043" "GO:0048308"
[7] "GO:0048311" "GO:0051179" "GO:0051640" "GO:0051641" "GO:0051646" "GO:0071840"
[13] "all"

3.2)GOBPCHILDREN (Annotation of GO Identifiers to their Biological Process direct Children,即返回的是 嫡系儿子)

xx <- as.list(GOBPCHILDREN)
xx <- xx[!is.na(xx)] # Remove GO IDs that do not have any children
if(length(xx) > 0){
goids <- xx[[1]] # Get the parent GO IDs for the first elents of xx part_of "GO:0032042" ; is_a "GO:0033955"
GOID(GOTERM[[goids[1]]]) #"GO:0032042"
Term(GOTERM[[goids[1]]]) #"mitochondrial DNA metabolic process"
Synonym(GOTERM[[goids[1]]]) #"mitochondrial DNA metabolism" "mtDNA metabolic process" "mtDNA metabolism"
Secondary(GOTERM[[goids[1]]]) #character(0)
Definition(GOTERM[[goids[1]]]) # "The chemical reactions and pathways involving mitochondrial DNA."
Ontology(GOTERM[[goids[1]]]) #"BP"
}

3.3)GOBPOFFSPRING(Annotation of GO Identifiers to their Biological Process Offspring,子孙后裔,即相当于所有有血缘关系)


xx <- as.list(GOBPOFFSPRING)
xx <- xx[!is.na(xx)] # Remove GO IDs that do not have any offspring
if(length(xx) > 0){
goids <- xx[1] # Get the offspring GO IDs for the first of xx
}
goids
$`GO:0000002`
[1] "GO:0006264" "GO:0032042" "GO:0032043" "GO:0033955" "GO:0043504" "GO:0090296"
[7] "GO:0090297" "GO:0090298" "GO:1901858" "GO:1901859" "GO:1901860" "GO:1905951"

3.4) GOBPPARENTS(Annotation of GO Identifiers to their Biological Process direct Parents,即返回的是直接父亲)


xx <- as.list(GOBPPARENTS)
xx <- xx[!is.na(xx)] # Remove GO IDs that do not have any parent
if(length(xx) > 0){
goids <- xx[[1]] # Get the children GO IDs for the first elents of xx #is_a "GO:0048308" ,is_a "GO:0048311"
GOID(GOTERM[[goids[1]]]) # Find out the GO terms for the first parent goid #"GO:0048308"
Term(GOTERM[[goids[1]]]) #"organelle inheritance"
Synonym(GOTERM[[goids[1]]]) #character(0)
Secondary(GOTERM[[goids[1]]]) #character(0)
Definition(GOTERM[[goids[1]]]) #"The partitioning of organelles between daughter cells at cell division."
Ontology(GOTERM[[goids[1]]]) #"BP"
}

3.5)GOMAPCOUNTS (Number of mapped keys for the maps in package GO.db)

GOMAPCOUNTS

3.6)GOOBSOLETE(Annotation of GO identifiers by terms defined by Gene Ontology Consortium and their status are obsolete)

xx <- as.list(GOTERM)
if(length(xx) > 0){
GOID(xx[[1]]) # Get the TERMS for the first elent of xx "GO:0000001"
Ontology(xx[[1]]) "BP"
}

3.7)GOSYNONYM(Map from GO synonyms to GO terms)

x <- GOSYNONYM
sample(x, 1)
GOTERM[["GO:0009435"]] # GO ID "GO:0009435" has a lot of synonyms
GOID(GOSYNONYM[["GO:0006736"]]) # GO ID "GO:0006736" is a synonym of GO ID "GO:0009435"

3.8)GOTERM Annotation of GO Identifiers to GO Terms

xx <- as.list(GOTERM)
if(length(xx) > 0){
GOID(xx[[1]]) ##"GO:0000001"
Term(xx[[1]]) ##"mitochondrion inheritance"
Synonym(xx[[1]]) #"mitochondrial inheritance"
Secondary(xx[[1]]) ##character(0)
Definition(xx[[1]]) #"The distribution of mitochondria, including the mitochondrial genome, into daughter cells after mitosis or meiosis, mediated by interactions between mitochondria and the cytoskeleton.
Ontology(xx[[1]]) #"BP"
}

3.9)GO_dbconn(Collect information about the package annotation DB)

GO_dbconn()
GO_dbfile()
GO_dbInfo()

这里以BP为例,CC,MF和其它道理相同

GO.db的更多相关文章

  1. Linux平台 Oracle 10gR2(10.2.0.5)RAC安装 Part3:db安装和升级

    Linux平台 Oracle 10gR2(10.2.0.5)RAC安装 Part3:db安装和升级 环境:OEL 5.7 + Oracle 10.2.0.5 RAC 5.安装Database软件 5. ...

  2. VS15 preview 5打开文件夹自动生成slnx.VC.db SQLite库疑惑?求解答

    用VS15 preview 5打开文件夹(详情查看博客http://www.cnblogs.com/zsy/p/5962242.html中配置),文件夹下多一个slnx.VC.db文件,如下图: 本文 ...

  3. ODBC、OLE DB、 ADO的区别

    转自:http://blog.csdn.net/yinjingjing198808/article/details/7665577 一.ODBC ODBC的由来 1992年Microsoft和Syba ...

  4. Linux平台 Oracle 11gR2 RAC安装Part3:DB安装

    四.DB(Database)安装 4.1 解压DB的安装包 4.2 DB软件安装 4.3 ASMCA创建磁盘组 4.4 DBCA建库 4.5 验证crsctl的状态 Linux平台 Oracle 11 ...

  5. SSRS ----环境配置,没有 ReportServer DB 怎么办?

    今天项目进入报表开发阶段,按照习惯,打开报表管理器,发现提示下面的错误: 错误:报表服务器无法打开与报表服务器数据库的连接.所有请求和处理都要求与数据库建立连接. 这是怎么回事儿呢,经过排查,发现数据 ...

  6. mongo DB for C#

    (1)Download the MongoDB C#驱动. http://www.nuget.org/packages/mongocsharpdriver/. (2) Add Reference to ...

  7. jBPM4.4 no jBPM DB schema: no JBPM4_EXECUTION table. Run the create.jbpm.schema target first in the install tool.

    jBPM4.4 no jBPM DB schema: no JBPM4_EXECUTION table. Run the create.jbpm.schema target first in the ...

  8. oracle db link的查看创建与删除

    1.查看dblink select owner,object_name from dba_objects where object_type='DATABASE LINK'; 或者 select * ...

  9. Gc.Db之循序渐进

    距离上次写Gc.Db框架已经有一段时间了,最近默默对框架代码已经做了不少优化和功能,且已经提交至nuget,大家如果想使用此框架,可以通过nuget搜索:Gc.Db进行下载和安装包. 本篇文章主要是介 ...

  10. oracle Entity db.Database.SqlQuery ORA-01843: 无效的月份

    原因是oracle的日期格式化格式和本地语言环境的日期格式不一致导致的. 一般情景为oralce格式为英文格式 本地服务器或者开发机的环境为中文环境. 使用Dbcontext 实例一般不会有问题. 但 ...

随机推荐

  1. CMSIS DSP Lib:RFFT函数的bug

    调用arm_rfft_fast_init_f32之后,还有两个成员需要初始化: arm_rfft_fast_instance_f32::pTwiddleRFFT = twiddleCoef_rfft_ ...

  2. Hadoop专业解决方案之构建Hadoop企业级应用

    一.大数据的挑战 大数据面对挑战是你必须重新思考构建数据分析应用的方式.传统方式的应用构建是基于数据存储在不支持大数据处理的基础之上.这主要是因为一下原因: 1.传统应用的基础设施是基于传统数据库访问 ...

  3. bzoj4385 Wilcze doły

    Description 给定一个长度为n的序列,你有一次机会选中一段连续的长度不超过d的区间,将里面所有数字全部修改为0.请找到最长的一段连续区间,使得该区间内所有数字之和不超过p. Input 第一 ...

  4. java操作Excel之POI(4)利用POI实现数据的批量导出

    后台导出方法: /** * 后台导出方法 * 利用POI实现数据的批量导出 */ public String export() throws Exception{ Connection con = n ...

  5. jenkins的war包下载地址

    https://jenkins.io/doc/book/installing/

  6. Vmware 安装CentOS 6.5

    转自:http://www.centoscn.com/image-text/install/2014/1209/4281.html 其实通过VM安装虚拟机还是蛮简单的,只不过有个别选项可能导致大家安装 ...

  7. [UE4]解析json数据

    正常的json对象是可以使用单引号的,但是在UE4中的json解析,不能如下使用单引号: {‘name’:'张三'} 而是要使用双引号写成: {"name":"张三&qu ...

  8. eterm和easyfare的官网地址

    里面有eterm下载和eterm文档资料 运价软件easyfare和easyfare的文档. https://www.eterm.com.cn/caci/eterm/index-cn.jsp http ...

  9. VS2013下.Net Framework4配置FineUI4.14

    配置步骤: 工具箱:空白处右键--选项卡--浏览,选择FineUI.dll配置web.config,管道模式设置为:传统 配置web.config 在form表单下添加: <f:PageMana ...

  10. Python的collections模块中namedtuple结构使用示例

      namedtuple顾名思义,就是名字+元组的数据结构,下面就来看一下Python的collections模块中namedtuple结构使用示例 namedtuple 就是命名的 tuple,比较 ...