mapToTranscripts | R Documentation |
Map range coordinates between features in the transcriptome and genome (reference) space.
See mapToAlignments
in the GenomicAlignments package
for mapping coordinates between reads (local) and genome (reference)
space using a CIGAR alignment.
## S4 method for signature 'ANY,MultiDb'
mapToTranscripts(x, transcripts,
ignore.strand = TRUE,
extractor.fun = GenomicFeatures::transcripts, ...)
x |
|
transcripts |
The |
ignore.strand |
When TRUE, strand is ignored in overlap operations. |
extractor.fun |
Function to extract genomic features from a Valid
|
... |
Additional arguments passed to |
mapToTranscripts
The genomic range in x
is mapped to the local position in the
transcripts
ranges. A successful mapping occurs when x
is completely within the transcripts
range, equivalent to:
findOverlaps(..., type="within")
Transcriptome-based coordinates start counting at 1 at the beginning
of the transcripts
range and return positions where x
was aligned. The seqlevels of the return object are taken from the
transcripts
object and should be transcript names. In this
direction, mapping is attempted between all elements of x
and
all elements of transcripts
.
An object the same class as x
.
Parallel methods return an object the same shape as x
. Ranges that
cannot be mapped (out of bounds or strand mismatch) are returned as
zero-width ranges starting at 0 with a seqname of "UNMAPPED".
Non-parallel methods return an object that varies in length similar to a
Hits object. The result only contains mapped records, strand mismatch
and out of bound ranges are not returned. xHits
and
transcriptsHits
metadata columns indicate the elements of x
and transcripts
used in the mapping.
When present, names from x
are propagated to the output. When
mapping to transcript coordinates, seqlevels of the output are the names
on the transcripts
object; most often these will be transcript
names. When mapping to the genome, seqlevels of the output are the seqlevels
of transcripts
which are usually chromosome names.
V. Obenchain, M. Lawrence and H. Pagès; ported to work with OrganismDbi by Marc Carlson
mapToTranscripts.
## ---------------------------------------------------------------------
## A. Basic Use
## ---------------------------------------------------------------------
library(Homo.sapiens)
x <- GRanges("chr5",
IRanges(c(173315331,174151575), width=400,
names=LETTERS[1:2]))
## Map to transcript coordinates:
mapToTranscripts(x, Homo.sapiens)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.