combineVar {scran} | R Documentation |
Combine the results of multiple variance decompositions, usually generated for the same genes across separate batches of cells.
combineVar(..., method=c("fisher", "simes", "berger"))
... |
Two or more data frames, each produced by |
method |
A string specifying how p-values are to be combined. |
This function is designed to merge results from multiple calls to decomposeVar
, usually computed for different batches of cells.
Separate variance decompositions are necessary in cases where different concentrations of spike-in have been added to the cells in each batch.
This affects the technical mean-variance relationship and precludes the use of a common trend fit.
The default setting is to use method="fisher"
, where Fisher's method is used to combine p-values across batches.
This aims to detect genes that are highly variable in any batch and assumes that the test outcome is independent between batches.
If independence does not hold, Simes' method should be used by setting method="simes"
, as it is more robust to correlations between tests.
To identify genes that are detected as highly variable in all batches, Berger's IUT can be used by setting method="simes"
.
A data frame with the same numeric fields as that produced by decomposeVar
.
Each field contains the average across all batches except for p.value
, which contains the combined p-value based on method
;
and FDR
, which contains the adjusted p-value using the BH method.
Aaron Lun
Simes RJ (1986). An improved Bonferroni procedure for multiple tests of significance. Biometrika 73:751-754.
Berger RL and Hsu JC (1996). Bioequivalence trials, intersection-union tests and equivalence confidence sets. Statist. Sci. 11, 283-319.
Fisher, R.A. (1925). Statistical Methods for Research Workers. Oliver and Boyd (Edinburgh).
example(computeSpikeFactors) # Using the mocked-up data 'y' from this example. y <- computeSumFactors(y) # Size factors for the the endogenous genes. y <- computeSpikeFactors(y, general.use=FALSE) # Size factors for spike-ins. y1 <- y[,1:100] y1 <- normalize(y1) # normalize separately after subsetting. fit1 <- trendVar(y1) results1 <- decomposeVar(y1, fit1) y2 <- y[,1:100 + 100] y2 <- normalize(y2) # normalize separately after subsetting. fit2 <- trendVar(y2) results2 <- decomposeVar(y2, fit2) head(combineVar(results1, results2)) head(combineVar(results1, results2, method="simes")) head(combineVar(results1, results2, method="berger"))