GO.db
相似的基因在不同物种中,其功能往往保守的。显然,需要一个统一的术语用于描述这些跨物种的同源基因及其基因产物的功能,否则,不同的实验室对相同的基因的功能的描述不同,将极大限制学术的交流。而 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的更多相关文章
- 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. ...
- VS15 preview 5打开文件夹自动生成slnx.VC.db SQLite库疑惑?求解答
用VS15 preview 5打开文件夹(详情查看博客http://www.cnblogs.com/zsy/p/5962242.html中配置),文件夹下多一个slnx.VC.db文件,如下图: 本文 ...
- ODBC、OLE DB、 ADO的区别
转自:http://blog.csdn.net/yinjingjing198808/article/details/7665577 一.ODBC ODBC的由来 1992年Microsoft和Syba ...
- 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 ...
- SSRS ----环境配置,没有 ReportServer DB 怎么办?
今天项目进入报表开发阶段,按照习惯,打开报表管理器,发现提示下面的错误: 错误:报表服务器无法打开与报表服务器数据库的连接.所有请求和处理都要求与数据库建立连接. 这是怎么回事儿呢,经过排查,发现数据 ...
- mongo DB for C#
(1)Download the MongoDB C#驱动. http://www.nuget.org/packages/mongocsharpdriver/. (2) Add Reference to ...
- 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 ...
- oracle db link的查看创建与删除
1.查看dblink select owner,object_name from dba_objects where object_type='DATABASE LINK'; 或者 select * ...
- Gc.Db之循序渐进
距离上次写Gc.Db框架已经有一段时间了,最近默默对框架代码已经做了不少优化和功能,且已经提交至nuget,大家如果想使用此框架,可以通过nuget搜索:Gc.Db进行下载和安装包. 本篇文章主要是介 ...
- oracle Entity db.Database.SqlQuery ORA-01843: 无效的月份
原因是oracle的日期格式化格式和本地语言环境的日期格式不一致导致的. 一般情景为oralce格式为英文格式 本地服务器或者开发机的环境为中文环境. 使用Dbcontext 实例一般不会有问题. 但 ...
随机推荐
- Django mark_safe
不用mark_safe: 用mark_safe: 用法: from django.shortcuts import render from django.utils.safestring import ...
- php对象的实现
1.对象的数据结构非常简单 typedef struct _zend_object zend_object; struct _zend_object { zend_refcounted_h gc; / ...
- Modbus tcp 格式说明 通讯机制 附C#测试工具用于学习,测试
前言: 之前的博客介绍了如何用C#来读写modbus tcp服务器的数据,文章:http://www.cnblogs.com/dathlin/p/7885368.html 当然也有如何创建一个服务器文 ...
- springMVC学习(3)-springMVC和mybatis整合
一.需求:使用springmvc和mybatis完成商品列表查询. 二.整合思路:springMVC+mybaits的系统架构: 1步):整合dao层 mybatis和spring整合,通过sprin ...
- 十二、jdk工具之jcmd介绍(堆转储、堆分析、获取系统信息、查看堆外内存)
目录 一.jdk工具之jps(JVM Process Status Tools)命令使用 二.jdk命令之javah命令(C Header and Stub File Generator) 三.jdk ...
- php实现AES/CBC/PKCS5Padding加密解密(又叫:对称加密)
今天在做一个和java程序接口的架接,java那边需要我这边(PHP)对传过去的值进行AES对称加密,接口返回的结果也是加密过的(就要用到解密),然后试了很多办法,也一一对应了AES的key密钥值,偏 ...
- spark 多语言编程
参考官方地址:https://spark.apache.org/docs/1.6.2/programming-guide.html 误解: spark多语言的支持,并不是说spark可以操作各个语言写 ...
- mysq更新(六) 单表查询 多表查询
本节重点: 单表查询 语法: 一.单表查询的语法 SELECT 字段1,字段2... FROM 表名 WHERE 条件 GROUP BY field HAVING 筛选 ORDER BY fiel ...
- collections模块---(namedtuple、deque、OrderdDict、defaultdict、Counter)和configparser模块
在内置数据类型(dict. list.set.tuple)的基础上,collections模块还提供了几个额外的数据类型:Counter. deque.defaultdict.namedtuple 和 ...
- oracle10偶然性卡住登陆
连接数据库异常:登陆数据库后以"conn /as sysdba"方式登陆正常,数据库轻载,无压力:于是检查数据库的监听器,输入"lsntctl services" ...

