Description Usage Arguments Value Author(s) See Also Examples
View source: R/transcriptToX.R
Converts CDS-relative coordinates to positions within the transcript, i.e. relative to the start of the transcript and hence including its 5' UTR.
1 | cdsToTranscript(x, db, id = "name")
|
x |
|
db |
|
id |
|
IRanges
with the same length (and order) than the input IRanges
x
. Each element in IRanges
provides the coordinates within the
transcripts CDS. The transcript-relative coordinates are provided
as metadata columns.
IRanges
with a start coordinate of -1
is returned for transcripts
that are not known in the database, non-coding transcripts or if the
provided start and/or end coordinates are not within the coding region.
Johannes Rainer
Other coordinate mapping functions:
genomeToProtein()
,
genomeToTranscript()
,
proteinToGenome()
,
proteinToTranscript()
,
transcriptToCds()
,
transcriptToGenome()
,
transcriptToProtein()
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | library(EnsDb.Hsapiens.v86)
## Defining transcript-relative coordinates for 4 transcripts of the gene
## BCL2
txcoords <- IRanges(start = c(4, 3, 143, 147), width = 1,
names = c("ENST00000398117", "ENST00000333681",
"ENST00000590515", "ENST00000589955"))
cdsToTranscript(txcoords, EnsDb.Hsapiens.v86)
## Next we map the coordinate for variants within the gene PKP2 to the
## genome. The variants is PKP2 c.1643DelG and the provided
## position is thus relative to the CDS. We have to convert the
## position first to transcript-relative coordinates.
pkp2 <- IRanges(start = 1643, width = 1, name = "ENST00000070846")
## Map the coordinates by first converting the CDS- to transcript-relative
## coordinates
transcriptToGenome(cdsToTranscript(pkp2, EnsDb.Hsapiens.v86),
EnsDb.Hsapiens.v86)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.