mergeBySig | R Documentation |
Merge overlapping windows using p-values from significance testing
mergeBySig(x, ...)
## S4 method for signature 'GenomicRanges'
mergeBySig(
x,
df = NULL,
logfc = "logFC",
pval = "P",
cpm = "logCPM",
inc_cols,
p_adj_method = "fdr",
alpha = 0.05,
method = c("combine", "best", "minimal"),
merge_within = 1L,
ignore_strand = TRUE,
min_win = 1,
...
)
## S4 method for signature 'RangedSummarizedExperiment'
mergeBySig(
x,
df = NULL,
logfc = "logFC",
pval = "P",
cpm = "logCPM",
inc_cols,
p_adj_method = "fdr",
alpha = 0.05,
method = c("combine", "best", "minimal"),
merge_within = 1L,
ignore_strand = TRUE,
...
)
x |
GenomicRanges object |
... |
Passed to all csaw functions being wrapped |
df |
data.frame with results of differential binding analysis performed
using a sliding window strategy. If not provided, the columns in the
|
logfc , pval , cpm |
Column names for the values holding window specific estimates of change in binding (logfc), overall signal intensity (cpm) and the significance from statistical testing (pval) |
inc_cols |
(Optional) Character vector of any additional columns in
|
p_adj_method |
One of |
alpha |
Significance threshold to apply during internal calculations |
method |
Shorthand versions for which |
merge_within |
Merge any non-overlapping windows within this distance |
ignore_strand |
Passed internally to reduce and findOverlaps |
min_win |
Only keep merged windows derived from at least this number |
When using sliding windows to test for differential signal, overlapping
windows can be merged based on the significance of results.
mergeBySig()
is a wrapper to the functions combineTests,
getBestTest and minimalTests, using each
function's approach to finding a representative window. The returned object
differs from those returned by the original functions in that the
description of windows as 'up', 'down' or mixed is omitted and the genomic
range corresponding to the representative window is also returned. Column
names also correspond to those in the original object.
An additional column with adjusted p-values is returned. This column retains the same name as the original but with the suffix '_*' added where the p-value adjustment method is added after the underscore.
A GenomicRanges object with overlapping ranges from the original object merged and representative values returned. The range corresponding to the representative values is also returned
x <- GRanges(c("chr1:1-10", "chr1:6-15", "chr1:51-60"))
set.seed(1001)
df <- DataFrame(logFC = rnorm(3), logCPM = rnorm(3,8), p = rexp(3, 10))
mcols(x) <- df
mergeBySig(x, pval = "p", method = "combine")
mergeBySig(x, pval = "p", method = "best")
mergeBySig(x, pval = "p", method = "min")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.