range-squeezers | R Documentation |
S4 generic functions for squeezing the ranges out of a range-based object.
These are analog to range squeezers granges
and grglist
defined in the GenomicRanges
package, except that ranges
returns the ranges in an IRanges
object (instead of a GRanges object for
granges
), and rglist
returns them in an
IRangesList object (instead of a GRangesList
object for grglist
).
ranges(x, use.names=TRUE, use.mcols=FALSE, ...)
rglist(x, use.names=TRUE, use.mcols=FALSE, ...)
x |
An object containing ranges e.g. a IntegerRanges, GenomicRanges, RangedSummarizedExperiment, GAlignments, GAlignmentPairs, or GAlignmentsList object, or a Pairs object containing ranges. |
use.names |
|
use.mcols |
|
... |
Additional arguments, for use in specific methods. |
Various packages (e.g. IRanges, GenomicRanges, SummarizedExperiment, GenomicAlignments, etc...) define and document various range squeezing methods for various types of objects.
Note that these functions can be seen as object getters or as functions performing coercion.
For some objects (e.g. GAlignments and
GAlignmentPairs objects defined in the
GenomicAlignments package), as(x, "IRanges")
and
as(x, "IRangesList")
, are equivalent to
ranges(x, use.names=TRUE, use.mcols=TRUE)
and
rglist(x, use.names=TRUE, use.mcols=TRUE)
, respectively.
An IRanges object for ranges
.
An IRangesList 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 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.
H. Pagès
IRanges and IRangesList objects.
RangedSummarizedExperiment objects in the SummarizedExperiment packages.
GAlignments, GAlignmentPairs, and GAlignmentsList objects in the GenomicAlignments package.
## See ?GAlignments in the GenomicAlignments package for examples of
## "ranges" and "rglist" methods.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.