adjustedDasen: adjustedDasen

View source: R/adjustedDasen.R

adjustedDasenR Documentation

adjustedDasen

Description

adjustedDasen utilizes dasen normliasation to normalise autosomal CpGs, and infers the sex chromosome linked CpGs by linear interpolation on corrected autosomal CpGs.

Usage

adjustedDasen(
  mns,
  uns,
  onetwo,
  chr,
  offset_fit = TRUE,
  cores = 1,
  ret2 = FALSE,
  fudge = 100,
  ...
)

Arguments

mns

matrix of methylated signal intensities, samples in column and probes in row.

uns

matrix of unmethylated signal intensities, samples in column and probes in row.

onetwo

character vector or factor of length nrow(mns) indicating assay type 'I' or 'II'.

chr

character vector stores the mapped chromosomes for all probes, e.g. chr <- c('1', 'X', '21', ..., 'Y').

offset_fit

logical (default is TRUE). To use dasen, set it TRUE; to use nasen, set it FALSE.

cores

an integer(e.g. 8) defines the number of cores to parallel processing. Default value is 1, set to -1 to use all available cores.

ret2

logical (default is FALSE), if TRUE, returns a list of intensities and betas instead of a naked matrix of betas.

fudge

default 100, a value added to total intensity to prevent denominators close to zero when calculating betas, e.g. betas <- mns / (mns + uns + fudge).

...

additional argument roco for dfsfit giving Sentrix rows and columns. This allows a background gradient model to be fit. This is split from data column names by default. roco=NULL disables model fitting (and speeds up processing), otherwise roco can be supplied as a character vector of strings like 'R01C01' (only 3rd and 6th characters used).

Value

a matrix of normalised beta values.

References

A data-driven approach to preprocessing Illumina 450K methylation array data, Pidsley et al, BMC Genomics.
interpolatedXY: a two-step strategy to normalise DNA methylation microarray data avoiding sex bias, Wang et al., 2021.

Examples

data(melon)
normalised_betas <- adjustedDasen(mns = methylated(melon), uns = unmethylated(melon), onetwo = fData(melon)[,fot(melon)], chr = fData(melon)$CHR, cores=1)
## if input is an object of methylumiset or methylset
normalised_betas <- adjustedDasen(melon)


schalkwyk/wateRmelon documentation built on Aug. 13, 2024, 9:52 a.m.