Description Usage Arguments Details Value Functions Broad class definitions GRCh37 (hg19) legacy annotations AnnotationHub queries Note See Also Examples
View source: R/makeGRangesFromEnsembl.R
Quickly obtain gene and transcript annotations from Ensembl using AnnotationHub and ensembldb.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
organism |
|
level |
|
genomeBuild |
|
release |
|
ignoreTxVersion |
|
Simply specify the desired organism, using the full latin name. For example,
we can obtain human annotations with Homo sapiens
. Optionally, specific
Ensembl genome builds (e.g. GRCh38
) and release versions (e.g. 87
) are
supported.
Under the hood, this function fetches annotations from AnnotationHub using the ensembldb package. AnnotationHub supports versioned Ensembl releases, back to version 87.
Genome build: use "GRCh38"
instead of "hg38"
for the genome build, since
we're querying Ensembl and not UCSC.
GRanges
.
annotable
: Legacy convenience function that calls makeGRangesFromEnsembl()
and returns
a tbl_df
(tibble) instead of GRanges
. Note that GRanges
can also be
coercing using as.data.frame()
.
For gene and transcript annotations, a broadClass
column is added, which
generalizes the gene types into a smaller number of semantically-meaningful
groups:
coding
.
noncoding
.
pseudo
.
small
.
decaying
.
ig
(immunoglobulin).
tcr
(T cell receptor).
other
.
makeGRangesFromEnsembl()
supports the legacy Homo sapiens GRCh37 (release
75) build by internally querying the EnsDb.Hsapiens.v75 package.
Alternatively, the corresponding GTF/GFF file can be loaded directly from
GENCODE or Ensembl.
Here's how to perform manual, customized AnnotationHub queries.
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 | library(AnnotationHub)
library(ensembldb)
ah <- AnnotationHub()
# Human ensembldb (EnsDb) records.
ahs <- query(
x = ah,
pattern = c(
"Homo sapiens",
"GRCh38",
"Ensembl",
"EnsDb"
)
)
mcols(ahs)
print(ahs)
# EnsDb (Ensembl GRCh38 94; 2018-10-11)
ah[["AH64923"]]
# Human UCSC TxDb records.
ahs <- query(
x = ah,
pattern = c(
"Homo sapiens",
"UCSC",
"TxDb",
"knownGene"
)
)
mcols(ahs)
print(ahs)
# TxDb (UCSC hg38 GENCODE 24; 2016-12-22)
ah[["AH52260"]]
|
Updated 2019-08-21.
1 2 3 4 5 6 7 | ## Genes
x <- makeGRangesFromEnsembl("Homo sapiens", level = "genes")
summary(x)
## Transcripts
x <- makeGRangesFromEnsembl("Homo sapiens", level = "transcripts")
summary(x)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.