LRBaseDb-class | R Documentation |
LRBaseDb
is the simple class for providing the relationship between
Entrez gene IDs and LRBase IDs. It provides the database connection and
easily accessible with columns
, keytypes
, keys
and
select
. Some users may use additional functions such as
dbconn
, dbfile
, dbschema
, dbInfo
,
species
, lrNomenclature
, lrListDatabases
,
and lrVersion
for much complex data acquisition.
columns
shows which kinds of data can be returned for the
LRBaseDb
object.
keytypes
allows the user to discover which keytypes can be
passed in to select
or keys
and the keytype
argument.
keys
returns keys for the database contained in the
LRBaseDb
object . This method is already documented in the keys
manual page but is mentioned again here because it's usage with
select
is so intimate. By default it will return the primary
keys for the database, but if used with the keytype
argument,
it will return the keys from that keytype.
select
will retrieve the data as a data.frame based on
parameters for selected keys
, columns
, and keytype
arguments.
dbconn
returns the connection with database in the package.
dbfile
returns the absolute path sqlite file is saved.
dbschema
returns the database schema.
dbInfo
returns the many meta information about the package.
species
returns the species name.
lrNomenclature
returns the scientific name.
lrListDatabases
returns the list of databases to correspond Gene ID of ligend gene and Gene ID of receptor gene.
lrVersion
returns the version of LRBaseDb.
columns(x)
keytypes(x)
keys(x, keytype, ...)
select(x, keys, columns, keytype, ...)
dbconn(x)
dbfile(x)
dbschema(x, file = "", show.indices = FALSE)
dbInfo(x)
species(object)
lrNomenclature(x)
lrListDatabases(x)
lrVersion(x)
x |
the |
object |
same as x |
keys |
the keys to select records for from the database. All possible keys are returned by using the |
columns |
the columns or kinds of things that can be retrieved from the database. As with |
keytype |
the keytype that matches the keys used. For the
|
... |
other arguments. |
file |
The |
show.indices |
The CREATE INDEX statements are not shown by default. Use |
keys
, columns
, keytypes
, dbfile
, dbInfo
, species
, and lrNomenclature
each return a character vector or possible values. select
, dbschema
, lrListDatabases
, and lrVersion
each return a data.frame. dbconn
returns database connection.
Koki Tsuyuzaki
dbConnect
# library("LRBaseDbi")
# library("AnnotationHub")
# # Data retrieval from AnnotationHub
# ah <- AnnotationHub()
# dbfile <- query(ah, c("LRBaseDb", "Sus scrofa", "v001"))[[1]]
# # Constructor
# LRBase.Ssc.eg.db <- LRBaseDbi::LRBaseDb(dbfile)
# # show
# LRBase.Ssc.eg.db
# # dbconn
# dbconn(LRBase.Ssc.eg.db)
# # dbfile
# dbfile(LRBase.Ssc.eg.db)
# # dbschema
# dbschema(LRBase.Ssc.eg.db)
# # dbInfo
# dbInfo(LRBase.Ssc.eg.db)
# # species
# species(LRBase.Ssc.eg.db)
# # lrNomenclature
# lrNomenclature(LRBase.Ssc.eg.db)
# # lrListDatabases
# lrListDatabases(LRBase.Ssc.eg.db)
# # lrVersion
# lrVersion(LRBase.Ssc.eg.db)
# # columns
# cols <- columns(LRBase.Ssc.eg.db)
# # keytypes
# kts <- keytypes(LRBase.Ssc.eg.db)
# # keys
# ks <- keys(LRBase.Ssc.eg.db, keytype="GENEID_L")[seq(10)]
# # select
# out <- select(LRBase.Ssc.eg.db,
# columns=cols,
# keys=ks,
# keytype="GENEID_L")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.