View source: R/makeGRangesFromEnsembl.R
| makeGRangesFromEnsembl | R Documentation |
GRanges) from EnsemblQuickly obtain gene and transcript annotations from Ensembl using AnnotationHub and ensembldb.
makeGRangesFromEnsembl(
organism,
level = c("genes", "transcripts"),
genomeBuild = NULL,
release = NULL,
ignoreVersion = FALSE,
extraMcols = FALSE
)
makeGRangesFromEnsDb(
object,
level = c("genes", "transcripts"),
ignoreVersion = FALSE,
extraMcols = FALSE
)
organism |
|
level |
|
genomeBuild |
|
release |
|
ignoreVersion |
|
extraMcols |
|
object |
|
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.
EnsemblGenes or EnsemblTranscripts.
makeGRangesFromEnsembl(): Obtain annotations from Ensembl by
querying AnnotationHub.
makeGRangesFromEnsDb(): Use a specific EnsDb object as the
annotation source. Alternatively, can pass in an EnsDb package name as
a character(1).
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.
Updated 2025-03-24.
ensembldb::ensDbFromGff(), ensembldb::ensDbFromGtf().
## Get annotations from Ensembl via AnnotationHub query.
genes <- makeGRangesFromEnsembl(
organism = "Homo sapiens",
level = "genes"
)
summary(genes)
transcripts <- makeGRangesFromEnsembl(
organism = "Homo sapiens",
level = "transcripts"
)
summary(transcripts)
## Get annotations from specific EnsDb object or package.
## > if (goalie::isInstalled("EnsDb.Hsapiens.v75")) {
## > genes <- makeGRangesFromEnsDb(
## > object = "EnsDb.Hsapiens.v75",
## > level = "genes"
## > )
## > summary(genes)
## > }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.