range-squeezers {GenomicRanges} | R Documentation |
S4 generic functions for squeezing the ranges out of a range-based object.
granges
returns them as a GRanges object, grglist
as a GRangesList object, and rglist
as a
RangesList object.
granges(x, use.mcols=FALSE, ...) grglist(x, use.mcols=FALSE, ...) rglist(x, use.mcols=FALSE, ...)
x |
A range-based object e.g. a SummarizedExperiment, GAlignments, GAlignmentPairs, or GAlignmentsList object. |
use.mcols |
|
... |
Additional arguments, for use in specific methods. |
The GenomicRanges and GenomicAlignments packages define and document methods for various types of range-based objects (e.g. for SummarizedExperiment, 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, "GRanges")
, as(x, "GRangesList")
, and
as(x, "RangesList")
, are equivalent to
granges(x, use.mcols=TRUE)
, grglist(x, use.mcols=TRUE)
,
and rglist(x, use.mcols=TRUE)
, respectively.
A GRanges object for granges
.
A GRangesList object for grglist
.
A RangesList object for rglist
.
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 x
has names on it,
they're propagated to the returned object. If use.mcols
is TRUE and
x
has metadata columns on it (accessible with mcols(x)
),
they're propagated to the returned object.
H. Pagès
GRanges and GRangesList objects.
RangesList objects in the IRanges package.
SummarizedExperiment objects.
GAlignments, GAlignmentPairs, and GAlignmentsList objects in the GenomicAlignments package.
## See ?GAlignments in the GenomicAlignments package for some ## examples.