相似的基因在不同物种中,其功能往往保守的。显然,需要一个统一的术语用于描述这些跨物种的同源基因及其基因产物的功能,否则,不同的实验室对相同的基因的功能的描述不同,将极大限制学术的交流。而 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. JQuery 实现 Tab 切换 index

    $(function(){ var h_new=$('.new h4 a'); var new_dl=$('.new dl'); new_dl.first().show(); h_new.mousee ...

  2. DDA画线算法

    #include<stdio.h> #include"graphics.h" #include<math.h> #include<stdlib.h&g ...

  3. 用HTML5播放IPCamera视频

    HTML5增加了vedio标签,能直接播放视频,但是播放的格式是有限的. 这里将IPCamera的视频转换OGG格式,再通过HTML5网页播放,播放还是很清晰的.IPCamera要支持RTSP等视频流 ...

  4. 第10章 线程控制(5)_多线程下的fork

    6. 线程和fork 6.1 多线程下的fork (1)历史包袱 ①fork与多线程的协作性很差,这是POSIX系统操作系统的历史包袱. ②长期以来程序都是单线程的,fork运行正常,但引入线程这后, ...

  5. Spark JDBC入门测试

    spark jdbc分支源码下载地址 https://github.com/apache/spark/tree/branch-1.0-jdbc 编译spark jdbc  ./make-distrib ...

  6. MIT提出精细到头发丝的语义分割技术,打造效果惊艳的特效电影

    来自 MIT CSAIL 的研究人员开发了一种精细程度远超传统语义分割方法的「语义软分割」技术,连头发都能清晰地在分割掩码中呈现.在对比实验中,他们的结果远远优于 PSPNet.Mask R-CNN. ...

  7. BAT脚本编写教程(比较易懂和全面)

    这篇文章主要介绍了BAT脚本编写教程,比较易懂和全面.适合有一定编程基础的人   作者不详.敬意! echo.@.call.pause.rem(小技巧:用::代替rem)是批处理文件最常用的几个命令, ...

  8. openssl - cookbook

    1.openssl 2.Testing 3.Best Practices last 1.openssl 1.1.Key and Cerificate Management Run a web serv ...

  9. cplex-Java-样例代码解析

    import ilog.cplex.IloCplex; import ilog.concert.*; /** * * * * 最大化 x1 + 2x2 + 3x3</br> * 约束 &l ...

  10. servlet练习1

    1. 编写一个Servlet,当用户请求该Servlet时,显示用户于几点几分从哪个IP(Internet Protocol)地址连线至服务器,以及发出的查询字符串(Query String).查询一 ...