Fit linear models for each surrogate variable against Sentrix chip and Sentrix position, perform backward elimination with MASS::dropterm(), and return the in-memory analysis objects.

analyzeSvaEnmix(
  sva,
  RGSet,
  SentrixIDColumn = "Sentrix_ID",
  SentrixPositionColumn = "Sentrix_Position",
  verbose = FALSE,
  logs = FALSE,
  log_dir = NULL,
  log_file = "log_analyzeSvaEnmix.txt"
)

Arguments

sva

Numeric matrix of surrogate variables with samples in rows.

RGSet

An RGChannelSet aligned with sva.

SentrixIDColumn

Character. Name of the chip identifier column in SummarizedExperiment::colData(RGSet).

SentrixPositionColumn

Character. Name of the chip position column in SummarizedExperiment::colData(RGSet).

verbose

Logical. If TRUE, emit progress messages with message().

logs

Logical. If TRUE, write the same messages to a log file.

log_dir

Character or NULL. Directory used for the log file when logs = TRUE.

log_file

Character. File name used when logs = TRUE.

Value

A list with class "dnaEPICO_svaEnmix_analysis" containing the aligned Sentrix factors, full and reduced linear models, and ANOVA tables.

Examples

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