ensembldb (version 1.4.6)

EnsDb-class: Basic usage of an Ensembl based annotation database

Description

Get some basic information from an Ensembl based annotation package generated with makeEnsembldbPackage.

Usage

## S3 method for class 'EnsDb':
buildQuery(x, columns=c("gene_id", "gene_biotype",
                                    "gene_name"), filter=list(), order.by,
                             order.type="asc", skip.order.check=FALSE)

## S3 method for class 'EnsDb': dbconn(x)

EnsDb(x)

## S3 method for class 'EnsDb': ensemblVersion(x)

## S3 method for class 'EnsDb': listColumns(x, table, skip.keys=TRUE, ...)

## S3 method for class 'EnsDb': listGenebiotypes(x, ...)

## S3 method for class 'EnsDb': listTxbiotypes(x, ...)

## S3 method for class 'EnsDb': listTables(x, ...)

## S3 method for class 'EnsDb': metadata(x, ...)

## S3 method for class 'EnsDb': organism(object)

## S3 method for class 'EnsDb': seqinfo(x)

## S3 method for class 'EnsDb': seqlevels(x)

## S3 method for class 'EnsDb': updateEnsDb(x, ...)

Arguments

...
Additional arguments. Not used.
columns
Columns (attributes) to be retrieved from the database tables. Use the listColumns or listTables method for a list of supported columns.
filter
list of BasicFilter instance(s) to select specific entries from the database (see examples below).
object
For organism: an EnsDb instance.
order.by
name of one of the columns above on which the results should be sorted.
order.type
if the results should be ordered ascending (asc, default) or descending (desc).
skip.keys
for listColumns: whether primary and foreign keys (not being e.g. "gene_id" or alike) should be returned or not. By default these will not be returned.
skip.order.check
if paramter order.by should be checked for allowed column names. If TRUE the function checks if the provided order criteria orders on columns present in the database tables.
table
For listColumns: optionally specify the table name for which the columns should be returned.
x
For EnsDb: the file name of the SQLite database.

Value

  • [object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]

Objects from the Class

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).

See Also

makeEnsembldbPackage, BasicFilter, exonsBy, genes, transcripts, makeEnsemblSQLiteFromTables

Examples

Run this code
library(EnsDb.Hsapiens.v75)

## Display some information:
EnsDb.Hsapiens.v75

## Show the tables along with its columns
listTables(EnsDb.Hsapiens.v75)

## For what species is this database?
organism(EnsDb.Hsapiens.v75)

## What Ensembl version if the database based on?
ensemblVersion(EnsDb.Hsapiens.v75)

## Get some more information from the database
metadata(EnsDb.Hsapiens.v75)

## Get all the sequence names.
seqlevels(EnsDb.Hsapiens.v75)

######    buildQuery
##
## Join tables gene and transcript and return gene_id and tx_id
buildQuery(EnsDb.Hsapiens.v75, columns=c("gene_id", "tx_id"))


## Get all exon_ids and transcript ids of genes encoded on chromosome Y.
buildQuery(EnsDb.Hsapiens.v75, columns=c("exon_id", "tx_id"),
           filter=list(SeqnameFilter( "Y")))

## List all available gene biotypes from the database:
listGenebiotypes(EnsDb.Hsapiens.v75)

## List all available transcript biotypes:
listTxbiotypes(EnsDb.Hsapiens.v75)

## Update the EnsDb; this is in most instances not necessary at all.
updateEnsDb(EnsDb.Hsapiens.v75)

Run the code above in your browser using DataLab