R/prepare_data.R
prepare_swish.Rdprepare_swish formats a differential transcript expression (DET)
results table produced by fishpond::swish so it can be used
directly as one element of the diffexp list passed to
rem_mv, votecount_mv, or combining_mv.
prepare_swish(det, tx_col = NULL, ci_level = 0.95)A data.frame of Swish/fishpond DET results, typically the
output of mcols(se) after running swish(), coerced to a
data.frame. Must contain the columns named by tx_col,
log2FC, stat, and pvalue.
Character. Name of the column in det holding the
transcript (or gene) identifier. If NULL (the default),
auto-detected from "tx_name", "tx_id",
"transcript_id", or "transcript_name" (in that order,
typically added by tximeta::tximeta()). Specify explicitly if
none of these match your column name.
Numeric between 0 and 1. Confidence level for the
derived CI. Default 0.95.
A data.frame with columns Symbol, Log2FC,
pvalue, CI.L, CI.R — ready to be used as one
element of the named list passed to rem_mv(diffexp = ...).
if (FALSE) { # \dontrun{
library(fishpond)
se <- swish(se, x = "condition")
det <- as.data.frame(mcols(se))
# Auto-detects tx_name/tx_id if tximeta added them to rowData
study1 <- prepare_swish(det)
# Or specify explicitly if your identifier column has a different name
study1 <- prepare_swish(det, tx_col = "tx_name")
# Use in meta-analysis
meta_result <- rem_mv(list(study1 = study1, study2 = study2))
} # }