Basic usage of an Ensembl based annotation database
The EnsDb
class provides access to an Ensembl-based annotation
package. This help page describes functions to get some basic
informations from such an object.
## S4 method for signature 'EnsDb' dbconn(x) ## S4 method for signature 'EnsDb' ensemblVersion(x) ## S4 method for signature 'EnsDb' listColumns(x, table, skip.keys=TRUE, ...) ## S4 method for signature 'EnsDb' listGenebiotypes(x, ...) ## S4 method for signature 'EnsDb' listTxbiotypes(x, ...) ## S4 method for signature 'EnsDb' listTables(x, ...) ## S4 method for signature 'EnsDb' metadata(x, ...) ## S4 method for signature 'EnsDb' organism(object) ## S4 method for signature 'EnsDb' returnFilterColumns(x) ## S4 method for signature 'EnsDb' returnFilterColumns(x) ## S4 replacement method for signature 'EnsDb' returnFilterColumns(x) <- value ## S4 method for signature 'EnsDb' seqinfo(x) ## S4 method for signature 'EnsDb' seqlevels(x) ## S4 method for signature 'EnsDb' updateEnsDb(x, ...)
(in alphabetic order)
... |
Additional arguments. Not used. |
object |
For |
skip.keys |
for |
table |
For |
value |
For |
x |
An |
connection
The SQL connection to the RSQLite database.
EnsDb
An EnsDb
instance.
lengthOf
A named integer vector with the length of the genes or transcripts.
listColumns
A character vector with the column names.
listGenebiotypes
A character vector with the biotypes of the genes in the database.
listTxbiotypes
A character vector with the biotypes of the transcripts in the database.
listTables
A list with the names corresponding to the database table names and the elements being the attribute (column) names of the table.
metadata
A data.frame
.
organism
A character string.
returnFilterColumns
A logical of length 1.
seqinfo
A Seqinfo
class.
updateEnsDb
A EnsDb
object.
A connection to the respective annotation database is created upon
loading of an annotation package created with the
makeEnsembldbPackage
function. In addition, the
EnsDb
constructor specifying the SQLite database file can be
called to generate an instance of the object (see
makeEnsemblSQLiteFromTables
for an example).
Object of class "DBIConnection"
: the
connection to the database.
Named list of database table columns with the names being the database table names. The tables are ordered by their degree, i.e. the number of other tables they can be joined with.
Internal list storing user-defined properties. Should not be directly accessed.
Returns the connection to the internal SQL database.
Returns the Ensembl version on which the package was built.
Lists all columns of all tables in the database, or, if
table
is specified, of the respective table.
Lists all gene biotypes defined in the database.
Lists all transcript biotypes defined in the database.
Returns a named list of database table columns (names of the list being the database table names).
Returns a data.frame
with the metadata information from the
database, i.e. informations about the Ensembl version or Genome
build the database was build upon.
Returns the organism name (e.g. "homo_sapiens"
).
Get or set the option which results in columns that are used for
eventually specified filters to be added as result columns. The
default value is TRUE
(i.e. filter columns are returned).
Returns the sequence/chromosome information from the database.
Returns the chromosome/sequence names that are available in the database.
Displays some informations from the database.
Updates the EnsDb
object to the most recent implementation.
While a column named "tx_name"
is listed by the
listTables
and listColumns
method, no such column is
present in the database. Transcript names returned by the methods are
actually the transcript IDs. This virtual column was only
introduced to be compliant with TxDb
objects (which provide
transcript names).
Johannes Rainer
addFilter
for globally adding filters to an EnsDb
object.
library(EnsDb.Hsapiens.v86) ## Display some information: EnsDb.Hsapiens.v86 ## Show the tables along with its columns listTables(EnsDb.Hsapiens.v86) ## For what species is this database? organism(EnsDb.Hsapiens.v86) ## What Ensembl version if the database based on? ensemblVersion(EnsDb.Hsapiens.v86) ## Get some more information from the database metadata(EnsDb.Hsapiens.v86) ## Get all the sequence names. seqlevels(EnsDb.Hsapiens.v86) ## List all available gene biotypes from the database: listGenebiotypes(EnsDb.Hsapiens.v86) ## List all available transcript biotypes: listTxbiotypes(EnsDb.Hsapiens.v86) ## Update the EnsDb; this is in most instances not necessary at all. updateEnsDb(EnsDb.Hsapiens.v86) ###### returnFilterColumns returnFilterColumns(EnsDb.Hsapiens.v86) ## Get protein coding genes on chromosome X, specifying to return ## only columns gene_name as additional column. genes(EnsDb.Hsapiens.v86, filter=list(SeqNameFilter("X"), GeneBiotypeFilter("protein_coding")), columns=c("gene_name")) ## By default we get also the gene_biotype column as the data was filtered ## on this column. ## This can be changed using the returnFilterColumns option returnFilterColumns(EnsDb.Hsapiens.v86) <- FALSE genes(EnsDb.Hsapiens.v86, filter=list(SeqNameFilter("X"), GeneBiotypeFilter("protein_coding")), columns=c("gene_name"))
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.