recodeMatrixAsNumeric: Recode matrix

View source: R/preProcessMethMats.R

recodeMatrixAsNumericR Documentation

Recode matrix

Description

Recode NA values in methylation matrix to numbers. If the matrix contains numbers from a scale of 0 (no meth) to 1 (meth), NAs and NaNs are set to 0.5. If the matrix contains numbers from -1 to 1, NAs and NaNs are set to 0.

Usage

recodeMatrixAsNumeric(dataMatrix)

Arguments

dataMatrix

A matrix containing methylation values for a region of the genome using coordinates relative to an anchor point. dataMatrix[i,j] is the methylation value of sample i at position j. 0, or -1=not methylated, 1=methylated, NA=no methylation information at this position.

Value

Matrix with methylation values coded on a -1 to 1 or 0 to 1 scale, with NAs and NaNs converted to an intermediate value


jsemple19/EMclassifieR documentation built on Aug. 12, 2022, 2:57 p.m.