rescale_0To1: Recode matrix

View source: R/EMmultigene.R

rescale_0To1R Documentation

Recode matrix

Description

Recode values in methylation matrix from a scale of 0 (no meth) to 1 (meth) to a scale of -1 (no meth) to 1 (meth). NaN are set to 0 and NAs can be either 0 or randomly assigned to -0.5 or 0.5

Usage

rescale_0To1(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. -1=not methylated, 1=methylated. NAs and NaNs have been assigned the value 0

Value

Matrix with methylation values coded on a -1 to 1 scale


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