mapCoords-methods {GenomicRanges} | R Documentation |
DEPRECATED! Use 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.
## S4 method for signature 'GenomicRanges,GRangesList' mapCoords(from, to, ..., ignore.strand = TRUE, elt.hits = FALSE) ## S4 method for signature 'GenomicRanges,GRangesList' pmapCoords(from, to, ..., ignore.strand = TRUE, elt.hits = FALSE)
from |
The input ranges to map, usually a |
to |
The alignment between the sequences in |
ignore.strand |
|
elt.hits |
|
... |
Arguments passed to other methods. Currently not used. |
DEPRECATED! Use 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.
A 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).
M. Lawrence and V. Obenchain vobencha@fhcrc.org
The generic mapCoords-methods in the IRanges package.
Additional methods in the GenomicAlignments package mapCoords-methods.
## DEPRECATED! See ?mapToTranscripts in the GenomicFeatures package and ## ?mapToAlignments in the GenomicAlignments package.