Clusters are identified as those tests with the same value of ids
(any NA
values are ignored).
If by.pval=TRUE
, this function identifies the test with the lowest p-value as that with the strongest evidence against the null in each cluster.
The p-value of the chosen test is adjusted using the Bonferroni correction, based on the total number of tests in the parent cluster.
This is necessary to obtain strong control of the family-wise error rate such that the best test can be taken from each cluster for further consideration.The importance of each window in each cluster can be adjusted by supplying different relative weight
values.
Each weight is interpreted as a different threshold for each test in the cluster.
Larger weights correspond to lower thresholds, i.e., less evidence is needed to reject the null for tests deemed to be more important.
This may be useful for upweighting particular tests, e.g., windows containing a motif for the TF of interest.
Note the difference between this function and combineTests
.
The latter presents evidence for any rejections within a cluster.
This function specifies the exact location of the rejection in the cluster, which may be more useful in some cases but at the cost of conservativeness.
In both cases, clustering procedures such as mergeWindows
can be used to identify the cluster.
If by.pval=FALSE
, the best test is defined as that with the highest log-CPM value.
This should be independent of the p-value so no adjustment is necessary. Weights are not applied here.
This mode may be useful when abundance is correlated to rejection under the alternative hypothesis, e.g., picking high-abundance regions that are more likely to contain peaks.
By default, the relevant fields in tab
are identified by matching the column names to their expected values.
If the column names are different from what is expected, specification of the correct column can be performed using pval.col
and cpm.col
.