ensembldb (version 1.4.6)

seqlevelsStyle: Support for other than Ensembl seqlevel style

Description

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.

Usage

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

## S3 method for class 'EnsDb': seqlevelsStyle(x) <- value

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

Arguments

value
For seqlevelsStyle<-: a character string specifying the seqlevels style that should be set. Use the supportedSeqlevelsStyle to list all available and supported seqlevel styles.
x
An EnsDb instance.

Value

  • For seqlevelsStyle: see method description above.

    For supportedSeqlevelsStyles: see method description above.

See Also

EnsDb transcripts

Examples

Run this code
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=list(SeqnameFilter("chrY"),
                                                          GenebiotypeFilter("lincRNA"))))
yTxSeqs

Run the code above in your browser using DataLab