map-methods {GenomicRanges}R Documentation

Mapping ranges between sequences

Description

The GenomicRanges package provides several methods for the map generic. They each translate a set of input ranges through a certain type of alignment and return a RangesMapping object.

Usage

## S4 method for signature 'GenomicRanges,GRangesList'
map(from, to)
## S4 method for signature 'GenomicRanges,GappedAlignments'
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.

Details

The methods currently depend on the type of to:

GRangesList

Each element 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.

GappedAlignments

Each element is taken to represent the alignment of a (read) sequence. The CIGAR string is used to translate the input ranges to be relative to the read start. This is useful, for example, when determining the cycle (read position) at which a particular genomic mismatch occurs.

Value

An object of class RangesMapping. The GenomicRanges package provides some additional methods on this object:

as(from, "GenomicRanges"): Creates a GenomicRanges with seqnames and ranges from the space and ranges of from. The hits are coerced to a DataFrame and stored as the values of the result.

granges(x): Like the above, except returns just the range information as a GRanges, without the matching information.

Author(s)

M. Lawrence

See Also

The RangesMapping class is the typical return value.


[Package GenomicRanges version 1.12.1 Index]