findOverlaps-methods | R Documentation |
This man page documents the findOverlaps
methods for
RangedSummarizedExperiment objects.
RangedSummarizedExperiment objects also support
countOverlaps
, overlapsAny
, and subsetByOverlaps
thanks to the default methods defined in the IRanges package and
to the findOverlaps
methods defined in this package and documented
below.
## S4 method for signature 'RangedSummarizedExperiment,Vector'
findOverlaps(query, subject,
maxgap=-1L, minoverlap=0L,
type=c("any", "start", "end", "within", "equal"),
select=c("all", "first", "last", "arbitrary"),
ignore.strand=FALSE)
## S4 method for signature 'Vector,RangedSummarizedExperiment'
findOverlaps(query, subject,
maxgap=-1L, minoverlap=0L,
type=c("any", "start", "end", "within", "equal"),
select=c("all", "first", "last", "arbitrary"),
ignore.strand=FALSE)
query , subject |
One of these two arguments must be a RangedSummarizedExperiment object. |
maxgap , minoverlap , type |
See |
select , ignore.strand |
See |
These methods operate on the rowRanges
component of the
RangedSummarizedExperiment object, which can be a
GenomicRanges or GRangesList
object.
More precisely, if any of the above functions is passed a
RangedSummarizedExperiment object thru the query
and/or
subject
argument, then it behaves as if rowRanges(query)
and/or rowRanges(subject)
had been passed instead.
See ?findOverlaps
in the GenomicRanges
package for the details of how findOverlaps
and family operate on
GenomicRanges and GRangesList
objects.
See ?findOverlaps
in the GenomicRanges
package.
RangedSummarizedExperiment objects.
The findOverlaps man page in the
GenomicRanges package where the findOverlaps
family
of methods for GenomicRanges and
GRangesList objects is documented.
nrows <- 20; ncols <- 6
counts <- matrix(runif(nrows * ncols, 1, 1e4), nrows)
rowRanges <- GRanges(rep(c("chr1", "chr2"), c(5, 15)),
IRanges(sample(1000L, 20), width=100),
strand=Rle(c("+", "-"), c(12, 8)))
colData <- DataFrame(Treatment=rep(c("ChIP", "Input"), 3),
row.names=LETTERS[1:6])
rse0 <- SummarizedExperiment(assays=SimpleList(counts=counts),
rowRanges=rowRanges, colData=colData)
rse1 <- shift(rse0, 100)
hits <- findOverlaps(rse0, rse1)
hits
stopifnot(identical(hits, findOverlaps(rowRanges(rse0), rowRanges(rse1))))
stopifnot(identical(hits, findOverlaps(rse0, rowRanges(rse1))))
stopifnot(identical(hits, findOverlaps(rowRanges(rse0), rse1)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.