Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

genomic-range-squeezers

Squeeze the genomic ranges out of a range-based object


Description

S4 generic functions for squeezing the genomic ranges out of a range-based object.

These are analog to range squeezers ranges and rglist defined in the IRanges package, except that granges returns the ranges in a GRanges object (instead of an IRanges object for ranges), and grglist returns them in a GRangesList object (instead of an IRangesList object for rglist).

Usage

granges(x, use.names=TRUE, use.mcols=FALSE, ...)
grglist(x, use.names=TRUE, use.mcols=FALSE, ...)

Arguments

x

An object containing genomic ranges e.g. a GenomicRanges, RangedSummarizedExperiment, GAlignments, GAlignmentPairs, or GAlignmentsList object, or a Pairs object containing genomic ranges.

use.names, use.mcols, ...

See ranges in the IRanges package for a description of these arguments.

Details

See ranges in the IRanges package for some details.

For some objects (e.g. GAlignments and GAlignmentPairs objects defined in the GenomicAlignments package), as(x, "GRanges") and as(x, "GRangesList"), are equivalent to granges(x, use.names=TRUE, use.mcols=TRUE) and grglist(x, use.names=TRUE, use.mcols=TRUE), respectively.

Value

A GRanges object for granges.

A GRangesList object for grglist.

If x is a vector-like object (e.g. GAlignments), the returned object is expected to be parallel to x, that is, the i-th element in the output corresponds to the i-th element in the input.

If use.names is TRUE, then the names on x (if any) are propagated to the returned object. If use.mcols is TRUE, then the metadata columns on x (if any) are propagated to the returned object.

Author(s)

H. Pagès

See Also

Examples

## See ?GAlignments in the GenomicAlignments package for examples of
## "ranges" and "rglist" methods.

GenomicRanges

Representation and manipulation of genomic intervals

v1.42.0
Artistic-2.0
Authors
P. Aboyoun, H. Pagès, and M. Lawrence
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.