The methods and functions on this help page allow to integrate
EnsDb objects and the annotations they provide with other
Bioconductor annotation packages that base on chromosome names
(seqlevels) that are different from those defined by Ensembl.
1 2 3 4 5 6 7 8
(In alphabetic order)
seqlevelsStyle: see method description above.
supportedSeqlevelsStyles: see method description above.
Get the style of the seqlevels in which results returned from the
EnsDb object are encoded. By default, and internally,
seqnames as provided by Ensembl are used.
The method returns a character string specifying the currently used seqlevelstyle.
Change the style of the seqlevels in which results returned from
EnsDb object are encoded. Changing the seqlevels helps
integrating annotations from
EnsDb objects e.g. with
annotations from packages that base on UCSC annotations.
Lists all seqlevel styles for which mappings between seqlevel
styles are available in the
The method returns a character vector with supported seqlevel
styles for the organism of the
The mapping between different seqname styles is performed based on
data provided by the
GenomeInfoDb package. Note that in most
instances no mapping is provided for seqnames other than for primary
chromosomes. By default functions from the
return the original seqname is in such cases. This behaviour
can be changed with the
option. For the special keyword
"ORIGINAL" (the default), the
original seqnames are returned, for
"MISSING" an error is
thrown if a seqname can not be mapped. In all other cases, the value
of the option is returned as seqname if no mapping is available
options(ensembldb.seqnameNotFound=NA) returns an
NA if the seqname is not mappable).
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
library(EnsDb.Hsapiens.v75) edb <- EnsDb.Hsapiens.v75 ## Get the internal, default seqlevel style. seqlevelsStyle(edb) ## Get the seqlevels from the database. seqlevels(edb) ## Get all supported mappings for the organism of the EnsDb. supportedSeqlevelsStyles(edb) ## Change the seqlevels to UCSC style. seqlevelsStyle(edb) <- "UCSC" seqlevels(edb) ## Change the option ensembldb.seqnameNotFound to return NA in case ## the seqname can not be mapped form Ensembl to UCSC. options(ensembldb.seqnameNotFound = NA) seqlevels(edb) ## Restoring the original setting. options(ensembldb.seqnameNotFound = "ORIGINAL") ## Integrate Ensembl based annotations with a BSgenome package that is based on ## UCSC style seqnames. library(BSgenome.Hsapiens.UCSC.hg19) bsg <- BSgenome.Hsapiens.UCSC.hg19 ## Get the genome version unique(genome(bsg)) unique(genome(edb)) ## Although differently named, both represent genome build GRCh37. ## Extract the full transcript sequences of all lincRNAs encoded on chromsome Y. yTxSeqs <- extractTranscriptSeqs(bsg, exonsBy(edb, "tx", filter = ~ seq_name == "chrY" & gene_biotype == "lincRNA")) yTxSeqs
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.