Description Usage Arguments Details Value Author(s) See Also Examples
Convenience wrappers around lower-level functions to easily obtain region-level results from window statistics.
1 2 3 4 5 | mergeResults(ranges, tab, tol, get.best=TRUE, merge.args=list(),
combine.args=list(), best.args=list())
overlapResults(ranges, tab, regions, get.best=TRUE, overlap.args=list(),
combine.args=list(), best.args=list())
|
ranges |
A GRanges or RangedSummarizedExperiment containing genomic intervals, usually for windows. |
tab |
A data.frame of differential binding results with one row per interval in |
tol |
A numeric scalar to be passed to |
get.best |
A logical scalar indicating whether |
regions |
A GRanges class containing reference regions to overlap with the windows. |
merge.args |
Further arguments to pass to |
overlap.args |
Further arguments to pass to |
combine.args |
Further arguments to pass to |
best.args |
Further arguments to pass to |
mergeResults
simply calls mergeWindows
to identify clusters of windows corresponding to regions.
These clusters are used in combineTests
and (optionally) getBestTest
to obtain per-region statistics.
overlapResults
simply calls findOverlaps
to identify all windows overlapping each regionserence region.
These overlaps are used in combineOverlaps
and (optionally) getBestOverlaps
,
where each set of overlapping windows for a regionserence region are used to define the latter's statistics.
These wrapper functions are simply for convenience. No other work is performed and so users are free to call the individual functions separately.
mergeResults
will return a DataFrame containing
regions
, the GRanges generated by clustering windows into regions;
combined
, the DataFrame containing combined statistics for each clustered region;
and best
, the DataFrame containing statistics for the best window in each clustered region.
The metadata contains ids
, an integer vector of cluster IDs for ranges
from mergeWindows
.
overlapResults
will return a DataFrame containing
regions
, the same as the input GRanges of the same name;
combined
, the DataFrame containing combined statistics for each regionserence region;
and best
, the DataFrame containing statistics for the best window in each regionserence region.
The metadata contains overlaps
, a Hits object specifying the overlaps from findOverlaps
.
Aaron Lun
mergeWindows
, combineTests
and getBestTest
,
for the functions that actually do the work in mergeResults
.
findOverlaps
, combineOverlaps
and getBestOverlaps
,
for the functions that actually do the work in overlapResults
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # Making up some data.
tab <- data.frame(logFC=rnorm(20), logCPM=rnorm(20), PValue=rbeta(20, 1, 2))
gr <- GRanges("chrA", IRanges(sample(1000, 20), width=40))
# Merging windows.
(merge.out <- mergeResults(gr, tab, tol=1))
merge.out$merged
merge.out$combined
# Overlapping windows with a regionserence.
regions <- GRanges("chrA", IRanges(c(10, 500, 900), width=20))
(olap.out <- overlapResults(gr, tab, regions=regions))
olap.out$regions
olap.out$combined
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.