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 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132
|
\name{seqlevelsStyle}
\Rdversion{1.1}
\alias{seqlevelsStyle}
\alias{seqlevelsStyle,EnsDb-method}
\alias{seqlevelsStyle<-}
\alias{seqlevelsStyle<-,EnsDb-method}
\alias{supportedSeqlevelsStyles}
\alias{supportedSeqlevelsStyles,EnsDb-method}
\title{Support for other than Ensembl seqlevel style}
\description{
The methods and functions on this help page allow to integrate
\code{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{
\S4method{seqlevelsStyle}{EnsDb}(x)
\S4method{seqlevelsStyle}{EnsDb}(x) <- value
\S4method{supportedSeqlevelsStyles}{EnsDb}(x)
}
\arguments{
(In alphabetic order)
\item{value}{
For \code{seqlevelsStyle<-}: a character string specifying the
seqlevels style that should be set. Use the
\code{supportedSeqlevelsStyle} to list all available and supported
seqlevel styles.
}
\item{x}{
An \code{EnsDb} instance.
}
}
\section{Methods and Functions}{
\describe{
\item{seqlevelsStyle}{
Get the style of the seqlevels in which results returned from the
\code{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.
}
\item{seqlevelsStyle<-}{
Change the style of the seqlevels in which results returned from
the \code{EnsDb} object are encoded. Changing the seqlevels helps
integrating annotations from \code{EnsDb} objects e.g. with
annotations from packages that base on UCSC annotations.
}
\item{supportedSeqlevelsStyles}{
Lists all seqlevel styles for which mappings between seqlevel
styles are available in the \code{GenomeInfoDb} package.
The method returns a character vector with supported seqlevel
styles for the organism of the \code{EnsDb} object.
}
}
}
\note{
The mapping between different seqname styles is performed based on
data provided by the \code{GenomeInfoDb} package. Note that in most
instances no mapping is provided for seqnames other than for primary
chromosomes. By default functions from the \code{ensembldb} package
return the \emph{original} seqname is in such cases. This behaviour
can be changed with the \code{ensembldb.seqnameNotFound} global
option. For the special keyword \code{"ORIGINAL"} (the default), the
original seqnames are returned, for \code{"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
(e.g. setting \code{options(ensembldb.seqnameNotFound=NA)} returns an
\code{NA} if the seqname is not mappable).
}
\value{
For \code{seqlevelsStyle}: see method description above.
For \code{supportedSeqlevelsStyles}: see method description above.
}
\author{
Johannes Rainer
}
\seealso{
\code{\linkS4class{EnsDb}}
\code{\link{transcripts}}
}
\examples{
library(EnsDb.Hsapiens.v86)
edb <- EnsDb.Hsapiens.v86
## 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")
}
\keyword{classes}
|