remove_batch_effect: Remove batch effect.

View source: R/batch-effect.R

remove_batch_effectR Documentation

Remove batch effect.

Description

Remove batch effect.

Usage

remove_batch_effect(
  x,
  batch = NULL,
  batch2 = NULL,
  method = c("mum", "cn", "beta"),
  offset = 1,
  verbose = TRUE,
  ...
)

Arguments

x

An object of MethylSet-class or GenomicMethylSet-class if method is "mum". An object of RatioSet-class or GenomicRatioSet-class if method is "cn" or "beta".

batch

A character scalar of the column name of interested batch in phenotype data.frame. Default to NULL.

batch2

A character scalar of the column name of interested batch2 in phenotype data.frame. Default to NULL.

method

A character scalar of methods, including "mum" (methylation and unmethylation separately), "cn" (copy number), "beta" (beta-value). Default to "mum".

offset

The offset is chosen to avoid log2 transform on zeros. Default to 1. Only valid for "mum" method.

verbose

A logical scalar. Default to TRUE.

...

Other arguments can be passed to removeBatchEffect.

Details

Batch effect is removed by calling removeBatchEffect. The methylation and unmethylation signals are log2 transformed, removed batch effect, and transformed back.

Value

An object of GenomicMethylSet-class.


markgene/yamat documentation built on Aug. 26, 2024, 11:56 p.m.