Skip to content
Snippets Groups Projects
Commit 6a634d4f authored by Guillaume Devailly's avatar Guillaume Devailly
Browse files

metaanalysis

parent d4d18f15
Branches main
No related tags found
No related merge requests found
......@@ -40,6 +40,7 @@ metambd2$sample <- with(metambd2, fcase(
default = ""
))
# meta plots ---------------
# 95% confidence interval estimation (1/sqrt(N - 1))
......@@ -129,17 +130,48 @@ ggsave("mbd2_metaplot.png", p, width = 8, height = 11)
# meta-analysis --------------
# following the vignette
metambd2$assay <- ifelse(metambd2$assay == "RNAseq", "RNA-seq", "Microarray")
metambd2$assay2 <- paste0("KO/KD+", metambd2$assay )
metambd2[study == "Alvarado2013_OE"]$assay2 <- "OE+Microarray"
mbd2signif <- metambd2[fc_th == 1 & mbd2_padj <= 0.05, ]$study
settings.meta(digits = 2, method.tau = "PM")
m_all_lfc125 <- metabin(
data = metambd2[fc_th == 1.25, ],
event.e = n_up, n.e = n_tot,
event.c = n_down, n.c = n_tot,
studlab = paste(paper, sample),
label.e = "Up-regulation", label.c = "Down-regulation",
label.left = "More down-regulations", label.right = "More up-regulations"
mdd <- lapply(
setNames(c(1, 1.25, 1.5, 2), c("fcth1", "fcth1.25", "fcth1.5", "fcth2.00")),
function(x) {
md <- metambd2[fc_th == x & (study %in% mbd2signif), ]
metabin(
data = md,
event.e = n_up, n.e = n_tot,
event.c = n_down, n.c = n_tot,
studlab = paste(paper, sample),
cluster = md$paper,
subgroup = md$assay2, subgroup.name = c(""), sep.subgroup = "",
sm = "OR", prediction = T,
label.e = "Up-regulation", label.c = "Down-regulation",
label.left = "More down-regulations", label.right = "More up-regulations"
)
}
)
summary(m_all_lfc125)
forest(m_all_lfc125, prediction = TRUE)
forest(mdd$fcth1, prediction = FALSE)
forest(mdd$fcth1.25, prediction = FALSE)
forest(mdd$fcth1.5, prediction = FALSE)
forest(mdd$fcth2.00, prediction = FALSE)
forest(
metabind(
mdd,
name = c("H0: FC = 1", "H0: 1/1.25 < FC < 1.25", "H0: 1/1.5 < FC < 1.5", "H0: 1/2 < FC < 2"),
outclab = "OE test",
common = FALSE,
prediction = FALSE
),
prediction = FALSE
)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment