mapToTranscripts
from the
GenomicFeatures package or
mapToAlignments
from the
GenomicAlignments package instead.A method for translating a set of input ranges through a GRangesList object. Returns a GenomicRanges object.
The generics for mapCoords
and pmapCoords
are defined in the
IRanges package. A method for translating a set of input ranges through
a GAlignments object is defined and in the
GenomicAlignments package.
"mapCoords"(from, to, ..., ignore.strand = TRUE, elt.hits = FALSE)
"pmapCoords"(from, to, ..., ignore.strand = TRUE, elt.hits = FALSE)
GRanges
.from
and the
sequences in the result, usually a GRangesList
.logical
; When TRUE strand is ignored in
overlap operations.logical
; When TRUE, the output includes a metadata
column, eltHits, with indices of the inner list elements of to
hit by from
. Useful for identifying elements of to
hit
by from
. See examples.GRanges
object of mapped coordinates with matching data as metadata
columns fromHits
and toHits
. The ranges in the output
GRanges
are position relative to the outer list element of to
;
all individual list elements are concatenated and counting starts at the 5' or
3' end depending on strand.Matching data are the result of calling findOverlaps
with type `within`
on ranges in from
(the query) and the ranges in to
(the
subject). In the case of mapCoords
matching can be many-to-one or
one-to-many; one row is reported for each match. For pmapCoords
matching is one-to-one as the i-th element in from
is only mapped to
the i-th element in to
.When elt.hits
is TRUE, the eltHits
metadata column includes
the index of inner list elements in to
hit by from
. In
some applications it may be useful to identify the exact list element that
was overlapped. These elements can be extracted with the combination of
toHits
(outer list index) and eltHits
(inner list index).
mapToTranscripts
from the
GenomicFeatures package or
mapToAlignments
from the
GenomicAlignments package instead. Each element in to
is taken to represent an alignment of a sequence on
a genome. The typical case is a set of transcript models, as might be obtained
via GenomicFeatures::exonsBy
. Each outer list element of the
GRangesList represents a transcript while each each individual element is an
exon in the transcript.
mapCoords
and pmapCoords
translate the ranges in from
relative to the transcript start (i.e., start of all ranges in to
). The
widths of the individual elements (exons in this example) are concatenated and
counting starts at the 5' or 3' end depending on strand. Translated
coordinates are only reported for ranges in from
that fall completely
`within` ranges in to
.
The transcript-centric coordinates are are useful, for example, when predicting coding consequences of changes to the genomic sequence.
mapCoords
maps the i-th element in from
to each element in
to
returning in a many-to-many mapping. In contrast, pmapCoords
treats the two inputs as parallel vectors and maps the i-th element of
from
to the i-th element of to
returning a maximum of one result
per input element.
## DEFUNCT! See ?mapToTranscripts in the GenomicFeatures package and
## ?mapToAlignments in the GenomicAlignments package.
Run the code above in your browser using DataLab