calc_logodds: Calculate the log odds ratio

View source: R/calc_asm.R

calc_logoddsR Documentation

Calculate the log odds ratio

Description

This function calculates the log odds ratio for a CpG tuple: (MM*UU)/(UM*MU), where 'M' stands for methylated and 'U' for unmethylated. 'MM' reflects the count for instances the CpG pair is methylated at both positions. The higher the MM and UU counts for that CpG pair, the higher the log odds ratio.

Usage

calc_logodds(s, eps = 1)

Arguments

s

A data frame that contains the MM,UU,UM, and MU counts for each CpG tuple for a particular sample. It is the resulting object of the read_tuples.

eps

Count added to each of the MM,UU,UM and MU counts to avoid dividing by zero for example. The default is set to 1.

Value

The same object is returned with an additional column for the log odds ratio.


markrobinsonuzh/DAMEfinder documentation built on April 7, 2023, 6:37 a.m.