train_batch_effect_model: Train the model for batch effect removal.

View source: R/batch-effect-correction.R

train_batch_effect_modelR Documentation

Train the model for batch effect removal.

Description

Train the model for batch effect removal.

Usage

train_batch_effect_model(
  x,
  batch = NULL,
  batch2 = NULL,
  covariates = NULL,
  design = matrix(1, ncol(x), 1),
  log2_transform = TRUE,
  adjusted_rda = "adjusted.Rda",
  fit_rda = "fit.Rda",
  ...
)

Arguments

x

a matrix of log2 transformed signal intensity.

batch

factor or vector indicating batches.

batch2

factor or vector indicating a second series of batches.

covariates

matrix or vector of numeric covariates to be adjusted for.

design

design matrix relating to treatment conditions to be preserved, usually the design matrix with all experimental factors other than the batch effects.

log2_transform

if perform log2 transform with offset 1, i.e. formula log2(x+1).

adjusted_rda

the file save the adjusted value.

fit_rda

the file save the model.

...

parameters pass to lmFit.

Details

Inspired by removeBatchEffect.

Value

a list of fit result.


markgene/yamatClassifier documentation built on Oct. 14, 2024, 2:36 a.m.