Learn R Programming

GenomicRanges (version 1.18.4)

map-methods: Mapping ranges between sequences

Description

map is defunct. Use mapCoords instead.

A method for translating a set of input ranges through a GRangesList object. Returns a GRangesMapping object.

NOTE: The map generic function is defined and documented in the IRanges package. A method for translating a set of input ranges through a GAlignments object is defined and documented in the GenomicAlignments package.

Usage

"map"(from, to)

Arguments

from
The input ranges to map, usually a GenomicRanges
to
The alignment between the sequences in from and the sequences in the result.

Value

An object of class GRangesMapping which contains both a Hits instance and a GRanges instance.
  • hits: Contains the matching (overlaps) from ranges in from to the ranges in to. Matching can be many-to-one or one-to-many. See ?`{Hits}` for details.
  • GRanges: Contains the mapped coordinates for ranges in from that are `within` ranges in to. Length of the GRanges is the same as the Hits object and contains one row for each overlap. Strand corresponds to the strand of the range in to.

Details

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. The method translates the input ranges to be relative to the transcript start. This is useful, for example, when predicting coding consequences of changes to the genomic sequence. Note that output is produced only for ranges in from that fall completely `within` ranges in to.

See Also

The GRangesMapping class is the typical return value.

Examples

Run this code
## See ?mapCoords for examples

Run the code above in your browser using DataLab