Squeeze the ranges out of a range-based object
S4 generic functions for squeezing the ranges out of a range-based object.
granges(x, use.mcols=FALSE, ...) grglist(x, use.mcols=FALSE, ...) rglist(x, use.mcols=FALSE, ...)
- A range-based object e.g. a RangedSummarizedExperiment, GAlignments, GAlignmentPairs, GAlignmentsList or a Pairs object containing ranges.
FALSE(the default). Whether the metadata columns on
mcols(x)) should be propagated to the returned object or not.
- Additional arguments, for use in specific methods.
The GenomicRanges, SummarizedExperiment, and GenomicAlignments packages define and document methods for various types of range-based objects (e.g. for RangedSummarizedExperiment, GAlignments, GAlignmentPairs, and GAlignmentsList objects). Other Bioconductor packages might as well.
Note that these functions can be seen as a specific kind of object
getters as well as functions performing coercion.
For some objects (e.g. GAlignments),
as(x, "GRangesList"), and
as(x, "RangesList"), are equivalent to
rglist(x, use.mcols=TRUE), respectively.
A GRanges object for
granges.A GRangesList object for
grglist.A RangesList object for
xis 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
xhas names on it, they're propagated to the returned object. If
use.mcolsis TRUE and
xhas metadata columns on it (accessible with
mcols(x)), they're propagated to the returned object.
## See ?GAlignments in the GenomicAlignments package for some ## examples.