View source: R/meta-analysis.R
meta_de | R Documentation |
This function performs p-value combination for all genes and estimates summary
statistics for average effect sizes for all experiments in the input
SummarizedExperiment
object.
meta_de(x, FUN, pval = "PValue", lfc = "logFC", impute_missing = TRUE, ...)
x |
SummarizedExperiment object containing combined differential expression results from different studies. The SE object must contain at least two assays, one for the P-values to combine and the other for the effect sizes to compute (e.g. logFC). |
FUN |
One of the 'parallel' functions provided by |
pval |
assay name in SE object containing the P-values to combine. |
lfc |
assay name in the SE object containing the logFC values to combine. |
impute_missing |
TRUE/FALSE should missing values in the logFC and P-Value assays be imputed prior p-value combination? Default TRUE, missing p-values are imputed with 1 and missing logFCs are imputed with 0. |
... |
Additional arguments passed to FUN. See the |
data.table with summary stats of the p-value combination of all
experiments. Please see the documentation in the metapod
package for
more details. The returned columns, "Rep.LogFC" and "Rep.Pval" contain the
results of extracting the representative effect and P=value from all
influential tests. These are individual tests in the data that are particularly
important for calculating the combined effects.
# Example taken from ?dfs2se()
# Define two differential expression dataset data.frames
exp1 <- data.frame(
feature_id = c("geneA", "geneB", "geneC"),
PValue = c(0.01, 0.5, 0.05),
FDR = c(0.02, 0.5, 0.07),
logFC = c(1.2, -2.5, 3.7),
logCPM = c(12, 9, 0)
)
exp2 <- data.frame(
feature_id = c("geneA", "geneB", "geneD"),
PValue = c(0.07, 0.3, 0.8),
FDR = c(0.08, 0.4, 1.0),
logFC = c(1.5, -2.0, 3.0),
logCPM = c(14, 10, 2)
)
# Combine into a single list
l <- list(experiment1 = exp1, experiment2 = exp2)
# Convert the data to a SummarizedExperiment
se <- dfs2se(l)
# Perform p-value combination across experiments for each gene
# using Wilkinson's method and passing additional values
result <- meta_de(se, metapod::parallelWilkinson, min.prop = 0.1)
head(result)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.