Skip to contents

Internal function used in modelGeneExpression. It runs ridge regression parallelly across signatures and samples as specified by experiment design.

Usage

modelGeneExpression_ridge_regression_wraper(
  mae,
  yname,
  uname,
  xnames,
  groups,
  standardize,
  parallel,
  precalcmodels,
  ...
)

Arguments

mae

MultiAssayExperiment object such as produced by prepareCountsForRegression.

yname

string indicating experiment in mae to use as the expression input.

uname

string indicating experiment in mae to use as the basal expression level.

xnames

character indicating experiments in mae to use as molecular signatures.

groups

factor representation of design matrix.

standardize

logical flag indicating if the molecular signatures should be scaled. Advised to be set to TRUE.

parallel

parallel argument to internally used cv.glmnet function. Advised to be set to FALSE as it might interfere with parallelization used in modelGeneExpression.

precalcmodels

optional list of precomputed 'cv.glmnet' objects for each molecular signature and sample. The elements of this list should be matching the xnames vector. Each of those elements should be a named list holding 'cv.glmnet' objects for each sample. If provided those models will be used instead of running regression from scratch.

...

arguments passed to glmnet::cv.glmnet.

Value

Named list with elements corresponding to signatures specified in xnames. Each of these is a list holding 'cv.glmnet' objects corresponding to each sample.