createSimpleBimap(AnnotationDbi)
createSimpleBimap()所属R语言包:AnnotationDbi
Creates a simple Bimap from a SQLite database in an situation that
创建一个情况,从简单bimap的SQLite数据库,
译者:生物统计家园网 机器人LoveR
描述----------Description----------
This function allows users to easily make a simple Bimap object for extra tables etc that they may wish to add to their annotation packages. For most Bimaps, their definition is stored inside of AnnotationDbi. The addition of this function is to help ensure that this does not become a limitation, by allowing simple extra Bimaps to easily be defined external to AnnotationDbi. Usually, this will be done in the zzz.R source file of a package so that these extra mappings can be seemlessly integrated with the rest of the package. For now, this function assumes that users will want to use data from just one table.
此功能允许用户轻松地做一个额外的表等简单的bimap的对象,他们可能希望加入到他们的注解包。其定义对于大多数Bimaps,存储内AnnotationDbi。除了这个功能是帮助保证,这不会成为限制,允许简单的额外Bimaps很容易被定义的外部向AnnotationDbi。通常情况下,这将在包zzz.R源文件,使这些额外的映射可以被无缝集成包的其余部分。现在,这个功能假设用户将要使用的数据从一个表。
用法----------Usage----------
createSimpleBimap(tablename, Lcolname, Rcolname, datacache, objName,
objTarget)
参数----------Arguments----------
参数:tablename
The name of the database table to grab the mapping information from.
抢映射信息从数据库表的名称。
参数:Lcolname
The field name from the database table. These will become the Lkeys in the final mapping.
从数据库表中的字段的名称。这些将成为最终映射Lkeys。
参数:Rcolname
The field name from the database table. These will become the Rkeys in the final mapping.
从数据库表中的字段的名称。这些将成为最终映射Rkeys。
参数:datacache
The datacache object should already exist for every standard Annotation package. It is not exported though, so you will have to access it with ::: . It is needed to provide the connection information to the function.
每一个标准的诠释包datacache对象应该已经存在。虽然它不出口,所以你将有访问:::。这是需要提供连接信息的功能。
参数:objName
This is the name of the mapping.
这是映射的名称。
参数:objTarget
This is the name of the thing the mapping goes with. For most uses, this will mean the package name that the mapping belongs with.
这是映射去的东西的名称。对于大多数用途,这将意味着映射属于包的名称。
举例----------Examples----------
##You simply have to call this function to create a new mapping. For[#您只需调用这个函数来创建一个新的映射。为]
##example, you could have created a mapping between the gene_name and[#例如,你可以创建一个映射之间的gene_name和]
##the symbols fields from the gene_info table contained in the hgu95av2[#符号从gene_info表领域中的hgu95av2]
##package by doing this:[#这样的包:]
library(hgu95av2.db)
hgu95av2NAMESYMBOL <- createSimpleBimap("gene_info",
"gene_name",
"symbol",
hgu95av2.db:::datacache,
"NAMESYMBOL",
"hgu95av2.db")
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|