This function updates residuals for SiMLR by applying different covariate transformations.

antspymm_simlr_update_residuals(
  mats,
  x,
  covariate,
  blaster2,
  allnna,
  n.comp,
  opt = NULL
)

Arguments

mats

A list of matrices.

x

An index to select a matrix from the list.

covariate

A character string specifying the covariate transformation to apply.

blaster2

A data frame containing additional covariate data.

allnna

A logical vector indicating non-missing data points.

n.comp

An integer specifying the number of components.

opt

A character string. If set to "opt", the function will print available covariate options.

Value

The residual matrix after applying the specified covariate transformation. If `opt` is set to "opt", the function will print available covariate options and return NULL.

Examples

if (FALSE) { # \dontrun{
antspymm_simlr_update_residuals(mats, 1, "whiten", blaster2, allnna, 5)
antspymm_simlr_update_residuals(opt = "opt")
} # }