Maps the columns exported by NCBI GEO2R (a limma-based differential
expression analysis run through the GEO web interface) to the format
expected by rem_mv(), combining_mv() and votecount_mv().
prepare_geo2r(
diffexp,
genenamecol = "Gene.symbol",
logfccol = "logFC",
pvaluecol = "P.Value",
tcol = "t",
collapse = c("min_pvalue", "none"),
drop_unmapped = TRUE
)A data.frame/data.table from GEO2R ("Download full table").
Column holding the feature identifier (default "Gene.symbol"). GEO2R multi-symbol entries ("A///B") are split to the first.
Log2 fold-change column (default "logFC").
Raw p-value column (default "P.Value").
Moderated t-statistic column used to derive the SE/CI (default "t"). Set to NULL to skip CI derivation (REM will then need a variance supplied another way).
One of "min_pvalue" (keep, per symbol, the row with the smallest p-value; default) or "none" (leave duplicates untouched).
Drop rows with missing/empty identifiers (default TRUE).
A data.frame with columns: Symbol, Log2FC, pvalue, and (when tcol is available) CI.L, CI.R. Pass these to MetaVolcanoR via genenamecol="Symbol", foldchangecol="Log2FC", pcriteria="pvalue", llcol="CI.L", rlcol="CI.R".
GEO2R tables do not include a confidence interval by default, but they do report the moderated t-statistic. Because limma's moderated t is \(t = logFC / SE\), a standard error can be recovered as \(SE = logFC / t\), and a 95% confidence interval as \(logFC \pm 1.96 \cdot SE\). This lets a plain GEO2R export feed the random-effects model (REM) without any manual reformatting.
if (FALSE) { # \dontrun{
tab <- read.delim("GSE12345.top.table.tsv", stringsAsFactors = FALSE)
prep <- prepare_geo2r(tab)
head(prep)
} # }