Description Usage Arguments Value Objects from the Class Slots Methods and Functions Author(s) See Also Examples
Get some basic information from an Ensembl based annotation package
generated with makeEnsembldbPackage
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 | ## S4 method for signature 'EnsDb'
buildQuery(x, columns=c("gene_id", "gene_biotype",
"gene_name"), filter=list(), order.by,
order.type="asc", skip.order.check=FALSE)
## S4 method for signature 'EnsDb'
dbconn(x)
EnsDb(x)
## S4 method for signature 'EnsDb'
ensemblVersion(x)
## S4 method for signature 'EnsDb'
lengthOf(x, of="gene", filter=list())
## 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'
seqinfo(x)
|
(in alphabetic order)
... |
Additional arguments. Not used. |
columns |
Columns (attributes) to be retrieved from the database tables. Use the
|
filter |
list of |
object |
For |
of |
for |
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
( |
skip.keys |
for |
skip.order.check |
if paramter |
table |
For |
x |
For For |
buildQuery
A character string with the SQL query.
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.
seqinfo
A Seqinfo
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).
ensdb
:Object of class "DBIConnection"
: the
connection to the database.
tables
: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.
Helper function building the SQL query to be used to retrieve the wanted information. Usually there is no need to call this method.
Returns the connection to the internal SQL database.
Returns the Ensembl version on which the package was built.
Retrieve the length of genes or transcripts from the database. The length is the sum of the lengths of all exons of a transcript or a gene. In the latter case the exons are first reduced so that the length corresponds to the part of the genomic sequence covered by the exons.
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"
).
Returns the sequence/chromosome information from the database.
Displays some informations from the database.
Johannes Rainer
makeEnsembldbPackage
, BasicFilter
,
exonsBy
, genes
,
transcripts
,
makeEnsemblSQLiteFromTables
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 | 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)
###### 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")))
##### lengthOf
##
## length of a specific gene.
lengthOf(EnsDb.Hsapiens.v75,
filter=list(GeneidFilter("ENSG00000000003")))
## length of a transcript
lengthOf(EnsDb.Hsapiens.v75, of="tx",
filter=list(TxidFilter("ENST00000494424")))
## average length of all protein coding genes encoded on chromosomes X
## and Y
mean(lengthOf(EnsDb.Hsapiens.v75, of="gene",
filter=list(GenebiotypeFilter("protein_coding"),
SeqnameFilter(c("X", "Y")))))
## average length of all snoRNAs
mean(lengthOf(EnsDb.Hsapiens.v75, of="gene",
filter=list(GenebiotypeFilter("snoRNA"),
SeqnameFilter(c("X", "Y")))))
## list all available gene biotypes from the database:
listGenebiotypes(EnsDb.Hsapiens.v75)
## list all available transcript biotypes:
listTxbiotypes(EnsDb.Hsapiens.v75)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.