R/svaEnmix_steps.R
analyzeSvaEnmix.RdFit linear models for each surrogate variable against informative Sentrix
chip and position factors, perform backward elimination with
stats::drop1(), and return the in-memory analysis objects. A constant
technical factor is omitted; if both are constant, an intercept-only model
is retained.
analyzeSvaEnmix(
sva,
RGSet,
SentrixIDColumn = "Sentrix_ID",
SentrixPositionColumn = "Sentrix_Position",
verbose = FALSE,
logs = FALSE,
log_dir = NULL,
log_file = "log_analyzeSvaEnmix.txt"
)Numeric matrix of surrogate variables with samples in rows.
An RGChannelSet aligned with sva.
Character. Name of the chip identifier column in
SummarizedExperiment::colData(RGSet).
Character. Name of the chip position column in
SummarizedExperiment::colData(RGSet).
Logical. If TRUE, emit progress messages with message().
Logical. If TRUE, write the same messages to a log file.
Character or NULL. Directory used for the log file when
logs = TRUE.
Character. File name used when logs = TRUE.
A list with class 'dnaEPICO_svaEnmix_analysis' containing the
aligned Sentrix factors, full and reduced linear models, and ANOVA tables.
ex <- dnaEPICO:::exampleSvaAnalysisStateDnaEpico()
analysis_data <- analyzeSvaEnmix(
sva = ex$sva,
RGSet = ex$RGSet,
SentrixIDColumn = "Sentrix_ID",
SentrixPositionColumn = "Sentrix_Position",
verbose = FALSE,
logs = FALSE
)
analysis_data$K
#> [1] 2